-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Invalid count argument #10
Comments
This code does not contain references to resources, but only to data-sources and static vars, so it is strange that you get this error. From this, it looks that |
When I ran this code, the values were :
which should result in
and I still get the same message Then I clear my .terraform folder and did a terraform init && terraform plan Thanks for looking at it 👍 |
I also got the same issue. I'm in the process of upgrading to terraform 0.12 and hit this.
Code:
and get the same error:
Cleaning up the |
Try this code:
|
@antonbabenko thanks. I tried that before but it would force the recreation of the cert:
Is that the only way? To recreate it? |
Yes, this is the easiest way. You can optionally try to taint |
Could we reopen this? I'm running into the same issue. It happens when |
Same issue here, occurring while invoking the module from Atlantis ecs module (same author), with no existing ACM cert specified so one is expected to be created |
@waeltken @mbravorus Please provide an exact snippet of the code you are using. It is pretty much impossible for me to guess where the problem is without trying to run it myself and see the problem. I run examples (see https://github.com/terraform-aws-modules/terraform-aws-acm/blob/master/examples/complete-dns-validation/main.tf) as they are now and with an empty The problems can be when a wildcard is specified in |
I've made a small improvement when trying to access non-existing element, which may be related to the initial issue. Released v2.2.0. |
Thank you! Will test ASAP. I included a more detailed code snippet for the original problem in my comment here - terraform-aws-modules/terraform-aws-atlantis#61 |
Just looking at the diff, I doubt it will fix the issue though - if I understand correctly, the whole issue is that terraform bails out on line 30 because it can't calculate Pure speculation though, I will test and report back as soon as I can |
You are absolutely right, the change I made half hour ago won't fix the initial problem but fix not-yet-reported issue. |
Same error message as in terraform-aws-modules/terraform-aws-acm#10. This change enables the cluster to be destroyed in one go.
Yupp, I encountered the same issue. I also added the wildcard name to SAN and now it works:
Only problem is that I cannot refactor like this, since it wants to generate a new certificate now that has SAN, while I only need a single wildcard cert without SAN. |
Would something like this fix it?
I'm not using any wildcard SANs, so I haven't been in a position to validate whether it works as intended, but this is what I'm doing currently to avoid issues with the template resource. Please let me know if not - I'm still trying to wrap my head around HCL. |
Having the same issue after upgrading from Terraform 0.11.x to 0.12.6 and subsequently upgrading this module. My configuration:
|
Having the same issue. My code:
|
- Also added an explicit dependency for the route 53 record - Between the two it fixed terraform-aws-modules#10 for me
- Also added an explicit dependency for the route 53 record - Between the two it fixed #10 for me
v2.3.0 has been released, and hopefully, it will fix this problem for everyone. |
I have a new one that I'm not sure belongs here, but I'll ask anyway. I am doing something very specific where I am autogenerating a subdomain based on the terraform random-pet resource. The code would look like this: resource "random_pet" "this" { module "acm" { zone_id = "${aws_route53_zone.class.zone_id}" domain_name = ".${random-pet.this.id}.example.com" wait_for_validation = true I'm just curious if there is a way to tell terraform to do this ahead of checking for this. It does work if I run an apply first generate all the domains and then add the ACM. I'm just not sure if I can link these two things together. |
Was this issue fixed or not? It is very similar to the issue The "for_each" value depends on resource attributes that cannot be determined until apply #59 in module route53/records Code
Error
If |
I am having this exact problem as provided by mbravorus above:
here is my snippet
Do I have to enter the actual domain name rather than pull this from the AWS record I am creating? Is there a way to ensure that the certificate is created after the DNS record and that that record is available to the module? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi all,
I'm using Terraform v0.12.1 and I get this error when trying to plan my manifest. I do no see where "count" uses resources which needs to be deployed first.
Here is how I invoke the module
Thanks !
The text was updated successfully, but these errors were encountered: