-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Syntax error when calculating count value #4334
Comments
Hi @conorgil! Thanks for opening this issue - this looks like a bug to me. I have two further questions to be able to reproduce this:
|
Hi @conorgil I just had a go at reproducing this, but everything seems to be working when I try out your gist. I filled in some dummy values for your variables like so: variable "vpc_id" {
description = "The id of the VPC"
default = "vpc-abc123"
}
variable "vpc_cidr" {
description = "The CIDR block of the VPC"
default = "10.0.1.0/24"
}
variable "vpc_route_table_ids" {
description = "A comma separated string of the IDs of the route tables in the VPC which should be updated to have a route for the VPC peering connection."
default = "rtb-abc123,rtb-def-456"
}
variable "peer_vpc_id" {
description = "The CIDR block of the peer VPC."
default = "vpc-cde234"
}
variable "peer_vpc_route_table_ids" {
description = "A comma separated string of the IDs of the route tables in the peer VPC which should be updated to have a route for the VPC peering connection."
default = "rtb-ghi678,rtb-jkl789"
}
variable "peer_vpc_cidr" {
description = "The CIDR block of the peer VPC."
default = "10.0.2.0/24"
}
variable "peer_owner_id" {
description = "The AWS account ID which owns the peer VPC."
default = "9724397343"
} And my Terraform v0.6.8 produces a sane looking plan:
Do you see anything I might be missing here? If you fill in those same defaults do you get the same error? |
@phinze I just tried your sample and it did indeed successfully produce a plan for me too. I'm trying to reproduce the error in a small generic example. I'll report back after some tinkering. |
In case it adds context, when I was calling the
Initially, I thought that there might be a problem if the My workaround was to modify the |
@conorgil ah yes, that additional context helped. It is a limitation of You should be getting an error something like this:
We can look into why that error message isn't showing up here. As for the feature to expand the capability of |
@phinze Dang. I was afraid of that :( I think you're referring to #953, which I am also eagerly watching. I'll throw a party once the Thanks for the prompt replies on this issue. Getting the error message updated would have made this much easier for me to blame on #953. |
+1 On this, randomly getting this error but if I keep running the command eventually it will accept it. |
Seeing the |
Sometimes I get same error on Jenkins CI |
This seems to be fixed with 0.7.x. Specifically the I tried with null resources to ease repro:
I did the following:
All worked as expected. If you can get a repro still please open a new issue. Thanks! |
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. |
I am creating a module to setup VPC peering between any two given VPCs. The module defines the following:
When I run
terraform plan
, I get the following error:I cannot for the life of me figure out the syntax error (if there even is one). I checked the Interpolation docs and as far as I can tell, it follows the examples.
Is this just a problem because of
count
and a very poor error message? Any advice appreciated! Thanks.The text was updated successfully, but these errors were encountered: