Closed Magicloud closed 4 years ago
Is there a way to use this without a targeted apply? I'm running into this situation that I think is stemming from the changes in the PR:
count = local.udp * local.by_src_sg
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.
Is there a way to use this without a targeted apply? I'm running into this situation that I think is stemming from the changes in the PR:
count = local.udp * local.by_src_sg 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.
I feel like this is a dep issue. I got this while destroying resources again. The source SG was gone (and this rule), but TF says it cannot calculate the count.
The reason I do it this way is that, source_security_group
and cidr_blocks
cannot be set at the same time, even one is an empty value.
@ketzacoatl Do you have any better idea? If not, I'd have to cancel this change.
@Magicloud please update the above, TY!
Updated new design. Tested in PR https://github.com/fpco/terraform-aws-foundation/pull/304.
name: Pull request template about: Make a PR to terraform-aws-foundation
Please include the following in your PR:
Please also note that these are not hard requirements, but merely serve to define what maintainers are looking for in PR's. Including these will more likely lead to your PR being reviewed and accepted.
modules
this would entail example code for how to use the module or some explanation in the module readme.