Commit Graph

2817 Commits

Author SHA1 Message Date
Paul Stack 54c0022d38 Revert "provider/aws: Read Elastic Beanstalk stack name" (#7452) 2016-07-01 10:03:31 +01:00
David Harris a347b1795f provider/aws: Read Elastic Beanstalk stack name (#7445) 2016-07-01 09:34:28 +01:00
stevehorsfield 03c2c4408f Add support for 'prefix_list_ids' to AWS VPC security group rules
Prefix list IDs are used when allowing egress to an AWS VPC Endpoint.

See http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html#vpc-endpoints-routing
2016-06-30 15:48:27 -07:00
stevehorsfield db5f450a3e Add 'prefix_list_id' exported attribute to AWS VPC Endpoint
'prefix_list_id' can be used in egress rules in VPC security groups.
2016-06-30 15:47:53 -07:00
stevehorsfield 29623f871b Split TestAccAWSSecurityGroup_DefaultEgress into VPC/Classic
This test function tests both VPC and Classic EC2 modes, but not
all accounts have support for both. Splitting them makes it
easier to understand why a test fails when an account only
supports the VPC mode.
2016-06-30 15:47:53 -07:00
Clint 14fa3a88fd provider/aws: Added support for redshift destination to firehose delivery streams (supersedes #5304) (#7375)
* Added support for redshift destination to firehose delivery streams

* Small documentation fix

* go fmt after rebase

* small fixes after rebase

* provider/aws: Firehose test cleanups

* provider/aws: Update docs

* Convert Redshift and S3 blocks to TypeList

* provider/aws: Add migration for S3 Configuration in Kinesis firehose

* providers/aws: Safety first when building Redshift config options

* restore commented out log statements in the migration

* provider/aws: use MaxItems in schema
2016-06-30 15:03:31 -05:00
Clint 2ba1b0fb01 provider/aws: Populate self in Security Group Rule imports (#7164)
* provider/aws: Populate self in Security Group Rule imports

* provider/aws: Add regression test for SG Rule import
2016-06-30 15:01:38 -05:00
Radek Simko b54481909b Merge pull request #7428 from TimeIncOSS/f-efs-target-hostname
provider/aws: Add dns_name to aws_efs_mount_target
2016-06-30 12:40:48 +01:00
Radek Simko 32019fa008 provider/aws: Add dns_name to aws_efs_mount_target 2016-06-30 11:24:18 +01:00
Clint dd0850af59 provider/aws: Add inplace edit/update DB Security Group Rule Ingress (#7245) 2016-06-29 15:55:58 -05:00
Daniel Portella b8a84691ec provider/docker: Docker DNS Setting Enhancements (#7392)
* fixed go vet issues on aws provider in  master

* added support for dns, dns options and dns search for docker container.

On docker container resource you can specify dns_opts nad dns_search
which maps directly to docker --dns_opt and --dns_search parameters.
Allowing users to setup the embedded dns settings for their containers.

* fixed the asserts for the new features in tests.

fixed tests around DNS, DNS_OPTS and DNS_SEARCH
2016-06-29 13:38:46 +01:00
David Lanner 8fd843fa91 correct true and false string values to fix manage_bundler config bug (#7219) 2016-06-29 09:51:26 +01:00
Kevin Crawley a049fb17aa Added support for `snapshot_identifier` parameter in aws_rds_cluster (#7158)
Made modifications to existing parameters to enable restoring a RDS cluster snapshot

document changes
2016-06-29 09:02:26 +01:00
Jason Wieringa 79dd1c7d80 Protect instance from autoscale in on aws_autoscaling_group (#6490)
* Add support for NewInstancesProtectedFromScaleIn on aws_autoscaling_group

* Add documentation for aws_autoscaling_group protect_from_scale_in
2016-06-29 07:36:34 +01:00
David Harris 7abbb0f57e provider/aws: fix Elastic Beanstalk settings diff (#7398)
Fixes an issue where terraform plan or apply will always have a diff.
The Elastic Beanstalk API returns data for the `resource` attribute for
some settings that are not documented. This limits the `resource`
attribute to settings in the `aws:autoscaling:scheduledaction`
namespace.
2016-06-28 22:03:57 +01:00
Paul Stack 5e52bbaa27 provider/aws: Support Import for `aws_redshift_parameter_group` (#7339)
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSRedshiftParameterGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRedshiftParameterGroup_ -timeout 120m
=== RUN   TestAccAWSRedshiftParameterGroup_importBasic
--- PASS: TestAccAWSRedshiftParameterGroup_importBasic (25.97s)
=== RUN   TestAccAWSRedshiftParameterGroup_withParameters
--- PASS: TestAccAWSRedshiftParameterGroup_withParameters (21.26s)
=== RUN   TestAccAWSRedshiftParameterGroup_withoutParameters
--- PASS: TestAccAWSRedshiftParameterGroup_withoutParameters (20.79s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    68.045s
```
2016-06-28 10:05:03 -05:00
Paul Stack e45437373c provider/aws: Support Import `aws_vpc_peering_connection` (#7357)
```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVPCPeeringConnection_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVPCPeeringConnection_ -timeout 120m
=== RUN   TestAccAWSVPCPeeringConnection_importBasic
--- PASS: TestAccAWSVPCPeeringConnection_importBasic (42.58s)
=== RUN   TestAccAWSVPCPeeringConnection_basic
--- PASS: TestAccAWSVPCPeeringConnection_basic (45.00s)
=== RUN   TestAccAWSVPCPeeringConnection_plan
--- PASS: TestAccAWSVPCPeeringConnection_plan (40.92s)
=== RUN   TestAccAWSVPCPeeringConnection_tags
--- SKIP: TestAccAWSVPCPeeringConnection_tags (0.00s)
	resource_aws_vpc_peering_connection_test.go:85: Error: TestAccAWSVPCPeeringConnection_tags requires a peer id to be set
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	128.517s
```
2016-06-28 10:04:11 -05:00
Paul Stack 92fe1c82fc provider/aws: Support Import `aws_api_gateway_account` (#7368)
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSAPIGatewayAccount_importBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayAccount_importBasic -timeout 120m
=== RUN   TestAccAWSAPIGatewayAccount_importBasic
--- PASS: TestAccAWSAPIGatewayAccount_importBasic (16.43s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    16.450s
```
2016-06-28 10:03:24 -05:00
Paul Stack 0c16031556 provider/aws: Support Import `aws_elasticache_parameter_group` resource (#7336)
* provider/aws: Support Import `aws_elasticache_parameter_group` resource

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSElasticacheParameterGroup_'
==> Checking that code complies with gofmt requirements...
2016/06/26 19:46:35 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheParameterGroup_ -timeout 120m
=== RUN   TestAccAWSElasticacheParameterGroup_importBasic
--- PASS: TestAccAWSElasticacheParameterGroup_importBasic (22.42s)
=== RUN   TestAccAWSElasticacheParameterGroup_basic
--- PASS: TestAccAWSElasticacheParameterGroup_basic (39.08s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    61.520s
```

* Update import_aws_elasticache_parameter_group_test.go
2016-06-28 10:02:43 -05:00
clint shryock e262f0d015 provider/aws: Retry Code Deployment Group update based on IAM issues 2016-06-28 09:54:07 -05:00
Radek Simko 68bb58db35 aws: Add new region (Mumbai) (#7383)
* aws: Sort and format list of valid regions

* aws: Add new region (ap-south-1 / Mumbai)

https://aws.amazon.com/about-aws/whats-new/2016/06/announcing-the-aws-asia-pacific-mumbai-region/
2016-06-28 12:18:36 +01:00
David Harris 23c0399500 provider/aws: Elastic Beanstalk scheduledaction (#7376)
Add support for scheduled actions in Elastic Beanstalk option settings
by adding optional `resource` attribute for option setting resource.
2016-06-28 01:56:12 +01:00
Paul Stack d0fc1fa086 provider/aws: Randomize the ELB name in an AWS route53 acceptance test (#7341)
FYI @catsby

The acceptance test was throwing the error:

```
* aws_elb.main: DuplicateLoadBalancerName: Load Balancer named
* foobar-terraform-elb already exists and it is configured with
* different parameters.
```

So randomized the name and the test still passes as expected:

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSRoute53Record_alias'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSRoute53Record_alias -timeout 120m
=== RUN   TestAccAWSRoute53Record_alias
--- PASS: TestAccAWSRoute53Record_alias (97.70s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    97.722s
```
2016-06-27 08:52:12 -05:00
Paul Stack d8bad59226 provider/aws: Support Import `aws_vpn_connection` (#7355)
```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpnConnection_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpnConnection_ -timeout 120m
=== RUN   TestAccAWSVpnConnection_importBasic
--- PASS: TestAccAWSVpnConnection_importBasic (201.02s)
=== RUN   TestAccAWSVpnConnection_basic
--- PASS: TestAccAWSVpnConnection_basic (336.38s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	537.426s
```
2016-06-27 08:44:28 -05:00
Paul Stack e81751c4ee provider/aws: Support Import `aws_sns_topic_subscription` (#7359)
Had to change the way that the tests were working to include a random sqs-queue name due to this error:

```

`aws_sqs_queue.test_queue: Error creating SQS queue: AWS.SimpleQueueService.QueueDeletedRecently: You must wait 60 seconds after deleting a queue before you can create another with the same name.
			status code: 400, request id: b58e800a-ae27-556e-b6de-cfe1bbf9dc09``

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSNSTopicSubscription_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSNSTopicSubscription_ -timeout 120m
=== RUN   TestAccAWSSNSTopicSubscription_importBasic
--- PASS: TestAccAWSSNSTopicSubscription_importBasic (24.44s)
=== RUN   TestAccAWSSNSTopicSubscription_basic
--- PASS: TestAccAWSSNSTopicSubscription_basic (25.26s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	49.722s
```
2016-06-27 08:44:05 -05:00
Paul Stack aa00d38a10 provider/aws: Support Import `aws_rds_cluster_parameter_group` (#7360)
* provider/aws: Support Import `aws_rds_cluster_parameter_group`

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBClusterParameterGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBClusterParameterGroup_ -timeout 120m
=== RUN   TestAccAWSDBClusterParameterGroup_importBasic
--- PASS: TestAccAWSDBClusterParameterGroup_importBasic (29.60s)
=== RUN   TestAccAWSDBClusterParameterGroup_basic
--- PASS: TestAccAWSDBClusterParameterGroup_basic (47.27s)
=== RUN   TestAccAWSDBClusterParameterGroup_disappears
--- PASS: TestAccAWSDBClusterParameterGroup_disappears (21.58s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	98.483s
```

* Update import_aws_rds_cluster_parameter_group_test.go
2016-06-27 08:42:55 -05:00
Craig Dodd 139302122e Minor typo fixes (#7354) 2016-06-27 11:54:19 +01:00
yissachar 1bd8b449e0 Add SES resource (#5387)
* Add SES resource

* Detect ReceiptRule deletion outside of Terraform

* Handle order of rule actions

* Add position field to docs

* Fix hashes, add log messages, and other small cleanup

* Fix rebase issue

* Fix formatting
2016-06-26 22:07:14 +01:00
stack72 0a2245cbae provider/aws: Support Import for `aws_db_parameter_group`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSDBParameterGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBParameterGroup_ -timeout 120m
=== RUN   TestAccAWSDBParameterGroup_importBasic
--- PASS: TestAccAWSDBParameterGroup_importBasic (31.03s)
=== RUN   TestAccAWSDBParameterGroup_basic
--- PASS: TestAccAWSDBParameterGroup_basic (51.22s)
=== RUN   TestAccAWSDBParameterGroup_Only
--- PASS: TestAccAWSDBParameterGroup_Only (25.45s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    107.725s
```
2016-06-26 21:20:52 +01:00
James Nugent 51af5e793d Merge pull request #7294 from hashicorp/import-aws-iampp
provider/aws: Support Import for `aws_iam_account_password_policy`
2016-06-24 14:44:36 +03:00
James Nugent b1e933385b Merge pull request #7296 from hashicorp/import-aws-cloudwatcher
provider/aws: Support Import for `aws_cloudwatch_event_rule`
2016-06-24 14:44:17 +03:00
stack72 af44dbd3cd provider/aws: Support Import for `aws_cloudwatch_event_rule`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSCloudWatchEventRule_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSCloudWatchEventRule_ -timeout 120m
=== RUN   TestAccAWSCloudWatchEventRule_importBasic
--- PASS: TestAccAWSCloudWatchEventRule_importBasic (20.15s)
=== RUN   TestAccAWSCloudWatchEventRule_basic
--- PASS: TestAccAWSCloudWatchEventRule_basic (35.25s)
=== RUN   TestAccAWSCloudWatchEventRule_full
--- PASS: TestAccAWSCloudWatchEventRule_full (19.43s)
=== RUN   TestAccAWSCloudWatchEventRule_enable
--- PASS: TestAccAWSCloudWatchEventRule_enable (50.52s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    125.380s
```
2016-06-23 10:31:40 +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
stack72 20bc268d34 provider/aws: Support Import for `aws_iam_account_password_policy`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSIAMAccountPasswordPolicy_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSIAMAccountPasswordPolicy_ -timeout 120m
=== RUN   TestAccAWSIAMAccountPasswordPolicy_importBasic
--- PASS: TestAccAWSIAMAccountPasswordPolicy_importBasic (14.75s)
=== RUN   TestAccAWSIAMAccountPasswordPolicy_basic
--- PASS: TestAccAWSIAMAccountPasswordPolicy_basic (26.06s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    40.831s
```
2016-06-23 09:52:45 +01:00
James Nugent d39760e620 Merge pull request #7281 from hashicorp/import-aws-ecr
provider/aws: Support import functionality for `aws_ecr_repository`
2016-06-23 11:09:09 +03:00
James Nugent c9a4f84caa Merge pull request #7282 from hashicorp/import-aws-vpngateway
provider/aws: Support Import for `aws_vpn_gateway`
2016-06-23 10:52:58 +03:00
James Nugent 1bbb75bc9a Merge pull request #7284 from hashicorp/import-aws-cwlg
provider/aws: Add Import support for `aws_cloudwatch_log_group`
2016-06-23 10:52:32 +03:00
James Nugent 73b823ba47 Merge pull request #7285 from hashicorp/import-aws-ecsng
provider/aws: Support Import for `aws_elasticache_subnet_group`
2016-06-23 10:52:21 +03:00
James Nugent a6ae8eaac8 Merge pull request #7286 from hashicorp/import-aws-dbsng
provider/aws: Support Import functionality for `aws_db_subnet_group`
2016-06-23 10:52:04 +03:00
James Nugent b13ef7c748 Merge pull request #7287 from hashicorp/import-aws-snstopic
provider/aws: Support Import for `aws_sns_topic`
2016-06-23 10:51:42 +03:00
James Nugent 5043114d33 Merge pull request #7288 from hashicorp/import-aws-redshiftsng
provider/aws: Support Import for `aws_redshift_subnet_group`
2016-06-23 10:51:20 +03:00
James Nugent eefd2d5a7c Merge pull request #7289 from hashicorp/import-aws-vpcendpoint
provider/aws: Support Import for `aws_vpc_endpoint`
2016-06-23 10:50:55 +03:00
James Nugent d669077a23 Merge pull request #7290 from hashicorp/import-aws-iamuser
provider/aws: Support Import for `aws_iam_user`
2016-06-23 10:50:19 +03:00
James Nugent 5ac9f21d2f Merge pull request #7291 from hashicorp/import-aws-iamgroup
provider/aws: Support Import for `aws_iam_group`
2016-06-23 10:49:14 +03:00
stack72 86fcabc651 provider/aws: Changing test parameters to be us-west-2 based 2016-06-23 08:13:49 +01:00
stack72 ba5131b7d7 provider/aws: Support Import for `aws_iam_group`
Small change to the test as it was failing sometimes as it was using the
same identifier. The small change has made it more stable when running
it in quick succession as it isn't an update

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSIAMGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMGroup_
-timeout 120m
=== RUN   TestAccAWSIAMGroup_importBasic
--- PASS: TestAccAWSIAMGroup_importBasic (14.14s)
=== RUN   TestAccAWSIAMGroup_basic
--- PASS: TestAccAWSIAMGroup_basic (22.88s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    37.040s
```
2016-06-23 03:10:31 +01:00
stack72 82529f8029 provider/aws: Support Import for `aws_iam_user`
The Id wasn't being set until after the Read func returned from the API.
I needed to move that Id set up until just after the Create response
returned

The same Id's have been set - username

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSUser_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSUser_
-timeout 120m
=== RUN   TestAccAWSUser_importBasic
--- PASS: TestAccAWSUser_importBasic (14.24s)
=== RUN   TestAccAWSUser_basic
--- PASS: TestAccAWSUser_basic (24.99s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.261s
```
2016-06-23 02:56:59 +01:00
stack72 3332f757cb provider/aws: Support Import for `aws_vpc_endpoint`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpcEndpoint_
-timeout 120m
=== RUN   TestAccAWSVpcEndpoint_importBasic
--- PASS: TestAccAWSVpcEndpoint_importBasic (45.90s)
=== RUN   TestAccAWSVpcEndpoint_basic
--- PASS: TestAccAWSVpcEndpoint_basic (46.64s)
=== RUN   TestAccAWSVpcEndpoint_withRouteTableAndPolicy
--- PASS: TestAccAWSVpcEndpoint_withRouteTableAndPolicy (91.91s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    184.470s
```
2016-06-23 02:48:59 +01:00
stack72 45f394b5ae provider/aws: Support Import for `aws_redshift_subnet_group`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSRedshiftSubnetGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSRedshiftSubnetGroup_ -timeout 120m
=== RUN   TestAccAWSRedshiftSubnetGroup_importBasic
--- PASS: TestAccAWSRedshiftSubnetGroup_importBasic (47.76s)
=== RUN   TestAccAWSRedshiftSubnetGroup_basic
--- PASS: TestAccAWSRedshiftSubnetGroup_basic (47.75s)
=== RUN   TestAccAWSRedshiftSubnetGroup_updateSubnetIds
--- PASS: TestAccAWSRedshiftSubnetGroup_updateSubnetIds (77.74s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    173.271s
```
2016-06-23 02:33:29 +01:00
stack72 b310842383 provider/aws: Support Import for `aws_sns_topic`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSSNSTopic_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSNSTopic_
-timeout 120m
=== RUN   TestAccAWSSNSTopic_importBasic
--- PASS: TestAccAWSSNSTopic_importBasic (17.02s)
=== RUN   TestAccAWSSNSTopic_basic
--- PASS: TestAccAWSSNSTopic_basic (16.59s)
=== RUN   TestAccAWSSNSTopic_withIAMRole
--- PASS: TestAccAWSSNSTopic_withIAMRole (28.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    62.536s
```
2016-06-23 02:27:13 +01:00
stack72 95476404c3 provider/aws: Support Import functionality for `aws_db_subnet_group`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSDBSubnetGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBSubnetGroup_ -timeout 120m
=== RUN   TestAccAWSDBSubnetGroup_importBasic
--- PASS: TestAccAWSDBSubnetGroup_importBasic (53.80s)
=== RUN   TestAccAWSDBSubnetGroup_basic
--- PASS: TestAccAWSDBSubnetGroup_basic (52.29s)
=== RUN   TestAccAWSDBSubnetGroup_withUndocumentedCharacters
--- PASS: TestAccAWSDBSubnetGroup_withUndocumentedCharacters (54.63s)
=== RUN   TestAccAWSDBSubnetGroup_updateDescription
--- PASS: TestAccAWSDBSubnetGroup_updateDescription (83.04s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    243.785s
```
2016-06-23 02:21:11 +01:00
stack72 2a07f86041 provider/aws: Support Import for `aws_elasticache_subnet_group`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSElasticacheSubnetGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSElasticacheSubnetGroup_ -timeout 120m
=== RUN   TestAccAWSElasticacheSubnetGroup_importBasic
--- PASS: TestAccAWSElasticacheSubnetGroup_importBasic (46.80s)
=== RUN   TestAccAWSElasticacheSubnetGroup_basic
--- PASS: TestAccAWSElasticacheSubnetGroup_basic (48.79s)
=== RUN   TestAccAWSElasticacheSubnetGroup_update
--- PASS: TestAccAWSElasticacheSubnetGroup_update (76.81s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    172.431s
```
2016-06-23 02:12:02 +01:00
stack72 24a21e2f0a provider/aws: Add Import support for `aws_cloudwatch_log_group`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSCloudWatchLogGroup_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSCloudWatchLogGroup_ -timeout 120m
=== RUN   TestAccAWSCloudWatchLogGroup_importBasic
--- PASS: TestAccAWSCloudWatchLogGroup_importBasic (17.24s)
=== RUN   TestAccAWSCloudWatchLogGroup_basic
--- PASS: TestAccAWSCloudWatchLogGroup_basic (16.69s)
=== RUN   TestAccAWSCloudWatchLogGroup_retentionPolicy
--- PASS: TestAccAWSCloudWatchLogGroup_retentionPolicy (29.10s)
=== RUN   TestAccAWSCloudWatchLogGroup_multiple
--- PASS: TestAccAWSCloudWatchLogGroup_multiple (22.09s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    85.140s
```
2016-06-23 01:55:29 +01:00
stack72 882e4fe770 provider/aws: Support Import for `aws_vpn_gateway`
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSVpnGateway_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpnGateway_
-timeout 120m
=== RUN   TestAccAWSVpnGateway_importBasic
--- PASS: TestAccAWSVpnGateway_importBasic (48.29s)
=== RUN   TestAccAWSVpnGateway_basic
--- PASS: TestAccAWSVpnGateway_basic (86.98s)
=== RUN   TestAccAWSVpnGateway_reattach
--- PASS: TestAccAWSVpnGateway_reattach (97.93s)
=== RUN   TestAccAWSVpnGateway_delete
--- PASS: TestAccAWSVpnGateway_delete (65.61s)
=== RUN   TestAccAWSVpnGateway_tags
--- PASS: TestAccAWSVpnGateway_tags (73.81s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    372.624s
```
2016-06-23 01:25:13 +01:00
stack72 edf593febd provider/aws: Support import functionality for `aws_ecr_repository`
Changes required:

* ECR Read func doesn't need to take ``registry_id` as it uses the
  current account Id
* `name` wasn't being set in the ECR Read so the import was failing as
  name wasn't found

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSEcrRepository_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSEcrRepository_ -timeout 120m
=== RUN   TestAccAWSEcrRepository_importBasic
--- PASS: TestAccAWSEcrRepository_importBasic (17.37s)
=== RUN   TestAccAWSEcrRepository_basic
--- PASS: TestAccAWSEcrRepository_basic (16.05s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    33.437s
```
2016-06-23 00:58:59 +01:00
Keshav Varma 58bd6dfb02 Add an AWS Spot fleet resource 2016-06-21 17:31:30 -07:00
Clint f4a1833baf provider/aws: Bundle IOPs and Allocated Storage update for DB Instances (#7203) 2016-06-21 14:53:13 -05:00
clint shryock 005d9a12e0 provider/aws: Update IAM / ELB server certs from expired ones 2016-06-21 13:54:40 -05:00
Radek Simko 6fed5eb8f0 aws: Use new STS endpoint to validate creds (#6536) 2016-06-20 23:14:07 +01:00
David Harris c7eb8a2022 provider/aws: elastic beanstalk invalid setting crash (#7222)
* Only check the `cnamePrefix` if the CNAME is not nil

* Get Elastic Beanstalk error messages
2016-06-20 16:21:15 -05:00
clint shryock ecc455ebb4 provider/aws: Guard against nil values in EC2 Tags 2016-06-20 15:53:04 -05:00
Raphael Randschau 90889632e0 Add aws_ecs_container_definition data source
this datasource allows terraform to work with externally modified state, e.g.
when you're using an ECS service which is continously updated by your CI via the
AWS CLI.

right now you'd have to wrap terraform into a shell script which looks up the
current image digest, so running terraform won't change the updated service.

using the aws_ecs_container_definition data source you can now leverage
terraform, removing the wrapper entirely.
2016-06-19 21:50:37 +02:00
David Tolnay 0b9fb1d8f8
Stop swallowing errors from DescribeAlarms
This caused alarms to be created repeatedly if Terraform is running without
DescribeAlarms permission.
2016-06-18 15:57:52 -07:00
James Bardin 2a2f7cbc52 Merge pull request #7205 from hashicorp/jbardin/GH-2027
core: don't check any parts of a computed set in InstanceDiff.Same
2016-06-17 11:00:29 -04:00
Radek Simko 2cdb5a367e aws/route53_zone: Make delegation_set_id conflict w/ vpc_id (#7213)
- as per the API reference it is not possible to use delegation sets w/ private hosted zones
   - http://docs.aws.amazon.com/Route53/latest/APIReference/API-create-hosted-zone-private.html
   - http://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html
 - if you specify both AWS returns confusing error "InvalidInput" with no further details so this should reduce potential confusions & improve UX
2016-06-17 12:35:49 +01:00
James Bardin a3e2c99219 Add a failing acceptance test from GH-2027 2016-06-16 18:43:15 -04:00
James Bardin f65a898a51 Merge pull request #7188 from hashicorp/jbardin/GH-7017
provider/aws: Check for unassigned AWS Cookie Stickiness Policy
2016-06-16 11:35:05 -04:00
Clint 24bcac42be provider/aws: Retry EIP association (#7186) 2016-06-16 10:03:16 -05:00
James Bardin cfd8254db8 Check for existing but unassigned LB policies
If an AWS Cookie Stickiness Policy is removed from the listener in
the AWS console the policy isn't deleted. Cross reference the policy
name with those assigned to the listener to determine if the policy
is actually being used.
2016-06-16 10:10:52 -04:00
Martin Atkins ce447e8e2a aws_availability_zones output as "names" rather than "instance" (#7162)
Since this resource produces a list it feels more intuitive to give its
attribute a plural name, and since the noun "instance" already means
something specific in the AWS provider that doesn't apply here we use
"names" to indicate that these are availability zone names.

Also includes updating the docs to not show a dynamic count example for
now, since we don't support that yet.
2016-06-15 15:17:12 +02:00
James Bardin e2d257372a Merge pull request #7166 from hashicorp/jbardin/GH-7065
provider/aws: Check for LoadBalancerNotFound when reading AppCookieStickinessPolicy
2016-06-15 08:59:58 -04:00
James Bardin d4d8a99ba4 Check for LoadBalancerNotFound
When reading an AppCookieStickinessPolicy check for LoadBalancerNotFound
as well as PolicyNotFound. This prevents errors when when destroying a
policy on an ELB that no longer exists.
2016-06-14 17:58:48 -04:00
Clint 627efa21f4 provider/aws: Retry RouteTable Route/Assocation creation (#7156)
* provider/aws: Retry RouteTable Assocation creation

* provider/aws: retry route creation

* remove extra string check
2016-06-14 15:39:52 -05:00
clint shryock 4796e27d1a provider/aws: Randomize Cluser Param group name to avoid collision 2016-06-14 10:42:36 -05:00
clint shryock 8f216563aa provider/aws: Fix db instance snapshot tests 2016-06-13 10:05:01 -05:00
Paul Stack 5e23e87c30 provider/aws: `aws_db_instance` change to the default for (#7118)
`publicly_accessible` to be false
2016-06-11 00:13:53 +02:00
Paul Hinze bba5a38c95 Merge pull request #7116 from hashicorp/b-aws-map-list-test-merrymaking
provider/aws: Clean up some map/set test checks
2016-06-10 16:57:24 -05:00
Paul Stack 5ecc8e3169 provider/aws: `aws_db_instance` now defaults `publicly_accessible` to (#7117)
false

Fixes #7035

A known issue in Terraform means that d.GetOk() on a bool which is false
will mean it doesn't get evaulated. Therefore, when people set
publicly_accessible to false, it will never get evaluated on the Create

We are going to make it default to false now
2016-06-10 23:55:36 +02:00
clint shryock 88ed387bd6 fix up cloudformation test checks 2016-06-10 12:52:10 -05:00
clint shryock 0530cf963d provider/aws: revert # -> % for tests 2016-06-10 12:45:24 -05:00
clint shryock fad26ec59e provider tests: Update to match new tags map in state 2016-06-10 10:07:02 -05:00
Clint 19eb0079db provider/aws: update asg placement group test name, to fix import test (#7095) 2016-06-10 09:01:30 -05:00
Clint 6318b8fd4c provider/aws: Rename parameter_group_name to db_cluster_parameter_group_name (supersedes #7068) (#7083)
* modify parameter_group_name to db_cluster_parameter_group_name #7046

* provider/aws: Deprecate parameter_group_name in RDS Cluster

Use db_cluster_parameter_group_name instead
2016-06-09 16:45:29 -05:00
Clint 5e26cb9960 provider/aws: Update Lambda functions on name change (#7081)
Allows the updating of Lambda functions on name change alone
2016-06-09 16:44:10 -05:00
clint shryock 253a46b573 provider/aws: Randomize names in code deploy test to reduce chances of name collision on tests 2016-06-09 15:39:35 -05:00
Paul Forman 391a7f85b0 provider/aws: Fix issue with Root Block Devices and encrypted flag in Launch Configurations [GH-6512]
Fixed the problem where the root_block_device could cause an apply error
by reading back an "encrypted" parameter that was meant for an
ebs_block_device.  "encrypted" is not part of the root_block_device
schema, since it can't be set explicitly.

Added a check in Create to fail when the root device is incorrectly
specified as an ebs_block_device, as this causes continual refreshing
due to mismatched state between root_block_device and ebs_block_device.

"encrypted" and "snapshot_id" should be guarded with ConflictsWith, but
that doesn't appear to work on nested resources despite #1926.
2016-06-08 15:56:27 -05:00
clint shryock c667b2d8cd Merge branch 'pr-7075'
* pr-7075:
  provider/aws: Log ElasticCache subnet removal
  provider/aws: Update state on `aws_elasticache_subnet_group` not found exception
2016-06-08 13:42:08 -05:00
clint shryock 1624c7e27f provider/aws: Log ElasticCache subnet removal 2016-06-08 13:35:49 -05:00
stack72 2a09941f76 provider/aws: Update state on `aws_elasticache_subnet_group` not found exception
Fixes #7062

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheSubnetGroup'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheSubnetGroup -timeout 120m
=== RUN   TestAccAWSElasticacheSubnetGroup_basic
--- PASS: TestAccAWSElasticacheSubnetGroup_basic (44.62s)
=== RUN   TestAccAWSElasticacheSubnetGroup_update
--- PASS: TestAccAWSElasticacheSubnetGroup_update (73.74s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	118.379s
2016-06-08 16:00:13 +02:00
Sam Ottenhoff bd36bc60aa BGP AS 60000 is assigned to EQUINIX-CLOUD-EXCHANGE-AMSTERDAM-ASN.
AS65000 is reserved for private use. https://en.wikipedia.org/wiki/Autonomous_system_\(Internet\)
2016-06-08 13:46:56 +00:00
James Bardin cd160d3f3f Merge pull request #6965 from hashicorp/jbardin/GH-3968
Add support for Amazon Elastic Transcoder
2016-06-07 17:28:55 -04:00
James Bardin 5b5641208e remove extra "=" from test config 2016-06-07 17:06:25 -04:00
James Bardin 5c1b625c84 Add support for Amazon Elastic Transcoder
- Add resources for elastic transcoder pipelines and presets
2016-06-07 16:07:08 -04:00
James Bardin 4c7a31d72a Merge pull request #6879 from hashicorp/jbardin/GH-3999
Add top-level ELB Attachment resource
2016-06-07 10:19:07 -04:00
James Bardin e4d8c6929f Add top-level ELB Attachment resource
Add an aws_elb_attachment resource so that the attment of instances to
an ELB can be managed separately from an aws_elb and prevent dependency
cycles.
2016-06-07 09:46:39 -04:00
Clint d8ab30ca02 Merge pull request #6987 from modax/bug/vpngw-vpc-reattach
provider/aws: Fix reattachment of VPC to VPN gateway.
2016-06-06 11:30:44 -05:00
clint shryock b9f512e0cf provider/aws: Bump ElasticSearch domain delete time to match create time. Should help test pass 2016-06-06 11:13:48 -05:00
clint shryock 3044cc5c38 provider/aws: randomiz names in TestAccAWSCloudwatchLogSubscriptionFilter_basic 2016-06-06 10:25:02 -05:00
Joshua Spence d3030e1e0f Add `name_prefix` to `aws_iam_instance_profile` and `aws_iam_role` (#6939) 2016-06-05 00:46:27 +01:00
clint shryock b24228021f Merge branch 'pr-6865'
* pr-6865:
  provider/aws: Add db_param group to RDS Cluster Instance test
  remove status attribute
  support aurora instance's parameter group and modifyinstance
2016-06-03 13:46:14 -05:00
clint shryock 412d88e768 provider/aws: Add db_param group to RDS Cluster Instance test 2016-06-03 13:46:01 -05:00
clint shryock badbe6d738 provider/aws: Fix panics in datasource AMI 2016-06-03 09:19:51 -05:00
Linda Xu 5ca5b1e3a1 remove status attribute 2016-06-02 20:37:36 -07:00
clint shryock 3f0650b585 provider/aws: randomize role name for test 2016-06-02 15:22:16 -05:00
clint shryock 2703c4eab9 provider/aws: fix go fmt 2016-06-02 14:40:43 -05:00
clint shryock e427880684 provider/aws: Fix TestAccAWSElasticacheSecurityGroup_basic test 2016-06-02 14:36:30 -05:00
clint shryock a258e492cd provider/aws: randomize ASG Notification test names 2016-06-02 14:36:30 -05:00
Modestas Vainius e655cbd0fc provider/aws: Fix reattachment of VPC to VPN gateway.
When VPC is detached from VPN gateway, its VpcAttachment stays in place
just with state changed to "detached". Since terraform was not checking
attachment state, it used to think VPC gateway was still attached.
2016-06-02 20:35:33 +03:00
stack72 b3d680eee0 Merge branch 'master' of https://github.com/statoilfuelretail/terraform into statoilfuelretail-master 2016-06-02 18:06:37 +01:00
Radek Simko 2a9f47aa70 provider/aws: aws_s3_object -> aws_s3_bucket_object (docs + filename) (#6979)
* aws/docs: Fix s3_bucket_object DS documentation

* provider/aws: aws_s3_object -> aws_s3_bucket_object
2016-06-02 12:13:39 +01:00
Anshul Sharma 1f28bf0a74 set cross_zone_load_balancing default to true (#6897)
https://github.com/hashicorp/terraform/issues/6891
2016-06-02 12:08:46 +01:00
Radek Simko 1ea5cff9b3 Merge pull request #6946 from TimeIncOSS/f-aws-s3-object-data-source
provider/aws: Add aws_s3_bucket_object data source
2016-06-02 07:04:46 +01:00
Radek Simko bf8931b1ab provider/aws: Mark Lambda function as gone when it's gone (#6924)
* helper/error: Introduce TimeoutError & UnexpectedStateError

* provider/aws: Mark Lambda function as gone when it's gone
2016-06-02 00:50:43 +01:00
Clint d723e1c185 Merge pull request #6955 from paybyphone/paybyphone_cloudfront_origin_access_identity_arn
provider/aws: Add iam_arn to aws_cloudfront_origin_access_identity
2016-06-01 15:25:23 -05:00
Radek Simko d4fe1b9145 provider/aws: Add s3_bucket_object data source 2016-06-01 19:14:17 +01:00
clint shryock 5add35d654 provider/aws: Add Tags to Test AMIs to help debug leaks 2016-06-01 09:09:41 -05:00
clint shryock d89a240885 - minor wording update and link to docs
- fix error checking
- update debug log on migration
- remove regression test because the attribute is renamed
2016-05-31 16:32:37 -05:00
Chris Marchesi 65824c7725 provider/aws: Add iam_arn to aws_cloudfront_origin_access_identity
Add the iam_arn attribute to aws_cloudfront_origin_access_identity,
which computes the IAM ARN for a certain CloudFront origin access
identity.

This is necessary because S3 modifies the bucket policy if CanonicalUser
is sent, causing spurious diffs with aws_s3_bucket resources.
2016-05-31 13:55:49 -07:00
Adam Mielke 97fbeaf59f add support for geolocation and latency records to aws route53 provider 2016-05-31 15:11:02 -05:00
James Nugent 50a32b5ea4 Merge pull request #6881 from hashicorp/iam-policy-datasource
provider/aws: aws_iam_policy_document data source
2016-05-31 10:51:14 -07:00
Paul Hinze 5964f4a85d Merge pull request #6923 from paybyphone/paybyphone_sensitive_schema
core: Adding Sensitive attribute to resource schema
2016-05-31 11:57:54 -05:00
James Nugent c91d62fda0 provider/aws: aws_iam_policy_document data source
This brings over the work done by @apparentlymart and @radeksimko in
PR #3124, and converts it into a data source for the AWS provider:

This commit adds a helper to construct IAM policy documents using
familiar Terraform concepts. It makes Terraform-style interpolations
easier and resolves the syntax conflict between Terraform interpolations
and IAM policy variables by changing the latter to use &{...} for its
interpolations.

Its use is completely optional and users are free to go on using literal
heredocs, file interpolations or whatever else; this just adds another
option that fits more naturally into a Terraform config.
2016-05-31 11:08:02 -05:00
Chris Marchesi 9d7fb89114 core: Adding Sensitive attribute to resource schema
This an effort to address hashicorp/terraform#516.

Adding the Sensitive attribute to the resource schema, opening up the
ability for resource maintainers to mark some fields as sensitive.
Sensitive fields are hidden in the output, and, possibly in the future,
could be encrypted.
2016-05-29 22:18:44 -07:00
Chris Marchesi 2d65e9dbd2 provider/aws: Add tests for aws_availability_zones data source
Closing off my other AWS availability zone branch, I'm adding tests for
the existing aws_availability_zones data source.

This closes hashicorp/terraform#4848.
2016-05-29 18:23:42 -07:00
djuke c1eee521f3 reading the aws instance it was assumed that eth0 was the first in the list of network interfaces (#6761) 2016-05-29 23:01:58 +01:00
James Nugent 46f81401b9 Merge pull request #6829 from hashicorp/aws-dynamodb-forcenew
provider/aws: Change to `aws_dynamodb_table` hash_key forces a new resource
2016-05-29 12:14:58 -07:00
Chris Marchesi 9ac7fb0276 provider/aws: New data source: aws_ami
This data source allows one to look up the most recent AMI for a specific
set of parameters, much like aws ec2 describe-images in the AWS CLI.

Basically a refresh of hashicorp/terraform#4396, in data source form.
2016-05-29 09:55:12 -07:00
Clint 3355c1528d provider/aws: Fix typo in ELB import test (#6886) 2016-05-26 03:38:39 -05:00
clint shryock 6f04c36a1a provider/aws: Ranomize LB names so tests can run at the same time 2016-05-26 03:37:54 -05:00
Clint 983b6710a5 provider/aws: Add per user, role and group policy attachment (supersedes #5816) (#6858)
* Add per user, role and group policy attachment

* Add docs for new IAM policy attachment resources.

* Make policy attachment resources manage only 1 entity<->policy attachment

* provider/aws: Tidy up IAM Group/User/Role attachments
2016-05-25 11:03:43 -05:00
David Glasser b3425447e5 provider/aws: fix aws_security_group_rule refresh (#6730)
When two rules differ only in source security group, EC2 APIs return
them as a single rule, but Terraform requires separate
aws_security_group_rule resources.

6bdab07174 changed Read to set source_security_group_id (and
cidr_blocks) from the rule returned from EC2 and chose the first
source_security_group_id arbitrarily, which is wrong.

Makes TestAccAWSSecurityGroupRule_PartialMatching_Source pass again.

Also adds a comment noting that there is a bug in the new resource
importing feature.

Fixes #6728.
2016-05-25 10:59:41 -05:00
Linda Xu 38ac748b88 support aurora instance's parameter group and modifyinstance 2016-05-24 21:46:00 -07:00
Paul Stack ce4841e6a6 provider/aws: Add support to `aws_redshift_cluster` for ``iam_roles`` (#6647) 2016-05-24 22:44:46 +01:00
James Nugent 1ea727eb13 provider/aws: Add aws_availability_zones source
This commit adds a data source with a single list, `instance` for the
schema which gets populated with the availability zones to which an
account has access.
2016-05-24 15:42:45 -05:00
Paul Stack 1df8290134 provider/aws: Support tags for AWS redshift cluster (#5356) 2016-05-24 18:43:12 +01:00
Clint 171c1e39d2 provider/aws: SQS use raw policy string if compact fails (#6724) 2016-05-24 10:38:32 -05:00
Thibault Vigouroux efdee645bf Handled case when instanceId is absent in network interfaces 2016-05-24 15:52:38 +02:00
stack72 68d035bc50 provider/aws: Change to `aws_dynamodb_table` hash_key forces a new
resource

We had a line on the Update func that said:

```
Hash key can only be specified at creation, you cannot modify it.
```

The resource has now been changed to ForceNew on the hashkey

```
aws_dynamodb_table.demo-user-table: Refreshing state... (ID: Users)
aws_dynamodb_table.demo-user-table: Destroying...
aws_dynamodb_table.demo-user-table: Destruction complete
aws_dynamodb_table.demo-user-table: Creating...
aws_dynamodb_table.demo-user-table: Creation complete
```
2016-05-24 11:39:55 +01:00
clint shryock 5fcc089266 provider/aws: Randomize an ASG/LC test 2016-05-23 10:20:14 -05:00
stack72 fd8ab99ffe provider/aws: Remove the description test from the Attributes tests as this now has a default value 2016-05-23 13:48:23 +01:00
Joshua Spence c193cbdc03 Add default description
Closes #6100. Set the default value for the `description` field to be "Managed by Terraform".
2016-05-23 06:46:45 +10:00
Paul Stack ec8c242ebf provider/aws: Add support for Skipping Final Snapshot in RDS Cluster (#6795)
* provider/aws: Add support for Skipping Final Snapshot in RDS Cluster
2016-05-20 12:52:26 -05:00
James Rasell e3352e855c provider/aws: Make 'stage_name' required in api_gateway_deployment (#6797)
When stage_name is not passed to the resource
aws_api_gateway_deployment a terraform apply will fail. This is
because the stage_name is required and not optional.
2016-05-20 15:55:08 +01:00
Mitchell Hashimoto 55583baa7e
Merge branch 'f-aws-import' 2016-05-18 15:28:12 -06:00
Mitchell Hashimoto 24c0adb2d4
providers/aws: revert LC change 2016-05-18 15:28:01 -06:00
Mitchell Hashimoto 4967f3ff08
providers/aws: route53 delegation set import 2016-05-18 13:26:52 -06:00
Mitchell Hashimoto 801d342496
providers/aws: route53 health check import 2016-05-18 13:15:59 -06:00
Mitchell Hashimoto 1c0a6bc6d3
providers/aws: basic route 53 zone import 2016-05-18 13:09:56 -06:00
Paul Stack 811667023b provider/aws: Add support for S3 Bucket Acceleration (#6628) 2016-05-18 11:33:03 -05:00
stack72 27f05b8e3b Merge branch 'wowgroup-aws-rds-cluster-param-group' 2016-05-18 14:11:47 +01:00
stack72 21a65fd085 provider/aws: Refreshing the state when `DBParameterGroupNotFound`
happens
2016-05-18 14:10:32 +01:00
Mark Severson 0315d51125 provider/aws: Query all pages of group membership
By default, group membership queries return pages of 100 users at a
time. Because of this, if there are more than 100 users in an
aws_iam_group_membership resource, the resource always reports as
needing to be changed (because it only sees 100 of the users as
existing in the group).

The group membership now queries all pages.

Fixes #6722
2016-05-17 16:27:02 -06:00
James Nugent 55002086e5 Merge pull request #6592 from hashicorp/b-aws-r53-name-state
provider/aws: Update Route53 Record to schema v1, normalizing name
2016-05-17 12:56:13 -05:00
James Nugent b08d741eb0 Merge pull request #6687 from hashicorp/b-aws-elasticache-param-crash
provider/aws: Fix crash in ElastiCache param group
2016-05-17 12:38:34 -05:00
Robert Conrad faa6ddb2ee provider/aws: Support for Redshift Cluster encryption using a KMS key (#6712) 2016-05-17 11:12:39 -05:00
clint shryock 91a1097041 provider/aws: Randomize key names in KMS alias test 2016-05-17 10:40:42 -05:00
Mitchell Hashimoto f64f470807
providers/aws: fix placement group import 2016-05-16 10:38:53 -07:00
Mitchell Hashimoto dc3163c464
providers/aws: placement group import 2016-05-16 10:35:44 -07:00
Mitchell Hashimoto 519f0ae4d6
providers/aws: launch configuration import 2016-05-16 10:26:49 -07:00
clint shryock 23340d3c84 provider/aws: Fix crash in ElastiCache param group 2016-05-16 12:20:06 -05:00
Mitchell Hashimoto a992860b8d
providers/aws: key_pair import 2016-05-16 10:13:20 -07:00
Mitchell Hashimoto 4e3488afb8
providers/aws: customer gateway import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 2a30178413
providers/aws: flow log import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto f6b77a6c02
providers/aws: import network ACLs 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 2d5745328b
providers/aws: import main route table association 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto ab7b5dab2d
providers/aws: route tables import assocations 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto a1035804d4
providers/aws: route table import should ignore default rule 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 08b7f67227
providers/aws: route table import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto a4e48b19c0
providers/aws ENI import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 9cdbed11ff
providers/aws: ebs volume and autoscaling group 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 884980da1a
providers/aws: instance, nat, internet gateway 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 830708a882
providers/aws: elb 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 91938cf55f
providers/aws: resource aws_subnet import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto b75d5bb46d
providers/aws: vpc dhcp options 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto da353c3637
aws/aws_vpc: import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 420e13d2f2
providers/aws: eip uses passthrough importstate 2016-05-16 10:03:57 -07:00
clint shryock b9d0e14d2a provider/aws: Update Lambda tests for more random names 2016-05-16 10:31:46 -05:00
Paul Stack cf37c3adaa provider/aws: Add support for `kms_key_id` to `aws_db_instance` (#6651)
As requested in #4822, add support for a KMS Key ID (ARN) for Db
Instance

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSDBInstance_kmsKey' 2>~/tf.log
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSDBInstance_kmsKey -timeout 120m
=== RUN   TestAccAWSDBInstance_basic
--- PASS: TestAccAWSDBInstance_basic (587.37s)
=== RUN   TestAccAWSDBInstance_kmsKey
--- PASS: TestAccAWSDBInstance_kmsKey (625.31s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    1212.684s
```
2016-05-13 11:20:29 -05:00
clint shryock 2047da21d5 provider/aws: Update hash in Redshift Security Group test 2016-05-13 10:52:21 -05:00
David Harris 0cb7496b3a provider/aws: fix Elastic Beanstalk `cname_prefix` (#6653)
Fixes an issue where the `cname_prefix` attribute isn't correctly read
in some regions.
2016-05-13 11:27:56 +01:00
Anton Koldaev 266e98eb30 Make the OpsWorks app_source SSH key write only
Similarly to https://github.com/hashicorp/terraform/pull/4241 prevent ssh_key in OpsWorks application app_source key from re-applying every time.
2016-05-12 16:35:25 -07:00
stack72 fdf1962905 Merge branch 'aws-rds-cluster-param-group' of https://github.com/wowgroup/terraform into wowgroup-aws-rds-cluster-param-group 2016-05-12 23:27:20 +01:00
clint shryock f70f778a5a provider/aws: Randomize DB Option Group Name to avoid name conflicts in Travis CI 2016-05-12 11:15:36 -05:00
clint shryock baed5dda36 provider/aws: Remove empty config in test 2016-05-12 09:34:16 -05:00
Paul Stack 61b5176fbe provider/aws: Updating state when `aws_sns_topic_subscription` is (#6629)
missing

Fixes #6625

When an SNS topic subscription was created with TF and then removed via
the AWS Console, Terraform threw an error:

```
* aws_sns_topic_subscription.testme: NotFound: Subscription does not
* exist
    status code: 404, request id: a22e7ed7-3630-5a8a-b767-317ac1440e24
```

This PR will remove the topic subscription from state on a NotFound and
will then readd the subscripton
2016-05-12 13:46:22 +01:00
stack72 cb4c8e6864 Merge branch 'Ticketmaster-db_option_group_settings' 2016-05-11 22:44:27 +01:00
stack72 420b24fa90 provider/aws: Fix `aws_db_option_group` `option_settings` test for
correct hash value
2016-05-11 22:43:17 +01:00
Mitchell Hashimoto 1c81aa3471
providers/aws: aws_security_group import test 2016-05-11 13:02:37 -07:00
Mitchell Hashimoto 6bdab07174
providers/aws: security group import imports rules 2016-05-11 13:02:36 -07:00
Mitchell Hashimoto 84fa3e5c9e
providers/aws: security group import 2016-05-11 13:02:36 -07:00
Mitchell Hashimoto eb9cb46256
providers/aws: enable aws_eip importing 2016-05-11 13:02:34 -07:00
Paul Stack 06b5cf737c provider/aws: `aws_codedeploy_deployment_group` Panics when setting (#6617)
`on_premises_instance_tag_filter`

When setting `on_premises_instance_tag_filter`, Terraform was not
pushing the changes on the cReate (due to a spelling mistake). A second
apply would push the tags and then cause a panic. Terraform was building
a ec2.Tagfilter struct without checking for optional values. When the
TagFilter was being dereferenced, it caused a panic
2016-05-11 18:38:03 +01:00
clint shryock e33847c8a8 Merge branch 'master' of github.com:hashicorp/terraform
* 'master' of github.com:hashicorp/terraform:
  Update CHANGELOG.md
  provider/vsphere: read gateway and ipv6_gateway
  provider/aws: Fix cloudtrail_tags config formatting in test (#6615)
  build: "make fmt" to ignore vendor packages
2016-05-11 10:39:21 -05:00
clint shryock 8344b4fb4b provider/aws: Format and correct IAM region for Cloudwatch test 2016-05-11 10:39:14 -05:00
Clint 250ee8d089 provider/aws: Fix cloudtrail_tags config formatting in test (#6615) 2016-05-11 10:18:45 -05:00
clint shryock 42ee519a31 provider/aws: Update Route53 Record to schema v1, normalizing name
The `name` attribute will always be normalized to a FQDN, with a trailing "dot"
at the end when returned from the API.

We store the name as it's provided in the configuration, so "www" stays as "www"
and "www.terraformtesting.io." stays as "www.terraformtesting.io.".

The problem here is that if we use a full name as above, and the configuraiton
does *not* include the trailing dot, the API will return a version that does,
and we'll have a conflict.

This is particularly bad when we have a lifecycle block with
`create_before_destroy`; the record will get an update posted (which ends up
being a no-op on AWS's side), but then we'll delete the same record immediately
after, resulting in no record at all.

This PR addresses that by trimming the trailing dot from the `name` when saving
to state. We migrate existing state to match, to avoid false-positive diffs.
2016-05-10 11:17:02 -05:00
Kraig Amador dc4dd764e6 Adding option_settings to aws_db_option_group 2016-05-09 12:40:38 -07:00
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