-
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: Stop aws_instance
source_dest_check
triggering an API call on each terraform run
#8450
Conversation
…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
Initial config gave this:
Adding
|
Oh well done. LGTM. |
…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. |
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:
No longer caused any Modifying source_dest_check entries in the LOG
I'd like to leave this out of 0.7.2 so that we get a couple of acceptance test runs on this change!