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

Fix/count #33

Merged
merged 10 commits into from
Feb 19, 2024
Merged

Fix/count #33

merged 10 commits into from
Feb 19, 2024

Conversation

Rupalgw
Copy link
Contributor

@Rupalgw Rupalgw commented Feb 15, 2024

what

  • Test each module when the enable variable is true.
  • Deploy the module, then set the enable variable to false, ensuring all resources are destroyed without errors.

why

  • the changes being made due to error in count condition

@Rupalgw Rupalgw added the enhancement New feature or request label Feb 15, 2024
@Rupalgw Rupalgw self-assigned this Feb 15, 2024
outputs.tf Outdated
description = "The Route Table ID."
}

output "route_table_associated_subnets" {
value = var.enable && var.enable_route_table ? azurerm_route_table.rt[*].subnets : null
value = try(var.enable && var.enable_route_table ? azurerm_route_table.rt[*].subnets : null, null)
Copy link
Member

Choose a reason for hiding this comment

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

Either use try function or use condition, but use any one of them, not both.

outputs.tf Outdated
description = "The Route Table ID."
}

output "route_table_associated_subnets" {
value = var.enable && var.enable_route_table ? azurerm_route_table.rt[*].subnets : null
value = var.enable && var.enable_route_table ? azurerm_route_table.rt[0].subnets : null
Copy link
Member

Choose a reason for hiding this comment

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

Replace [0] with [*] , pls confirm also before committing.

@13archit 13archit merged commit c47b15d into master Feb 19, 2024
23 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/count branch February 19, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants