Commit Graph

12 Commits

Author SHA1 Message Date
Ninir 5481e9ecb3 provider/aws: Enforced kms_key_* attributes to be ARNs (#10356)
* Added kms_key_* validation to force ARNs

* Added Redshift Cluster KMS key test

* Added cloudtrail kms key test

* Added EBS volume kms key

* Added Elastic Transcoder Pipeline kms key arn test
2016-11-30 13:50:26 +02:00
Radek Simko 302982c335 provider/aws: Remove unsafe ptr dereferencing [A-C]* (#8519) 2016-08-28 19:25:30 +01:00
stack72 b2f0b2c912 provider/aws: Support Import for `aws_cloudtrail`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSCloudTrail_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudTrail_
-timeout 120m
=== RUN   TestAccAWSCloudTrail_importBasic
--- PASS: TestAccAWSCloudTrail_importBasic (64.64s)
=== RUN   TestAccAWSCloudTrail_basic
--- PASS: TestAccAWSCloudTrail_basic (97.96s)
=== RUN   TestAccAWSCloudTrail_enable_logging
--- PASS: TestAccAWSCloudTrail_enable_logging (137.07s)
=== RUN   TestAccAWSCloudTrail_is_multi_region
--- PASS: TestAccAWSCloudTrail_is_multi_region (138.51s)
=== RUN   TestAccAWSCloudTrail_logValidation
--- PASS: TestAccAWSCloudTrail_logValidation (102.61s)
=== RUN   TestAccAWSCloudTrail_tags
--- PASS: TestAccAWSCloudTrail_tags (135.66s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    676.484s
```
2016-06-23 10:18:24 +01:00
Clint 6f4dc98354 provider/aws: Remove CloudTrail Trail from state if not found 2016-04-05 14:04:00 -05:00
Radek Simko fb0838ce1b provider/aws: Add support for CloudTrail tags 2016-02-15 14:10:19 +00:00
Radek Simko 531e60047b provider/aws: Add support for CloudTrail log validation + KMS encryption 2016-02-08 11:51:25 +00:00
Maxime Bury eaacf5c618 Add multi-region option to cloudtrail 2016-02-05 13:15:05 -05:00
Paul Forman 52aad04930 Mistake in type refactor in cloudTrailGetLoggingStatus
When adjusting the types to prevent casting, I didn't change the error
message to handle the pointer change.  "go tool vet" caught this.
2015-11-22 13:23:08 -07:00
Paul Forman 9cec40ea3c Add missing error-checks from code review
Some error-checking was omitted.

Specifically, the cloudTrailSetLogging call in the Create function was
ignoring the return and cloudTrailGetLoggingStatus could crash on a
nil-dereference during the return.  Fixed both.

Fixed some needless casting in cloudTrailGetLoggingStatus.
Clarified error message in acceptance tests.
Removed needless option from example in docs.
2015-11-22 12:54:11 -07:00
Paul Forman 484887c0c5 Change default for logging in CloudTrail to true
The default for `enable_logging`, which defines whether CloudTrail
actually logs events was originally written as defaulting to `false`,
since that's how AWS creates trails.

`true` is likely a better default for Terraform users.

Changed the default and updated the docs.
Changed the acceptance tests to verify new default behavior.
2015-11-22 10:47:23 -07:00
Paul Forman 52db098292 Add enable_logging to AWS CloudTrail
The AWS CloudTrail resource is capable of creating CloudTrail resources,
but AWS defaults the actual logging of the trails to `false`, and
Terraform has no method to enable or monitor the status of logging.

CloudTrail trails that are inactive aren't very useful, and it's a
surprise to discover they aren't logging on creation.

Added an `enable_logging` parameter to resource_aws_cloudtrail to enable
logging.  This requires some extra API calls, which are wrapped in new
internal functions.

For compatibility with AWS, the default of `enable_logging` is set to
`false`.
2015-11-21 00:18:38 -07:00
Radek Simko a618b048cf aws: Add support for aws_cloudtrail 2015-10-28 17:13:14 +00:00