Commit Graph

1689 Commits

Author SHA1 Message Date
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 c9eeb161e0 Add a comment in tests
The purpose of the first test of enable_logging wasn't quite clear.

It's future-proofing against the assumptions made about AWS behavior.
2015-11-21 14:55:08 -07:00
Paul Forman f98dbbb580 Tests and docs for AWS CloudTrail "enable_logging"
Add acceptance tests for creation, enable, and disable logging.

Add option to docs and example.
2015-11-21 00:18:38 -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
Clint cc70d25dc5 Merge pull request #3898 from hashicorp/b-aws-elb-iam-cert-delete
providers/aws: Retry deleting IAM Server Cert on dependency violation
2015-11-20 14:50:18 -06:00
Clint 9edbf6a7fc Merge pull request #3908 from hashicorp/b-elb-cookie-fix
provider/aws: Fix issue with LB Cookie Stickiness and empty expiration period
2015-11-20 14:49:00 -06:00
clint shryock 9eb46c28b2 use a log group resourcE 2015-11-20 13:15:20 -06:00
clint shryock cf5b32617b fix vpn gateway refresh/reattach issue 2015-11-20 11:47:10 -06:00
clint shryock 73475edceb update TestAccAWSFlowLog_subnet to use new cloudwatch resource, not needing env var anymore 2015-11-20 09:39:43 -06:00
clint shryock fe204bb291 error test when env var is not supplied 2015-11-20 09:39:17 -06:00
clint shryock 4d0699b9dd mark snapshots as computed for ElastiCache clusters 2015-11-20 09:39:17 -06:00
clint shryock 01b9af40d1 fix resource name in test 2015-11-19 15:44:40 -06:00
clint shryock 0874347478 update ami id for test 2015-11-19 15:37:05 -06:00
clint shryock fd251e8b45 rename TestAccAWSRoute53Record_weighted to TestAccAWSRoute53Record_weighted_basic to test in isolation 2015-11-18 16:08:23 -06:00
Clint 5024d66f3c Merge pull request #3970 from hashicorp/b-aws-iam-policy-attachfix
providers/aws: Fix typo in error checking for IAM Policy Attachments
2015-11-18 13:57:03 -06:00
clint shryock 5482e98927 Fix typo in error checking for IAM Policy Attachments 2015-11-18 13:48:46 -06:00
Paul Hinze a211fc3469 Merge pull request #3965 from hashicorp/b-aws-sg-rules-v2-race
provider/aws: serialize SG rule access to fix race condition
2015-11-18 12:47:55 -06:00
Paul Hinze 6b6b5a43c3 provider/aws: serialize SG rule access to fix race condition
Because `aws_security_group_rule` resources are an abstraction on top of
Security Groups, they must interact with the AWS Security Group APIs in
a pattern that often results in lots of parallel requests interacting
with the same security group.

We've found that this pattern can trigger race conditions resulting in
inconsistent behavior, including:

 * Rules that report as created but don't actually exist on AWS's side
 * Rules that show up in AWS but don't register as being created
   locally, resulting in follow up attempts to authorize the rule
   failing w/ Duplicate errors

Here, we introduce a per-SG mutex that must be held by any security
group before it is allowed to interact with AWS APIs. This protects the
space between `DescribeSecurityGroup` and `Authorize*` / `Revoke*`
calls, ensuring that no other rules interact with the SG during that
span.

The included test exposes the race by applying a security group with
lots of rules, which based on the dependency graph can all be handled in
parallel. This fails most of the time without the new locking behavior.

I've omitted the mutex from `Read`, since it is only called during the
Refresh walk when no changes are being made, meaning a bunch of parallel
`DescribeSecurityGroup` API calls should be consistent in that case.
2015-11-18 12:39:59 -06:00
Nashwan Azhari da8314ce8a provider/aws: removed build-blocking unused variable. 2015-11-18 15:08:45 +02:00
Radek Simko 306046b82b Merge pull request #3955 from cbusbey/db_subnet_spaces
allow spaces in db subnet name
2015-11-17 22:38:36 +00:00
Clint 0bd8b32637 Merge pull request #3237 from GrayCoder/group-work
provider/aws: add support for group name and path changes with group update function
2015-11-17 16:37:40 -06:00
Chris Busbey 12d51edeb6 allow spaces in db subnet name 2015-11-17 12:48:56 -08:00
Clint 2ed867b5ab Merge pull request #3945 from hashicorp/b-aws-r53-record-zone-fix
provider/aws: Fix crash in Route53 Record if Zone not found
2015-11-17 09:10:50 -06:00
Radek Simko 00d0551933 aws: Add missing dereference operator 2015-11-16 23:19:45 +00:00
clint shryock 1413d032ee provider/aws: Fix crash in Route53 Record if Zone not found 2015-11-16 17:15:17 -06:00
clint shryock 901e5fbf9f fix log reference 2015-11-16 17:14:02 -06:00
clint shryock 8085e55eda fix issue with undefined var 2015-11-16 16:29:52 -06:00
Radek Simko a8ceda1b15 Merge pull request #3914 from TimeIncOSS/b-aws-ecs-service-gone
provider/aws: Prevent crashing when deleting ecs_service which is gone
2015-11-16 21:46:06 +00:00
Radek Simko 5c59bd95cb Merge pull request #3924 from TimeIncOSS/b-aws-ecs-td-computed
provider/aws: Make all fields in ecs_task_definition ForceNew
2015-11-16 15:31:17 +00:00
Rafal Jeczalik 4f25b552bb use single import path for aws-sdk-go 2015-11-16 00:42:08 +01:00
Radek Simko 33ca2a796f Fix typo (Modifier -> Modified) 2015-11-14 12:19:29 +00:00
Radek Simko 308edd6dd7 provider/aws: Make all fields in ecs_task_definition ForceNew
- fixes https://github.com/hashicorp/terraform/issues/2694
2015-11-14 10:36:01 +00:00
Radek Simko aae8fc8494 provider/aws: Add acceptance test for bugfix for #2694 2015-11-14 10:34:17 +00:00
Radek Simko d5ae5ba062 Merge pull request #3910 from hashicorp/phinze/s3-object-homedir-expand
provider/aws: homedir expand in s3 object source
2015-11-14 09:35:09 +00:00
Radek Simko 0822776de0 provider/aws: If ecs_service isn't found during Read, delete it 2015-11-13 21:45:21 +00:00
Radek Simko d9a5de7f7d provider/aws: Prevent crashing when deleting ecs_service which is gone
- fixes https://github.com/hashicorp/terraform/issues/3868
2015-11-13 21:42:29 +00:00
clint shryock 7d94c86958 go fmt structure files 2015-11-13 13:53:52 -06:00
Paul Hinze 44f259bd74 provider/aws: homedir expand in s3 object source
fixes #3856
2015-11-13 11:21:22 -06:00
clint shryock e94fcdb9df add validation for cookie stickiness 2015-11-13 10:46:27 -06:00
clint shryock b81f9a9c52 provider/aws: Fix issue with LB Cookie Stickiness and empty expiration period 2015-11-13 10:34:15 -06:00
James Nugent 839fc5bfee Merge pull request #3900 from Banno/fix-aws-route53-record-failover-weight
provider/aws: fix for creating failover route53 records
2015-11-12 16:56:59 -06:00
clint shryock 6fa69ede1c add debugging statements to add/remove listeners 2015-11-12 16:20:54 -06:00
Luke Amdor 10ca0559ae provider/aws: no weight for all set_identifier 2015-11-12 16:15:05 -06:00
clint shryock c60a963908 providers/aws: Retry deleting IAM Server Cert on dependency violation
This will retry deleting a server cert
if it throws an error about being in use with an ELB (that we've likely just
  deleted)

Includes test for ELB+IAM SSL cert bug dependency violation
2015-11-12 16:07:34 -06:00
clint shryock 5cafe740ff update wording on ssl cert error 2015-11-12 14:25:50 -06:00
clint shryock 1b2e068b19 add extra test block 2015-11-12 14:25:50 -06:00
clint shryock fddafd2b96 providers/aws: Document and validate ELB ssl_cert and protocol requirements 2015-11-12 14:25:50 -06:00
Clint dcf40661c8 Merge pull request #3863 from hashicorp/b-aws-elb-access-fix
providers/aws: Fix issue with removing access_logs from ELB
2015-11-12 14:24:58 -06:00
clint shryock 12d2ae1438 patch TestExpandElasticacheParameters test 2015-11-12 10:45:49 -06:00
clint shryock e7e52ed98f Correct test method names so that they are ran 2015-11-12 10:36:22 -06:00