-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_elb does not have attribute "name" when optional parameter not provided #2498
Comments
We do correctly |
It looks like it may be related to this commit: 33df43fb. Reverting this commit allowed the name property to be properly resolved, for me. I haven't had a chance to dig into why this commit would affect computed name resolution. |
I ran into this today. Lost a good few hours debugging. Thanks to @thatderek for finding this issue. When running
The terraform we have used
Adding just |
Hope it's not out of order too much to @ @apparentlymart as I think he was the one to review the original code. Also, I've confirmed that the problem affects versions 1.3 and above (forcing a provider version of 1.2.0 seems to work though). |
Hi @lwcbiking et al! Sorry for this weird behavior. Indeed it does seem like this was an intended casualty of that |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Terraform Version
Terraform v0.11.0
Affected Resource(s)
Terraform Configuration Files
Terraform Error
terraform plan
Error: Error running plan: 1 error(s) occurred:
aws_cloudwatch_metric_alarm.elb_unhealthy_instance_count: 1 error(s) occurred:
aws_cloudwatch_metric_alarm.elb_unhealthy_instance_count: Resource 'aws_elb.elb' does not have attribute 'name' for variable 'aws_elb.elb.name'
Expected Behavior
I expect the AWS CloudWatch Metric Alarm to be created for the ELB that was provided.
Actual Behavior
Terraform plan errors because of attribute "name" on the aws_elb, which should be automatically defined by Terraform. This same error is generated when "name_prefix" is provided with aws_elb.
The only time this succeeds, is when "name" is provided on the aws_elb.
Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: