terraform/builtin
Paul Stack 338aab9169 provider/aws: Stop `aws_instance` `source_dest_check` triggering an API 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
2016-08-25 22:11:01 +01:00
..
bins Implement archive provider and "archive_file" resource. (#7322) 2016-08-08 12:56:44 +12:00
providers provider/aws: Stop `aws_instance` `source_dest_check` triggering an API call on each (#8450) 2016-08-25 22:11:01 +01:00
provisioners Make using `ssl_verify_mode` more robust (#7769) 2016-07-22 16:01:48 +02:00