-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: aws_codedeploy_deployment_group
Panics when setting on_premises_instance_tag_filter
#6617
Conversation
588a08a
to
c082c12
Compare
aws_codedeploy_deployment_group
Panics when setting on_premises_instance_tag_filter
aws_codedeploy_deployment_group
Panics when setting on_premises_instance_tag_filter
c082c12
to
251c7aa
Compare
l["value"] = *tf.Value | ||
} | ||
if *tf.Type != "" { | ||
if tf.Type != nil && *tf.Type != "" { | ||
l["type"] = *tf.Type | ||
} | ||
result = append(result, l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this gonna append an empty map if tf is nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a range across the list - therefore if there is nothing in the list then it won't even try and evaluate it. I am running all the tests now to see if this works as expected
251c7aa
to
ca0e20c
Compare
`on_premises_instance_tag_filter` When setting `on_premises_instance_tag_filter`, Terraform was not pushing the changes on the cReate (due to a spelling mistake). A second apply would push the tags and then cause a panic. Terraform was building a ec2.Tagfilter struct without checking for optional values. When the TagFilter was being dereferenced, it caused a panic
ca0e20c
to
12d2206
Compare
aws_codedeploy_deployment_group
Panics when setting on_premises_instance_tag_filter
aws_codedeploy_deployment_group
Panics when setting on_premises_instance_tag_filter
This LGTM pending travis. |
I just tryed this and it created the tags on first run but it failed:
|
@jdextraze What config did you try? I have added an acceptance test that passes and used your config from the issue and both pass |
My TF plan looks as follows:
Then the apply looks as follows:
Then Terraform refresh to check the state shows as follows:
This all looks to work here |
@jdextraze OK, now I'm uber curious as to what the EOF bug is. How and what did you build and were there any other errors? P. |
@stack72 Sorry it works. Had to clean my state first and was not using full changes. Great work man 👍 |
Spot on! Glad that's working :) thanks for letting me know |
…ashicorp#6617) `on_premises_instance_tag_filter` When setting `on_premises_instance_tag_filter`, Terraform was not pushing the changes on the cReate (due to a spelling mistake). A second apply would push the tags and then cause a panic. Terraform was building a ec2.Tagfilter struct without checking for optional values. When the TagFilter was being dereferenced, it caused a panic
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. |
Fixes #6593
When setting
on_premises_instance_tag_filter
, Terraform was notpushing the changes on the cReate (due to a spelling mistake). A second
apply would push the tags and then cause a panic. Terraform was building
a ec2.Tagfilter struct without checking for optional values. When the
TagFilter was being dereferenced, it caused a panic
Basic and new test not affected (to prove with and without this on_premises_tag`