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

change custom domain acm creation condition #27

Merged
merged 1 commit into from
Nov 2, 2023
Merged

change custom domain acm creation condition #27

merged 1 commit into from
Nov 2, 2023

Conversation

hong-yi
Copy link
Contributor

@hong-yi hong-yi commented Nov 2, 2023

The current condition when starting from an empty environment will always throw an error:

Error: Invalid count argument
on .terraform/modules/apigw.apigw_custom_domain/modules/custom_domain/main.tf line 39, in resource "aws_acm_certificate" "cert":
  count = var.create_acm_cert && var.cert_arn == "" ? 1 : 0
The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply only the resources that the count depends on

To fix this, fix the condition to only check for var.create_acm_cert and set it to true if required

@hong-yi hong-yi merged commit e7ba944 into SPHTech-Platform:main Nov 2, 2023
3 checks passed
zodilib pushed a commit that referenced this pull request Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants