Commit Graph

3715 Commits

Author SHA1 Message Date
Gauthier Wallet cdc3fa8337 provider/aws: Added conflictsWith for API GW Domain Name certificate_arn (#12649) 2017-03-13 19:50:44 +02:00
Paul Stack 41c27082bb provider/aws: Add support for ACM certificates to (#12592)
api_gateway_domain_name

Fixes: #12566

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayDomainName_'         ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/10 19:32:31 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayDomainName_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayDomainName_basic
--- PASS: TestAccAWSAPIGatewayDomainName_basic (54.06s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	54.091s
```
2017-03-13 11:43:28 +02:00
Radek Simko 61eb190b4e Merge pull request #12633 from radeksimko/b-aws-opsworks-test-fix
aws: Fix opsworks app acc test w/ missing value
2017-03-13 09:11:04 +00:00
Harry Hull f28c811534 Fixes #11258 (#12595)
If the user_arn changes on the user_profile resource we should delete it and recreate it
instead of attempting to modify it incorrectly and causing the terraform apply to fail.

I also added an acceptance test that will trigger this case.
2017-03-13 09:05:22 +00:00
Lucas Vasconcelos Santana 1a957a0481 provider/aws: Add address, port, hosted_zone_id and endpoint for aws_db_instance datasource (#12623)
* Add address, port, hosted_zone_id and endpoint information to datasource aws_db_instance

* Update the docs
2017-03-13 10:31:24 +02:00
Paul Stack bcda5176ea provider/aws: Refresh iam saml provider from state on 404 (#12602)
Fixes: #12599

Before this patch:

```
% terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_saml_provider.salesforce: Refreshing state... (ID: arn:aws:i...rce-test)
Error refreshing state: 1 error(s) occurred:

* aws_iam_saml_provider.salesforce: aws_iam_saml_provider.salesforce: NoSuchEntity: Manifest not found for arn arn:aws:iam::187416307283:saml-provider/tf-salesforce-test
	status code: 404, request id: fc32c7f8-0631-11e7-8e1f-29a8c10edf64
```

After this patch:

```
% terraform plan                                                                                  ✚ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_saml_provider.salesforce: Refreshing state... (ID: arn:aws:i...rce-test)
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed. Cyan entries are data sources to be read.

Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.

+ aws_iam_saml_provider.salesforce
    arn:                    "<computed>"
    name:                   "tf-salesforce-test"
```
2017-03-13 10:18:29 +02:00
Radek Simko 6293d7a4fc
aws: Randomize opsworks application names in test 2017-03-13 08:05:48 +00:00
Radek Simko a67bddef98
aws: Fix opsworks app acc test w/ missing value 2017-03-13 08:05:03 +00:00
Benjamin Lau 6adc71a6d4 provider/aws: output the task definition name when errors occur during refresh (#12609) 2017-03-12 16:03:36 +02:00
Clint 1daac2f5c7 provider/aws: Update spot instance request to store new ipv6 (#12571) 2017-03-10 14:49:28 -06:00
clint shryock 4a34fb1d34 fix go vet issue 2017-03-10 11:25:58 -06:00
clint shryock 87c91f5bc8 provider/aws: annoymize tags in VPC data source test 2017-03-10 10:48:35 -06:00
Clint d24c761bbb more aws acc test fixes (#12568)
* provider/aws: fix TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity

* provider/aws: Randomize to fix TestAccDataSourceAwsVpc_basic
2017-03-09 16:01:18 -06:00
Clint 3fdeacdca7 helper/schema: Rename Timeout resource block to Timeouts (#12533)
helper/schema: Rename Timeout resource block to Timeouts

- Pluralize configuration argument name to better represent that there is
one block for many timeouts
- use a const for the configuration timeouts key
- update docs
2017-03-09 14:40:14 -06:00
clint shryock 3022eb6da0 provider/aws: fix acc test for data source 2017-03-08 15:43:57 -06:00
Paul Stack 10f080f315 provider/aws: Prevent aws_dms_replication_task panic (#12539)
Fixes: #12506

When a replication_task cdc_start_time was specified as an int, it was
causing a panic as the conversion to a Unix timestampe was expecting a
string

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsDmsReplicationTaskBasic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/08 22:55:29 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsDmsReplicationTaskBasic -timeout 120m
=== RUN   TestAccAwsDmsReplicationTaskBasic
--- PASS: TestAccAwsDmsReplicationTaskBasic (1089.77s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	1089.802s
```
2017-03-08 23:27:47 +02:00
clint shryock 7f87abae91 provider/aws: increase randomization in beantsalk app version tests 2017-03-08 15:25:41 -06:00
Clint c5b833b999 provider/aws: Default build_timeout to 60, matching docs, update tests (#12531) 2017-03-08 14:14:02 -06:00
Paul Stack b5b53bc56a provider/aws: Error on trying to recreate an existing customer gateway (#12501)
Fixes: #7492

When we use the same IP Address, BGP ASN and VPN Type as an existing
aws_customer_gateway, terraform will take control of that gateway (not
import it!) and try and modify it. This could be very bad

There is a warning on the AWS documentation that one gateway of the same
parameters can be created, Terraform is now going to error if a gateway
of the same parameters is attempted to be created

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCustomerGateway_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/07 18:40:39 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCustomerGateway_ -timeout 120m
=== RUN   TestAccAWSCustomerGateway_importBasic
--- PASS: TestAccAWSCustomerGateway_importBasic (31.11s)
=== RUN   TestAccAWSCustomerGateway_basic
--- PASS: TestAccAWSCustomerGateway_basic (68.72s)
=== RUN   TestAccAWSCustomerGateway_similarAlreadyExists
--- PASS: TestAccAWSCustomerGateway_similarAlreadyExists (35.18s)
=== RUN   TestAccAWSCustomerGateway_disappears
--- PASS: TestAccAWSCustomerGateway_disappears (25.13s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	160.172s
```
2017-03-08 21:11:59 +02:00
Paul Stack 0b0a76a3d5 provider/aws: Add the IPV6 cidr block to the vpc datasource (#12529)
Fixes: #12526

```
% make testacc TEST=./builtin/providers/aws  TESTARGS='-run=TestAccDataSourceAwsVpc_ipv6Associated'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/08 17:42:13 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccDataSourceAwsVpc_ipv6Associated -timeout 120m
=== RUN   TestAccDataSourceAwsVpc_ipv6Associated
--- PASS: TestAccDataSourceAwsVpc_ipv6Associated (71.33s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws71.366s
```
2017-03-08 21:08:37 +02:00
Clint f6ac200aca provider/aws: Rename 'timeout' to 'build_timeout' for Codebuild (#12503) 2017-03-08 09:29:54 -06:00
Clint 5d894e4ffd Fix up command and some go fmt issues (#12509) 2017-03-07 16:03:45 -06:00
Matt Dainty 3d335e48ff Check instance is running before trying to attach (#12459)
This covers the scenario of an instance created by a spot request. Using
Terraform we only know the spot request is fulfilled but the instance can
still be pending which causes the attachment to fail.
2017-03-07 16:20:01 +02:00
Jack Bruno 6c0caaf1dd Fix aws_dms_replication_task diff for json with whitespace. (#12380) 2017-03-07 16:00:02 +02:00
stack72 1dedf666df
provider/aws: Adding an acceptance test to for ForceNew on
ecs_task_definition volumes
2017-03-07 15:53:00 +02:00
Pawel Burchard aa8de2f8cf
provider/aws: (#10587) Changing volumes in ECS task definition should force new revision. 2017-03-07 15:53:00 +02:00
stack72 61c101da29
Merge branch 'Originate-mb-fix-spot-fleet-request' 2017-03-07 15:28:24 +02:00
stack72 80e8418846
provider/aws: Change aws_spot_fleet_request tests to use the correct
hash values in test cases
2017-03-07 15:14:52 +02:00
Clint d2f728e6cd provider/aws: Only send iops when creating io1 devices. Fix docs (#12392) 2017-03-07 14:44:39 +02:00
stack72 2d0770c507
Merge branch 'mb-fix-spot-fleet-request' of https://github.com/Originate/terraform into Originate-mb-fix-spot-fleet-request 2017-03-06 16:03:16 +02:00
Brandon Clodius 22f69b1592 aws/provider: Fixes issue for aws_lb_ssl_negotiation_policy of already deleted ELB (#12360)
* Ensures elb exists before negotiation policy check; Fixes #11260

* Adds acceptance test case for missing elb

* Adds back https properties for test elb
2017-03-06 13:48:35 +02:00
Paul Stack bed8940953 provider/aws: Populate the iam_instance_profile uniqueId (#12449)
Fixes: #12430
2017-03-06 13:39:49 +02:00
David Harris 01f995fed5 provider/aws: Return errors from Elastic Beanstalk (#12425)
In the event that an unexpected state is returned from
`environmentStateRefreshFunc` errors in the Elastic Beanstalk console
will not be returned to the user.
2017-03-05 15:28:37 +02:00
Maxime Bury 0af10dec41 Fix spurious user_data diffs 2017-03-03 17:58:18 -08:00
Maxime Bury 93c4730de7 Properly handle 'vpc_security_group_ids', drop phantom 'security_groups' 2017-03-03 17:25:15 -08:00
Maxime Bury 4eba77eaee Default 'ebs_optimized' and 'monitoring' to false 2017-03-03 17:23:15 -08:00
clint shryock a0a26748f8 provider/aws: Randomize a flow log test 2017-03-03 11:55:58 -06:00
clint shryock 2d045a3302 provider/aws: Update Autoscaling attachment test 2017-03-03 11:18:30 -06:00
Clint 3aba4af5b0 Merge pull request #12385 from hashicorp/b-aws-instance-ipv6-fix
provider/aws: Always set ipv6 addresses in read
2017-03-02 16:32:38 -06:00
clint shryock 9bb2628c49 provider/aws: Always set ipv6 addresses in read 2017-03-02 15:00:24 -06:00
Clint 2fe5976aec helper/schema: Add configurable Timeouts (#12311)
* helper/schema: Add custom Timeout block for resources

* refactor DefaultTimeout to suuport multiple types. Load meta in Refresh from Instance State

* update vpc but it probably wont last anyway

* refactor test into table test for more cases

* rename constant keys

* refactor configdecode

* remove VPC demo

* remove comments

* remove more comments

* refactor some

* rename timeKeys to timeoutKeys

* remove note

* documentation/resources: Document the Timeout block

* document timeouts

* have a test case that covers 'hours'

* restore a System default timeout of 20 minutes, instead of 0

* restore system default timeout of 20 minutes, refactor tests, add test method to handle system default

* rename timeout key constants

* test applying timeout to state

* refactor test

* Add resource Diff test

* clarify docs

* update to use constants
2017-03-02 11:07:49 -06:00
stack72 0d4f4cac18
provider/aws: Adding a test that covers the new IAM Instance Profile
association to AWS Instance
2017-03-02 10:38:33 +00:00
stack72 185b59f125
Merge branch 'master' of https://github.com/myoung34/terraform into myoung34-master 2017-03-02 05:26:54 +00:00
netjunki 72a8b1d62f aws/provider: redshift cluster exercise invalid password char path (#12359)
* aws/provider: redshift cluster exercise invalid password char path

* we need the password to be valid except for the one problem character
2017-03-02 04:55:42 +00:00
netjunki 2cfe385653 provider/aws: improve redshift cluster validation (#12313)
* provider/aws: improve redshift cluster validation

* aws/provider: redshift cluster mixed case name should be an invalid name
2017-03-01 23:56:22 +00:00
Paul Stack c5da896d22 provider/aws: Add support for import of aws_elasticsearch_domain (#12330)
Fixes: #12180
2017-03-01 23:53:35 +00:00
netjunki 8e48a5bbcb provider/aws: more details on which s3 bucket had an error (#12314)
* provider/aws: more details on which s3 bucket had an error

* provider/aws: s3 bucket data source adjust error output
2017-03-01 23:00:47 +00:00
Paul Stack 185c3dffe0 provider/aws: Refresh cloudwatch log subscription filter on 404 (#12333)
Fixes:#11750

Before this change, adding a log_subscription_filter and then deleting
it manually would yield this error on terraform plan/apply:

```
% terraform plan                                                                                                             ✹ ✭
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_role.iam_for_lambda: Refreshing state... (ID: test_lambdafuntion_iam_role_example123)
aws_cloudwatch_log_group.logs: Refreshing state... (ID: example_lambda_name)
aws_iam_role_policy.test_lambdafunction_iam_policy: Refreshing state... (ID: test_lambdafuntion_iam_role_example123:test_lambdafunction_iam_policy)
aws_lambda_function.test_lambdafunction: Refreshing state... (ID: example_lambda_name_example123)
aws_lambda_permission.allow_cloudwatch_logs: Refreshing state... (ID: AllowExecutionFromCloudWatchLogs)
aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Refreshing state... (ID: cwlsf-992677504)
Error refreshing state: 1 error(s) occurred:

* aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Subscription filter for log group example_lambda_name with name prefix test_lambdafunction_logfilter not found!

```

After this patch, we get the following behaviour:

```
% terraform plan                                                                                                             ✹ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_role.iam_for_lambda: Refreshing state... (ID: test_lambdafuntion_iam_role_example123)
aws_cloudwatch_log_group.logs: Refreshing state... (ID: example_lambda_name)
aws_lambda_function.test_lambdafunction: Refreshing state... (ID: example_lambda_name_example123)
aws_iam_role_policy.test_lambdafunction_iam_policy: Refreshing state... (ID: test_lambdafuntion_iam_role_example123:test_lambdafunction_iam_policy)
aws_lambda_permission.allow_cloudwatch_logs: Refreshing state... (ID: AllowExecutionFromCloudWatchLogs)
aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Refreshing state... (ID: cwlsf-992677504)
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed. Cyan entries are data sources to be read.

Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.

+ aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter
    destination_arn: "arn:aws:lambda:us-west-2:187416307283:function:example_lambda_name_example123"
    filter_pattern:  "logtype test"
    log_group_name:  "example_lambda_name"
    name:            "test_lambdafunction_logfilter"
    role_arn:        "<computed>"

Plan: 1 to add, 0 to change, 0 to destroy.
```
2017-03-01 22:12:50 +00:00
Paul Stack 26926aca77 provider/aws: reading multiple pages of aws_efs_file_system tags (#12328)
Fixes: #12232

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEFSFileSystem_pagedTags'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEFSFileSystem_pagedTags -timeout 120m
=== RUN   TestAccAWSEFSFileSystem_pagedTags
--- PASS: TestAccAWSEFSFileSystem_pagedTags (39.51s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.537s
```
2017-03-01 22:09:13 +00:00
Paul Stack 177400dbbf provider/aws: Implement IPV6 Support for ec2 / VPC (#10538)
* provider/aws: Add support for IPV6 enabled VPC

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSVpc'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/09 14:07:31 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSVpc -timeout 120m
=== RUN   TestAccAWSVpc_importBasic
--- PASS: TestAccAWSVpc_importBasic (43.03s)
=== RUN   TestAccAWSVpc_basic
--- PASS: TestAccAWSVpc_basic (36.32s)
=== RUN   TestAccAWSVpc_enableIpv6
--- PASS: TestAccAWSVpc_enableIpv6 (29.37s)
=== RUN   TestAccAWSVpc_dedicatedTenancy
--- PASS: TestAccAWSVpc_dedicatedTenancy (36.63s)
=== RUN   TestAccAWSVpc_tags
--- PASS: TestAccAWSVpc_tags (67.54s)
=== RUN   TestAccAWSVpc_update
--- PASS: TestAccAWSVpc_update (66.16s)
=== RUN   TestAccAWSVpc_bothDnsOptionsSet
--- PASS: TestAccAWSVpc_bothDnsOptionsSet (16.82s)
=== RUN   TestAccAWSVpc_DisabledDnsSupport
--- PASS: TestAccAWSVpc_DisabledDnsSupport (36.52s)
=== RUN   TestAccAWSVpc_classiclinkOptionSet
--- PASS: TestAccAWSVpc_classiclinkOptionSet (38.13s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	739.543s
```

* provider/aws: New Resource: aws_egress_only_internet_gateway

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEgressOnlyInternetGateway_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/09 14:22:16 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEgressOnlyInternetGateway_ -timeout 120m
=== RUN   TestAccAWSEgressOnlyInternetGateway_basic
--- PASS: TestAccAWSEgressOnlyInternetGateway_basic (32.67s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	32.692s
```

* provider/aws: Add IPV6 support to aws_subnet

```
% make testacc TEST=./builtin/providers/aws
% TESTARGS='-run=TestAccAWSSubnet_'
% 1 ↵ ✹ ✭
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/27 19:08:34 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSubnet_
-timeout 120m
=== RUN   TestAccAWSSubnet_importBasic
--- PASS: TestAccAWSSubnet_importBasic (69.88s)
=== RUN   TestAccAWSSubnet_basic
--- PASS: TestAccAWSSubnet_basic (51.28s)
=== RUN   TestAccAWSSubnet_ipv6
--- PASS: TestAccAWSSubnet_ipv6 (90.39s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws211.574s
```

* provider/aws: Add support for running aws_instances with ipv6 addresses
2017-03-01 16:16:59 +00:00