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

Handle empty acm_domains in acm.tf #27

Merged
merged 1 commit into from
May 8, 2024

Conversation

nagagovindarajan
Copy link
Contributor

domain_name and domain_parts will give error if include_in_acm=false. So handled emptiness of acm_domains

@@ -1,6 +1,6 @@
locals {
acm_domains = [for domain in var.domains : domain if domain.include_in_acm]
domain_parts = split(".", local.acm_domains[0].domain)
domain_parts = length(local.acm_domains) > 0 ? split(".", local.acm_domains[0].domain) : []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nagagovindarajan, think we don't need a condition here, was this causing any error when testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@santhoshratala Yes it gave error if include_in_acm = false

@nagagovindarajan nagagovindarajan merged commit a8d3102 into main May 8, 2024
6 checks passed
@nagagovindarajan nagagovindarajan deleted the handle-empty-acm_domains branch May 8, 2024 04:00
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