Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using property manager with declarative option issue #465

Closed
renatotecchio opened this issue Aug 30, 2023 · 3 comments
Closed

Using property manager with declarative option issue #465

renatotecchio opened this issue Aug 30, 2023 · 3 comments

Comments

@renatotecchio
Copy link

Hi @lkowalsk-akamai-com could you open this issue again?
I'm facing three problems when using property manager with declarative option.

In the behavior -> origin block I need to pass the custom certificates but Terraform is not accepting it:

    behavior {
      origin {
       ...
        custom_certificates = [
          {
            subject_CN = "istio-ingressgateway.istio-system.svc"
            subject_alternative_names = ["istio-ingressgateway.istio-system.svc", "istio-ingressgateway.istio-system.svc.cluster.local"]
            subject_RDNs = {
              CN = "istio-ingressgateway.istio-system.svc"
            }     
            not_after = "${env.akamai_origin_certificate_expire}"
            sha1_fingerprint = "${env.akamai_origin_certificate_sha}"
            pem_encoded_cert = "${env.akamai_origin_certificate}"
          }
        ]
      }
    }

Terraform message: An argument named "custom_certificates" is not expected here. Did you mean to define a block of type "custom_certificates"?

In the behavior -> cp_code block I need to pass the cp_code_limits but Terraform is not accepting it:

    behavior {
      cp_code {
        value {
          ...
          cp_code_limits = {
            limit = 100
            current_capacity = 96
            limit_type = global
          }
        }
      }
    }

Terraform message: An argument named "cp_code_limits" is not expected here. Did you mean to define a block of type "cp_code_limits"?

In the behavior -> site_shield block I need to pass the has_mixed_hosts and src but Terraform is not accepting it:

    behavior {
      site_shield {
        ssmap {
         ...
          has_mixed_hosts = false
          src = "PREVIOUS_MAP"
        }
      }
    }

Terraform message: An argument named "has_mixed_hosts" is not expected here. An argument named "src" is not expected here.

@renatotecchio
Copy link
Author

Terraform version: v1.5.2
Provider version: v5.1.0
product_id: prd_Site_Defender

@majakubiec
Copy link
Contributor

Hi @renatotecchio

the message An argument named "custom_certificates" is not expected here. Did you mean to define a block of type "custom_certificates"? you see is because you used argument syntax (the one with =) where block syntax were expected by terraform:

expected (notice missing = before {):

 behavior {
      origin {
       ...
        custom_certificates {
            ...
        }
        custom_certificates {
             ...
        }

same for cp_code_limits

cp_code_limits {
       ...
}

Although custom_certificates and 'ssmap' blocks do miss some fields, and we are aware of that.

Regards

@lkowalsk-akamai-com
Copy link
Contributor

This issue should now be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants