Skip to content
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

Closed
dwradcliffe opened this issue Oct 19, 2015 · 2 comments · Fixed by #8450
Closed

provider/aws: source_dest_check is causes ModifyInstanceAttribute every run #3550

dwradcliffe opened this issue Oct 19, 2015 · 2 comments · Fixed by #8450
Assignees

Comments

@dwradcliffe
Copy link
Contributor

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

stack72 added a commit that referenced this issue Aug 24, 2016
…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
@stack72
Copy link
Contributor

stack72 commented Aug 24, 2016

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

@stack72 stack72 self-assigned this Aug 24, 2016
stack72 added a commit that referenced this issue Aug 25, 2016
…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
richardbowden pushed a commit to richardbowden/terraform that referenced this issue Aug 27, 2016
…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
@ghost
Copy link

ghost commented Apr 22, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants