Commit Graph

2519 Commits

Author SHA1 Message Date
Paul Stack af29a61748 provider/aws: Change `aws_elastic_ip_association` to have computed parameters (#6552)
* New top level AWS resource aws_eip_association

* Add documentation for aws_eip_association

* Add tests for aws_eip_association

* provider/aws: Change `aws_elastic_ip_association` to have computed
parameters

The AWS API was send ing more parameters than we had set. Therefore,
Terraform was showing constant changes when plans were being formed
2016-05-09 18:40:45 +01:00
clint shryock f8d59b9e97 provider/aws: Update paramter for DB Option Group 2016-05-09 12:16:26 -05:00
Clint 4d66f1ca94 provider/aws: Opsworks Agent has a default, needs to be computed (#6555) 2016-05-09 11:26:16 -05:00
James Nugent affd2b3f3b Merge pull request #6505 from hashicorp/b-cloudfront-cookies
provider/aws: Require cookies for Cloudfront Distributions
2016-05-08 19:45:37 -04:00
Chris Marchesi 84cd31cece provider/aws: Add CloudFront hosted_zone_id attribute (#6530)
Added the hosted_zone_id attribute, which aliases to the Route 53
zone ID that can be used to route Alias Resource Record Sets to.

This fixes hashicorp/terraform#6489.
2016-05-09 00:40:30 +01:00
James Nugent a4f30133df Merge pull request #6539 from hashicorp/aws-cloudtrail-test-updates
provider/aws: CloudTrail tests were failing as the names were not unique per test run
2016-05-08 19:35:59 -04:00
James Nugent 5366fabad1 Merge pull request #4401 from stack72/aws-rds-option-groups
provider/aws: aws_db_option_group
2016-05-08 19:34:15 -04:00
Paul Stack 526aadd0ea Update resource_aws_db_option_group.go 2016-05-09 00:33:48 +01:00
stack72 8dc123fd94 Scaffold the AWS DB Option Group resource
Change the AWS DB Instance to now include the DB Option Group param. Adds a test to prove that it works

Add acceptance tests for the AWS DB Option Group work. This ensures that Options can be added and updated

Documentation for the AWS DB Option resource
2016-05-08 20:18:53 +01:00
Paul Stack dc30bd29fc provider/aws: Redshift Cluster not allowing 0 for (#6537)
automated_snapshot_retention_period

The default value for `automated_snapshot_retention_period` is 1.
Therefore, it can be included in the `CreateClusterInput` without
needing to check that it is set.

This was actually stopping people from setting the value to 0 (disabling
the snapshots) as there is an issue in `d.GetOk()` evaluating 0 for int
2016-05-08 19:29:36 +01:00
stack72 1937d0fb6a provider/aws: CloudTrail tests were failing as the names were not unique
per test run
2016-05-08 19:08:58 +01:00
Clint 99e0aec769 provider/aws: Fix issue changing EIP Association (#6521)
provider/aws: Update EIP to use new associate_with_private_ip instead of private_ip
2016-05-06 15:38:39 -05:00
KOJIMA Kazunori 2476dcbcae provider/aws: Fix typo in error message (#6518) 2016-05-06 09:57:04 -05:00
Justin Clark 380ada1019 provider/aws: Add agent_version argument to AWS_OPSWORKS_STACK 2016-05-05 22:56:44 +01:00
clint shryock 8129c0589c provider/aws: Require cookies for Cloudfront Distributions 2016-05-05 15:44:35 -05:00
Greg Thole ebfc701265 provider/aws: AWS API Gateway request parameters json (#6501)
* Update docs with new parameters

* Add request parameters as JSON

* Update function name and error statements
2016-05-05 21:14:51 +01:00
Radek Simko e32a8c1c5b Merge pull request #6385 from Ticketmaster/use-sts-GetCallerIdentity
provider/aws: Added sts:GetCallerIdentity to GetAccountId for federated logins
2016-05-05 17:35:32 +01:00
Clint c58892485b provider/aws: Allow empty S3 config in Cloudfront Origin (#6487)
* provider/aws: Allow empty S3 config in Cloudfront Origin
2016-05-05 10:49:09 -05:00
Clint 068f6f606d provider/aws: Fix issue in upgrading AutoScaling Policy (#6440)
* provider/aws: Fix issue in upgrading AutoScaling Policy min_adjustment_steps

- Update depreciation message on min_adjustment_step
2016-05-05 10:17:54 -05:00
Kraig Amador a23bcf2ec9 Added accountid to AWSClient and set it early in the initialization phase. We use iam.GetUser(nil) scattered around to get the account id, but this isn't the most reliable method. GetAccountId now uses one more method (sts:GetCallerIdentity) to get the account id, this works with federated users. 2016-05-05 07:02:12 -07:00
Blake Smith 8821aea945 provider/aws: Add AWS EMR dependency (#2098) (#6492) 2016-05-05 11:34:18 +01:00
Kraig Amador 1f80ec48d0 Added RDS event subscriptions (#6367) 2016-05-05 11:14:25 +01:00
Justin Nauman 1c691dcc68 provider/aws: Updating CloudFront distribution to set LoggingConfig if disabled (#6407)
- Addresses the issue when local state file has logging_config populated and the user
  disables the configuration via the UI (or in this case an
  application of the TF config).  This will now properly set the
  logging_config during the read operation and identify the state as
  diverging

Fixes #6390
2016-05-04 14:06:45 -05:00
Josh Taylor 983da213af provider/aws: add response parameters support to api gateway (#6344)
* provider/aws: Add support for response parameters aws_api_gateway_integration_response and aws_api_gateway_method response.

* fix spacing

* fix spacing

* gofmt

* add update test; add docs; add reimplement TODO; add field read

* resolve conflict

* fix expandAPIGatewayMethodResponse error handling
2016-05-04 11:56:18 +01:00
Justin Nauman 7f738bebd3 provider/aws: Support eventually consistent aws_security_group_rule (#6325)
* TF-6256 - SG Rule Retry

- Preferring slower but consistent runs when AWS API calls do not properly return the SG Rule in the list of ingress/egress rules.
- Testing has shown that several times that we had to exceed 20 attempts
before the SG was actually returned

* TF-6256 - Refactor of rule lookup

- Adjusting to use resource.Retry
- Extract lookup method for matching ipPermissions set
2016-05-03 17:21:04 -05:00
Sargurunathan Mohan a5825f907b Fix launch_configuration error when using ebs which is encrypted 2016-05-03 16:19:54 -05:00
Clint d5f0fc22fd provider/aws: Improve error handling in IAM Server Certificates (#6442)
* provider/aws: Improve error handling in IAM Server Certificates

* rename test, add additional empty check
2016-05-02 15:36:50 -05:00
Clint c2f7a0cc60 provider/aws: Fix issue replacing Network ACL Relationship if Subnet has already (#6421) 2016-05-02 09:45:11 -05:00
James Nugent aba5049bcd Merge pull request #6403 from Ticketmaster/BROKEN_MASTER
Fixing the broken Test with Master branch
2016-04-29 17:36:07 -05:00
James Nugent 0f3237a91b Merge pull request #6383 from Ticketmaster/aws-tests-with-token
Allow running tests when AWS_PROFILE is set, needed for STS users
2016-04-29 13:26:07 -05:00
Andy Chan cd69404fbc Fixing the broken test 2016-04-29 10:11:42 -07:00
Paul Stack a9b738f00c provider/aws: Removal of duplicate error handling code in cloudwatch_log_group
cloudwatch_log_group
2016-04-28 13:12:47 +01:00
Paul Stack c12a31e1b0 provider/aws: Fix Read of AWS CloudWatch Log when Update was called (#6384)
Fixes #6169

The Update func was hitting a return err and when the err was empty, it
was skipping over the subsequent read func
2016-04-28 00:02:33 +01:00
Justin Nauman 495c4b3dbc provider/aws - CloudFront custom_error_response fixes for missing (#6382)
* provider/aws - CloudFront custom_error_response fixes for missing

- Omit custom_error_response response_* fields when not explicitly set via config for
SDK call
- Adding a test case to ensure that the response_error gets converted
to an empty string properly, versus "0". (Thanks @vancluever)

Fixes #6342

* - Fixing ACC test case resource names
2016-04-28 00:00:21 +01:00
Kraig Amador dd77bf68da Fixed up some confusion between AWS_TOKEN and AWS_PROFILE. Also allowing testing when AWS_PROFILE is set without AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID. 2016-04-27 14:18:20 -07:00
Paul Stack ee3d89a4cd provider/aws: refresh state on SQS Queue not found (#6381)
When an SQS queue was deleted from the AWS Console, an error was thrown
to say that the Queue could not be found. This is now fixed to remove
the queue from the state on a specific not found exception
2016-04-27 20:07:34 +01:00
Radek Simko 0a8ea049ef Merge pull request #5030 from TimeIncOSS/account_check
provider/aws: Allow account ID checks on EC2 instances & w/ federated accounts
2016-04-27 21:07:15 +02:00
Radek Simko 7642fa05a8 Merge pull request #5893 from TimeIncOSS/b-aws-api-gateway-fields
provider/aws: Respect 'selection_pattern' in api_gateway_integration_response
2016-04-27 20:46:29 +02:00
Paul Hinze de13281ee6 provider/aws: fix potential aws_route crash (#6338)
The "find route in table" helper code was not properly handling routes
with no destination CIDR block - like vpc_endpoint routes - so if one of
those routes would come up before the target route in the loop, we'd get
a crash.

Fixes #6337
2016-04-27 13:10:40 +01:00
Mike Ball 02bbe18635 comment grammar/spelling fix (#6373) 2016-04-27 13:10:05 +01:00
Radek Simko e3ade6a784 provider/aws: Add support for api_gateway_account (#6321) 2016-04-27 13:08:59 +01:00
Colin Hebert f1f602cdf6 aws: Enable account ID check for assumed roles + EC2 instances 2016-04-27 12:56:03 +02:00
Radek Simko d9f327c282 provider/aws: Read aws_api_gateway_integration_response fields back 2016-04-27 11:45:52 +02:00
Radek Simko 70242c2e6d provider/aws: Respect 'selection_pattern' in api_gateway_integration_response
- Fixes https://github.com/hashicorp/terraform/issues/5891
2016-04-27 11:45:52 +02:00
Radek Simko 5210e1127e provider/aws: Add regression test for #5891 2016-04-27 11:35:01 +02:00
David Harris 635fced8b4 provider/aws: Fixes issue where an update for an `aws_elastic_beanstalk_environment ` resource would ignore the `wait_for_ready_timeout` option. 2016-04-26 22:05:20 +01:00
David Harris 9ab2447b0b provider/aws: Elastic Beanstalk Environment update configuration template name changes (#6342)
* Updated `aws_elastic_beanstalk_environment` to update environment when the `template_name` attribute has a change. Consildated update functions to use a single update call and added state change conf to wait until environment is in a "Ready" state.

* Adding tests for `aws_elastic_beanstalk_configuration_template` use with the `aws_elastic_beanstalk_environment` resource.

* Verifies option settings from an `aws_elastic_beanstalk_configuration_template` resource are applied to the associated `aws_elastic_beanstalk_environment` resource
* Verifies updated name of an `aws_elastic_beanstalk_configuration_template` resource triggers an update for the associated `aws_elastic_beanstalk_environment` resource
* Verifies that option settings set in the `aws_elastic_beanstalk_environment` resource override settings in the `aws_elastic_beanstalk_configuration_template` resource
2016-04-26 11:15:46 +01:00
Paul Stack 2d2c0b2068 provider/aws: Fix `aws_redshift_cluster` number_of_nodes update (#6333)
Currently, the number of nodes was broken due to not passing the
node_type with the update. This PR adds the correct parameters and a
test to prove this works as expected
2016-04-25 23:00:57 +01:00
Paul Stack 5f874c9487 provider/aws: Extends the `aws_elasticache_cluster` validation (#6332)
The validation as part of #6330 was only for length. This PR adds the
rules for alphanumeric, not having -- within, not ending with a - and
that the id must start with a letter.

The PR also adds tests for these rules
2016-04-25 21:44:55 +01:00
lian a443144c89 provider-aws: validate cluster_id length for aws_elasticache_cluster (#6330) 2016-04-25 20:53:31 +01:00
clint shryock e138a0756b provider/aws: Use ID in lookup for AWS KMS Aliases 2016-04-25 10:54:26 -05:00
Radek Simko d31a6ac47f provider/aws: Add support for api_gateway_authorizer (#6320) 2016-04-25 12:22:37 +01:00
clint shryock 6cfb6c11b1 provider/aws: Use KMS ARN in S3 Bucket test 2016-04-22 15:10:34 -05:00
Clint 8f90078cd5 Merge pull request #6307 from hashicorp/b-aws-beanstalk-options-set-fix
provider/aws: Fix issue updating ElasticBeanstalk Configuraiton Templates
2016-04-22 12:07:06 -05:00
clint shryock 53988df7d1 provider/aws: Fix issue updating ElasticBeanstalk Configuraiton Templates 2016-04-22 12:06:40 -05:00
Mitchell Hashimoto d85df63526
providers/aws: aws_instance id-only 2016-04-22 09:37:41 -07:00
Cameron Stokes a7c24835d7 provider/aws: increase timeout for aws_redshift_cluster (#6305)
* provider/aws: increase timeout for aws_redshift_cluster

* provider/aws: increase timeout for redshift updates too
2016-04-22 10:42:22 -05:00
Mitchell Hashimoto dd402a3ba1
providers/aws: elb id-only 2016-04-21 22:26:52 -07:00
Mitchell Hashimoto c1509b0220
providers/aws: eip id-only 2016-04-21 22:17:14 -07:00
Mitchell Hashimoto f394ce1ef3
provider/aws: ebs_volume id-only tests 2016-04-21 21:49:17 -07:00
Mitchell Hashimoto f0511631bf
provider/aws: id-only refresh for autoscaling groups 2016-04-21 21:36:52 -07:00
Paul Stack 6ac312e682 provider/aws: Set the state of `cross_zone_load_balancing` during the read func (#6295)
Changes made manually to the ELB property were not being set and
Terraform was reporting now changes to infra was to be made on refresh
2016-04-22 01:47:19 +01:00
Paul Stack fb1a82dbd7 provider/aws: Refresh state on Directory Service not found (#6294)
When a directory service was not found, Terraform was panicking due to
`dir := out.DirectoryDescriptions[0]`. The AWS API doesn't throw an
Error in this case. IT just return s0 results. Therefore, we should
check for 0 results in the return and remove the directory from the
state
2016-04-22 01:13:04 +01:00
Mitchell Hashimoto 0083431077
provider/aws: fix name on id-only check 2016-04-21 13:58:56 -07:00
Mitchell Hashimoto f2d91f0c2b
providers/aws: route53_health_check id-only 2016-04-21 13:50:03 -07:00
Mitchell Hashimoto 2274bb8c4a
provider/aws: route53 record import 2016-04-21 13:50:03 -07:00
Mitchell Hashimoto 6f091efd9b
providers/aws: route53_zone fix importing id-only private zone 2016-04-21 13:50:03 -07:00
Justin Clark f430fe280a Fix issue with with Opsworks and empty Custom Cook Book sources (#6078)
* Remove computed value on opsworks update

* Adjust PR 6078 per catsby's request
2016-04-21 13:59:40 -05:00
Mitchell Hashimoto b1c215f5e2
providers/aws: route53_zone id-only refresh 2016-04-21 08:53:53 -07:00
Mitchell Hashimoto 8b4e98e732
providers/aws: some id-only work on s3 buckets more work needed 2016-04-21 08:44:45 -07:00
Mitchell Hashimoto 7292c9df25
providers/aws: remove the opt-out stuff for id-only 2016-04-21 08:37:08 -07:00
Mitchell Hashimoto 3a43ce8f8e
providers/aws: sns_topic id-only 2016-04-21 08:18:04 -07:00
Clint bc68dee2eb provider/aws: Fix crash in AWS S3 Bucket when website index/error is empty (#6269) 2016-04-21 08:07:01 -05:00
Mitchell Hashimoto 7878cf327f
providers/aws: aws_sqs_queue isn't going to work for id-only 2016-04-20 18:07:50 -07:00
Mitchell Hashimoto 3013d1d2d1
provider/aws: customer gateway has to parse bgn_asn as int 2016-04-20 17:59:19 -07:00
Mitchell Hashimoto 0722f0b138
provider/aws: aws_flow_log id-only 2016-04-20 17:45:57 -07:00
Mitchell Hashimoto 54e119d32d
provider/aws: internet gateway id-only 2016-04-20 17:38:04 -07:00
Mitchell Hashimoto 2754691d2e
providers/aws: nat gateway fixes for id only refresh 2016-04-20 17:36:16 -07:00
Mitchell Hashimoto 10e4147d00
providers/aws: nat gateway id-only 2016-04-20 17:16:37 -07:00
Mitchell Hashimoto fc07b6315c
providers/aws: network_acl id-only 2016-04-20 17:10:01 -07:00
Mitchell Hashimoto 6887aad1c2
providers/aws: eni id-only 2016-04-20 16:57:17 -07:00
Mitchell Hashimoto 87537ea605
providers/aws: route table id only 2016-04-20 16:48:43 -07:00
Mitchell Hashimoto c5c3de4f01
providers/aws: classic SG test should test classic 2016-04-20 16:44:57 -07:00
Mitchell Hashimoto a44c547986
providers/aws: security group id-only 2016-04-20 16:42:00 -07:00
Mitchell Hashimoto c682dece84
providers/aws/vpn_gateway id-only refresh 2016-04-20 12:41:20 -07:00
Mitchell Hashimoto 9e65c30707
providers/aws/vpn_connection id-only refresh 2016-04-20 12:41:20 -07:00
Mitchell Hashimoto 0f91b30f64
providers/aws/vpc_peering: don't run id-only on plan test 2016-04-20 12:21:08 -07:00
Mitchell Hashimoto ff7b58f032
providers/aws: peering connection id-only test settings 2016-04-20 12:19:21 -07:00
Mitchell Hashimoto 60103c083a
providers/aws: working on id-only tests, no bugs found in these
resources
2016-04-20 12:10:53 -07:00
Josh Myers 3be66aa9ed Add cloudwatch_logs_subscription_filter provider (#5996) 2016-04-20 20:05:21 +01:00
Mitchell Hashimoto 0ef1b3b84a
providers/aws: response value for DescribeVpcAttribute needs to be
.Value
2016-04-20 11:35:43 -07:00
Mitchell Hashimoto 35f4201b9e
providers/aws: instance_tenancy is computed, set 2016-04-20 10:48:22 -07:00
Mitchell Hashimoto cfa5a3fe58
Revert "providers/aws: vpc refresh sets instance_tenancy"
This reverts commit a6d9e343ec.
2016-04-20 10:38:48 -07:00
Mitchell Hashimoto a6d9e343ec
providers/aws: vpc refresh sets instance_tenancy 2016-04-20 10:36:28 -07:00
KOJIMA Kazunori 5e33517394 provider/aws: Add support S3 Object Lifecycle Rule (#6220)
* providers/aws: Add support S3 Object Lifecycle Rule

* Fix failed vet command

* Fix failed acceptance tests

* Check nil pointer before dereference.

* Move S3 lifecycle rule id validator func to validators.go

* Don't fail when get lifecycle rule's response code is 404
2016-04-20 11:16:14 +01:00
Rev. C. Bennett Hoffman e108275331 Use resource.Retry for route creation and deletion (#6225)
* Use resource.Retry for route creation and deletion

* Remove uneeded out var in resource_aws_route.go
2016-04-19 17:23:42 -05:00
Chris Marchesi 6ebac8403d provider/aws: CloudFront post-merge review updates (#6196)
* provider/aws: Fix hashing on CloudFront certificate parameters

Adding necessary type assertion to values on the viewer_certificate hash
function to ensure that certain fields are indeed not zero string
values, versus simply zero interface{} values (aka nil, as is such for a
map[string]interface{}).

* provider/aws: CloudFront complex structure error handling

Handle errors better on calls to d.Set() in the
aws_cloudfront_distribution, namely in flattenDistributionConfig(). Also
caught a bug in the setting of the origin attribute, was incorrectly
attempting to set origins.

* provider/aws: Pass pointers to set CloudFront primitives

Change a few d.Set() for primitives in aws_cloudfront_distribution and
aws_cloudfront_origin_access_identity to use the pointer versus a
dereference.

* docs: Fix CloudFront examples formatting

Ran each example thru terraform fmt to fix indentation.

* provider/aws: Remove delete retention on CloudFront tests

To play better with Travis and not bloat the test account with disabled
distributions.

Disable-only functionality has been retained - one can enable it with
the TF_TEST_CLOUDFRONT_RETAIN environment variable.

* provider/aws: CloudFront delete waiter error handling

The call to resourceAwsCloudFrontDistributionWaitUntilDeployed() on
deletion of CloudFront distributions was not trapping error messages,
causing issues with waiter failure.
2016-04-19 16:40:30 -05:00
Paul Stack 8335555636 Gofmt issues (#6246) 2016-04-19 20:41:26 +01:00
David Harris b78f4c1114 provider/aws: Added migration for `tier` attribute in aws_elastic_beanstalk_environment resource. (#6167)
Fixes #6164.
2016-04-19 20:32:49 +01:00
Justin Clark 8249cb10eb Resolves DefaultOS and ConfigurationManager conflict (#6244) 2016-04-19 19:59:03 +01:00
clint shryock 6a9400d10e provider/aws: Allow 'available' state when deleting RDS Clusters 2016-04-19 13:15:45 -05:00
Clint fcdcb4b916 provider/aws: Default Network ACL resource (#6165)
* provider/aws: Default Network ACL resource

Provides a resource to manage the default AWS Network ACL. VPC Only.

* Remove subnet_id update, mark as computed value. Remove extra tag update

* refactor default rule number to be a constant

* refactor revokeRulesForType to be revokeAllNetworkACLEntries

Refactor method to delete all network ACL entries, regardless of type. The
previous implementation was under the assumption that we may only eliminate some
rule types and possibly not others, so the split was necessary.

We're now removing them all, so the logic isn't necessary

Several doc and test cleanups are here as well

* smite subnet_id, improve docs
2016-04-18 11:02:00 -05:00
clint shryock a810edd7a6 provider/aws: Randomize DB Identifier in test
Getting name collisions every now and again
2016-04-18 10:00:59 -05:00
Martin Atkins e41616198f Don't read back opsworks stack cookbooks source password (#6203)
As with several other sensitive values in Opsworks, the API returns a
placeholder value rather than a nil. To avoid writing the placeholder
value into the state we just skip updating the password on read, letting
whatever value was in the state persist.

This means that Terraform can't detect configuration drift where someone
has changed the password via some other means, but Terraform will still
be able to recognize changes to the password made within Terraform itself
due to the "last-written" value in the state.

This fixes #6192.
2016-04-16 22:56:36 +01:00
Martin Atkins 94f338d5de Merge #4276: aws_opsworks_instance resource 2016-04-16 10:14:22 -07:00
Martin Atkins 64db0454b4 Merge #6049: In Opsworks Stacks, wait for IAM changes to settle 2016-04-16 09:54:20 -07:00
Martin Atkins 2d597f09a8 Fix aws_opsworks_application acctest by passing in stack name
Other separate changes to testAccOpsworksStackConfigNoVpcCreate caused
this to begin failing because it was attempting to create a stack with
an empty name.
2016-04-16 09:44:04 -07:00
Martin Atkins bb7b8d6550 Merge #4419: aws_opsworks_application resource 2016-04-16 09:28:12 -07:00
Martin Atkins 41c535dc68 Unconditionally set opsworks layer custom_json
Previously in Update we would only set req.CustomJson if a non-empty
value was provided in the config. It seems that the Opsworks API considers
a null CustomJson to mean "do not change" rather than "set to empty",
so we need to explicitly set the empty string in the request body in
order to successfully remove an already-configured custom JSON.
2016-04-16 09:18:47 -07:00
Martin Atkins 72f121aec1 Merge #4272: custom JSON for Opsworks layers 2016-04-16 08:48:36 -07:00
Clint 05decba135 provider/aws: Better randomize the CloudTrail tests (#6188) 2016-04-15 10:06:40 -05:00
Chris Marchesi a38ccbe074 CloudFront distribution and origin access identity support (#5221)
* CloudFront implementation v3

* Update tests

* Refactor - new resource: aws_cloudfront_distribution

 * Includes a complete re-write of the old aws_cloudfront_web_distribution
   resource to bring it to feature parity with API and CloudFormation.
 * Also includes the aws_cloudfront_origin_access_identity resource to generate
   origin access identities for use with S3.
2016-04-14 14:55:11 -05:00
Raymond Fallon eed8733ee3 provider/aws: Enhance Triggers for AWS CodeDeploy Event Notifications (#6168)
* Improve testing of CodeDeploy DeploymentGroup Trigger Configs

  - ensure updates to trigger_events are applied
  - assert changes to trigger_target_arn

* Retry CodeDeploy DeploymentGroup when Trigger Config SNS Topic is not available

  - increase retries from 2 => 5
2016-04-14 20:26:33 +01:00
clint shryock 2830558bc9 check resource data for base64 encoded string 2016-04-13 10:44:26 -05:00
Doug Neal 1c662c2bc4 [#4794] Don't Base64-encode EC2 userdata if it is already Base64 encoded (#6140)
* Don't Base64-encode EC2 userdata if it is already Base64 encoded

The user data may be Base64 encoded already - for example, if it has been
generated by a template_cloudinit_config resource.

* Add encoded user_data to aws_instance acceptance test
2016-04-13 10:20:20 -05:00
Carlos Sanchez 32bd25d743 Issue #2174 Check that InternetGateway exists before returning from creation (#6105)
* Issue #2174 Check that InternetGateway exists before returning from creation

Fix some random InvalidInternetGatewayID.NotFound errors

* Issue #2174 Reuse IGStateRefreshFunc

* Issue #2174 Need to wait for creation before setting tags
2016-04-13 09:28:17 -05:00
Radek Simko f6a21e7899 provider/aws: Read VPC ID for Lambda function back from API 2016-04-13 15:05:19 +01:00
Radek Simko 3f188d5d1b provider/aws: Improve test for VPC-based Lambda func 2016-04-13 15:05:19 +01:00
Raymond Fallon 0cd0a4ec9c provider/aws: Manage Triggers for AWS CodeDeploy Event Notifications (#5599)
* provider/aws: CodeDeploy Deployment Group Triggers

  - Create a Trigger to Send Notifications for AWS CodeDeploy Events
  - Update aws_codedeploy_deployment_group docs

* Refactor validateTriggerEvent function and test

  - also rename TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration test

* Enhance existing Deployment Group integration tests

  - by using built in resource attribute helpers
  - these can get quite verbose and repetitive, so passing the resource to a function might be better
  - can't use these (yet) to assert trigger configuration state

* Unit tests for conversions between aws TriggerConfig and terraform resource schema

  - buildTriggerConfigs
  - triggerConfigsToMap
2016-04-11 19:42:21 +01:00
Clint 2ea8c64079 provider/aws: More randomization to our Acc tests (#6124)
* provider/aws: Add more Randomization to DB Parameter Group Tests, to avoid collisions

* provider/aws: Add more randomization to Autoscaling group tests
2016-04-11 12:06:28 -05:00
protomouse 0d82b4d0bf hclfmt test resources 2016-04-11 10:45:19 +02:00
protomouse ec55a34430 _disappears test 2016-04-11 10:44:46 +02:00
protomouse e9ce2b3a20 remove partial mode handling 2016-04-11 10:44:28 +02:00
protomouse b45e941144 add resource aws_rds_cluster_parameter_group 2016-04-11 10:26:47 +02:00
Hector Rivas Gandara 0fdf91661d provider/aws: normalize json policy for sns topic policy attribute (#6089)
* provider/aws: test empty plan with sns_topic policy with random order

If we setup a sns_topic policy with a policy with a different order
to the one set by the AWS API, terraform plan will be not empty between
runs.

* provider/aws: normalize json policy for sns topic

For the policy attribute of the resource aws_sns_topic,  AWS returns the policy
in JSON format with the fields in a different order.
If we store and compare the values without normalizing, terraform
will unnecesary trigger and update of the resource.

To avoid that, we must add a normalization function in the StateFunc of
the policy attribute and also when we read the attribute from AWS.
2016-04-08 13:55:49 -05:00
Jan Nabbefeld 6bf9f21c39 Opsworks Application support 2016-04-07 14:18:50 -07:00
Paul Hinze 8380a7b03e provider/aws: Allow multiple EIPs to associate to single ENI
When calling AssociateAddress, the PrivateIpAddress parameter must be
used to select which private IP the EIP should associate with, otherwise
the EIP always associates with the _first_ private IP.

Without this parameter, multiple EIPs couldn't be assigned to a single
ENI. Includes covering test and docs update.

Fixes #2997
2016-04-07 13:26:15 -05:00
Jeff Tang be0ebbc22e Handle race condition with IAM role permissions 2016-04-06 16:04:25 -04:00
David Harris e698822be5 provider/aws: Renaming `option_settings` attribute to `setting`. Added test to verify that settings are applied to template.
Fixes #6035
2016-04-06 11:35:07 -05:00
Martin Atkins f739ef9849 Human-readable error for failure to read EC2 volume
Previously the format string was using %#v, which prints the whole data structure given.

Instead we want to use %s to get the string representation of the error.

This fixes #6038.
2016-04-06 09:34:10 -07:00
Hector Rivas Gandara eb4fef1ca1 aws provider: normalize json of cloudwatch event_pattern
Normalise the event_pattern of the aws_cloudwatch_event_rule resource

before uploading it to AWS.



AWS seems to accept a event_pattern with a JSON with new lines, but then

the rule does not seem to work. Creating the rule in the AWS console works,

but will setup the pattern  as a json without newlines or spaces, and

display a formatted JSON.
2016-04-05 15:56:45 -05:00
Clint 6f4dc98354 provider/aws: Remove CloudTrail Trail from state if not found 2016-04-05 14:04:00 -05:00
Jeff Tang b857bd1ce9 add TestCheckExists/TestCheckAttributes for opsworks instance 2016-04-05 13:44:48 -04:00
Clint 053ba9005d provider/aws: Remove Network ACL from state if not found 2016-04-05 11:11:16 -05:00
Clint be385b83f8 provider/aws: Fix issue with retrying deletion of Network ACLs
Fix retry after removing associations by correctly checking and returning an

error. This should patch the VPC/Resource leak in our nightly acceptance tests.
2016-04-05 10:18:03 -05:00
Jeff Tang 41a8220e0f add custom_json for opsworks layers 2016-04-05 08:57:19 -04:00
KOJIMA Kazunori d646682d7a provider/aws: Support S3 bucket notification
* Implement aws_s3_bucket_notification resource
2016-04-04 21:23:06 -05:00
Clint b351a72e4c provider/aws: Normalize and compact SQS Redrive, Policy JSON
* provider/aws: Nomralize SQS Redrive Policy JSON

* provider/aws: Fix typo in log statements

* compact the Policy on SNS Queue

* add acceptance test for policy formatting
2016-04-04 11:41:36 -05:00
David Harris c3a6cf0620 provider/aws: Adding outputs for elastic_beanstalk_environment resource.
refs #5798
2016-04-01 13:58:09 -06:00
David Harris bb1d4ee886 provider/aws: Add support for `cname_prefix` to `aws_elastic_beanstalk_environment`. 2016-04-01 09:53:10 -06:00
Paul Stack c10c1b9a11 Merge pull request #5967 from dharrisio/f-aws-elastic-beanstalk-timeout-config
Adds `wait_for_ready_timeout` option to `aws_elastic_beanstalk_environment`.
2016-03-31 23:06:29 -05:00
David Harris a8c7fb0a06 Adds `wait_for_ready_timeout` option to `aws_elastic_beanstalk_environment`. 2016-03-31 17:28:02 -06:00
clint shryock 5ac3c5e53d update aws db test config 2016-03-31 17:07:04 -05:00
Clint 2ddddf340d Merge pull request #5964 from hashicorp/b-aws-rds-test-updates
provider/aws: Improve the randomization in RDS tests
2016-03-31 16:56:55 -05:00
clint shryock cbad80182a randomize DB Parameter Group names 2016-03-31 16:32:05 -05:00
clint shryock cd5569a624 provider/aws: Improve the randomization in RDS tests 2016-03-31 16:25:38 -05:00
clint shryock 2575b9f5d4 provider/aws: Fix issue re-creating deleted VPC peering connections 2016-03-31 15:23:56 -05:00
Paul Stack 0615819a98 Merge pull request #5940 from stack72/f-aws-redshift-username
provider/aws: Change Redshift Cluster Test to check for `_` in username
2016-03-30 21:08:48 -05:00
Paul Stack a8e0528784 Merge pull request #4277 from ctiwald/ct/add-new-asg-policy-type
Add support for "StepScaling" autoscaling policies.
2016-03-30 21:06:39 -05:00
stack72 3a836fa617 provider/aws: Change Redshift Cluster Test to check for `_` in username 2016-03-30 20:55:37 -05:00