Include rules
akamai_property_include_rules
Get an include's rule tree by searching across the contracts and groups you have access to.
data "akamai_property_include_rules" "my_include_rules" {
    contract_id = "C-0N7RAC7"
    group_id    = "12345"
    include_id  = "1234"
    version     = 1
}
output "my_include_rules" {
  value = data.akamai_property_include_rules.my_include_rules
}
Changes to Outputs:
  + my_include_rules = {
      + contract_id   = "C-0N7RAC7"
      + group_id      = "12345"
      + id            = "1234:1"
      + include_id    = "1234"
      + name          = "my-new-include"
      + rule_errors   = ""
      + rule_format   = "v2023-05-30"
      + rule_warnings = ""
      + rules         = jsonencode(
            {
              + rules = {
                  + behaviors = [
                      + {
                          + name    = "restrictObjectCaching"
                          + options = {
                              + maximumSize = ""
                            }
                        },
                      + {
                          + name    = "origin"
                          + options = {
                              + cacheKeyHostname          = "ORIGIN_HOSTNAME"
                              + compress                  = true
                              + enableTrueClientIp        = true
                              + forwardHostHeader         = "REQUEST_HOST_HEADER"
                              + hostname                  = "www.example.com"
                              + httpPort                  = 80
                              + httpsPort                 = 443
                              + originCertificate         = ""
                              + originSni                 = true
                              + originType                = "CUSTOMER"
                              + ports                     = ""
                              + trueClientIpClientSetting = false
                              + trueClientIpHeader        = "True-Client-IP"
                              + verificationMode          = "PLATFORM_SETTINGS"
                            }
                        },
                      + {
                          + name    = "cpCode"
                          + options = {
                              + value = {
                                  + createdDate = 1721911425000
                                  + description = "MyCPCode"
                                  + id          = 123456
                                  + name        = "My CP Code"
                                  + products    = [
                                      + "Obj_Caching",
                                    ]
                                }
                            }
                        },
                      + {
                          + name    = "caching"
                          + options = {
                              + behavior       = "MAX_AGE"
                              + mustRevalidate = false
                              + ttl            = "1d"
                            }
                        },
                      + {
                          + name    = "removeVary"
                          + options = {
                              + enabled = true
                            }
                        },
                      + {
                          + name    = "report"
                          + options = {
                              + logAcceptLanguage = false
                              + logCookies        = "OFF"
                              + logCustomLogField = false
                              + logEdgeIP         = false
                              + logHost           = false
                              + logReferer        = true
                              + logUserAgent      = true
                              + logXForwardedFor  = false
                            }
                        },
                      + {
                          + name    = "autoDomainValidation"
                          + options = {
                              + autodv = ""
                            }
                        },
                    ]
                  + name      = "default"
                  + options   = {}
                }
            }
        )
      + type          = "MICROSERVICES"
      + version       = 1
    }
Arguments
Pass your contract, group, and include IDs in the body of the declaration to get details of an include's rules.
| Argument | Required | Description | 
|---|---|---|
| contract_id | ✔ | Your contract's ID. | 
| group_id | ✔ | Your group's ID. | 
| include_id | ✔ | Your include's ID. | 
| version | ✔ | The include version you want to view the rules for. | 
Attributes
Returned to you is a computed set of the given include's rule tree.
| Attribute | Description | 
|---|---|
| contract_id | Your contract's ID. | 
| group_id | Your group's ID. | 
| id | Your data source's ID. | 
| include_id | Your include's ID. | 
| name | The descriptive name for your include. | 
| rule_errors | The rule's validation errors. You need to resolve returned errors, as they block an activation. | 
| rule_warnings | The rule's validation warnings. You can activate a version that yields non-blocking warnings. | 
| rule_format | The versioned set of features and criteria that are currently applied to a rule tree. | 
| rules | Your include's rules in JSON format. | 
| type | The type of include. Contains either: 
 | 
| version | Your include's version. | 
Updated about 1 year ago
