Commit Graph

5 Commits

Author SHA1 Message Date
Radek Simko 668a09aa00
provider/aws: Add diff suppression & validation for OpenID URL 2017-04-07 22:15:35 +01:00
Jack Bruno 6c0caaf1dd Fix aws_dms_replication_task diff for json with whitespace. (#12380) 2017-03-07 16:00:02 +02:00
Jake Champlin 64f75ff0f9
provider/aws: Fix Diff Suppress function for aws_db_instance
Introduced in #11369, this fixes an issue with the diff suppress function when creating a new `aws_db_instance` resource, while using the default `engine_version`.

```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBInstance_diffSuppressInitialState'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/13 11:52:12 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBInstance_diffSuppressInitialState -timeout 120m
=== RUN   TestAccAWSDBInstance_diffSuppressInitialState
--- PASS: TestAccAWSDBInstance_diffSuppressInitialState (480.78s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    480.793s
```
2017-02-13 12:26:06 -05:00
Jake Champlin 4e7ccc35a3
provider/aws: Add diff suppress function for aws_db_instance
Adds a diff suppress function for the `engine_version` attribute of the `db_instance` AWS resource.

The function only supresses the state diff, if the attribute key `auto_minor_version_upgrade` is set, and if the returned `engine_version` from the running RDS instance shares the same prefix as the configured `engine_version`.

 ```
 $ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBInstance_MinorVersion'
 ==> Checking that code complies with gofmt requirements...
 go generate $(go list ./... | grep -v /terraform/vendor/)
 2017/01/23 17:59:14 Generated command/internal_plugin_list.go
 TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBInstance_MinorVersion -timeout 120m
 === RUN   TestAccAWSDBInstance_MinorVersion
 --- PASS: TestAccAWSDBInstance_MinorVersion (503.48s)
 PASS
 ok      github.com/hashicorp/terraform/builtin/providers/aws    503.518s
 ```
2017-01-23 18:12:34 -05:00
James Nugent 93f31fce17 provider/aws: Add aws_s3_bucket_policy resource
This commit adds a new "attachment" style resource for setting the
policy of an AWS S3 bucket. This is desirable such that the ARN of the
bucket can be referenced in an IAM Policy Document.

In addition, we now suppress diffs on the (now-computed) policy in the
S3 bucket for structurally equivalent policies, which prevents flapping
because of whitespace and map ordering changes made by the S3 endpoint.
2016-09-02 09:07:54 -07:00