-
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: source_dest_check is causes ModifyInstanceAttribute every run #3550
Comments
…PI call on each terraform run Fixes #3550 The simple fix here was to check if the Resource was new (to set the value the first time) then check it has changed each time I was able to see from the TF log the following: ``` Config resource "aws_vpc" "foo" { cidr_block = "10.10.0.0/16" } resource "aws_subnet" "foo" { cidr_block = "10.10.1.0/24" vpc_id = "${aws_vpc.foo.id}" } resource "aws_instance" "foo" { ami = "ami-4fccb37f" instance_type = "m1.small" subnet_id = "${aws_subnet.foo.id}" source_dest_check = false disable_api_termination = true } ``` No longer caused any Modifying source_dest_check entries in the LOG
Hi @dwradcliffe I just opened a PR that seems to solve your issue - I think I want this to soak in our acceptance testing framework for a few days before merging it. If you are able to build Terraform from source and test it out for solving your issue then that would be even easier ;) Thanks Paul |
…PI call on each (#8450) terraform run Fixes #3550 The simple fix here was to check if the Resource was new (to set the value the first time) then check it has changed each time I was able to see from the TF log the following: ``` Config resource "aws_vpc" "foo" { cidr_block = "10.10.0.0/16" } resource "aws_subnet" "foo" { cidr_block = "10.10.1.0/24" vpc_id = "${aws_vpc.foo.id}" } resource "aws_instance" "foo" { ami = "ami-4fccb37f" instance_type = "m1.small" subnet_id = "${aws_subnet.foo.id}" source_dest_check = false disable_api_termination = true } ``` No longer caused any Modifying source_dest_check entries in the LOG
…PI call on each (hashicorp#8450) terraform run Fixes hashicorp#3550 The simple fix here was to check if the Resource was new (to set the value the first time) then check it has changed each time I was able to see from the TF log the following: ``` Config resource "aws_vpc" "foo" { cidr_block = "10.10.0.0/16" } resource "aws_subnet" "foo" { cidr_block = "10.10.1.0/24" vpc_id = "${aws_vpc.foo.id}" } resource "aws_instance" "foo" { ami = "ami-4fccb37f" instance_type = "m1.small" subnet_id = "${aws_subnet.foo.id}" source_dest_check = false disable_api_termination = true } ``` No longer caused any Modifying source_dest_check entries in the LOG
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. |
This is a follow up from #3384
Unfortunately the solution for the source_dest_check issue causes terraform to make a ModifyInstanceAttribute call for every single instance, every single time. Even if the source_dest_check is already set and doesn't need to change, and doesn't show in the diff. My cloudtrail log should not show ModifyInstanceAttribute when I change something else for an instance (e.g. tags or monitoring).
@phinze
The text was updated successfully, but these errors were encountered: