Commit Graph

4033 Commits

Author SHA1 Message Date
stack72 930a41b7c0 provider/aws: Slight design change to aws_elasticache_replication_group
We should error check up front on the use of num_cache_nodes and
cluster_mode. This allows us to write a test to make sure all works as
expected

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/09 19:04:56 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError -timeout 120m
=== RUN   TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError
--- PASS: TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError (40.58s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	40.603s
```
2017-05-09 20:37:28 +03:00
Derrick Petzold 55a4ce2838 Feature request: Support for ElastiCache Redis cluster mode #9419
Added support for provisioning a native redis cluster elasticache replication group.
A new TypeSet attribute `cluster_mode` has been added. It requires the following
fields:

  - `replicas_per_node_group` - The number of replica nodes in each node group
  - `num_node_groups` - The number of node groups for this Redis replication group

Notes:

  - `automatic_failover_enabled` must be set to true.
  - `number_cache_clusters` is now a optional and computed field. If `cluster_mode` is set
    its value will be computed as:
 	  ```num_node_groups + num_node_groups * replicas_per_node_group```

Below is a sample config:

  resource "aws_elasticache_replication_group" "bar" {
      replication_group_id = "tf-redis-cluser"
      replication_group_description = "test description"
      node_type = "cache.t2.micro"
      port = 6379
      parameter_group_name = "default.redis3.2.cluster.on"
      automatic_failover_enabled = true
      cluster_mode {
          replicas_per_node_group = 1
          num_node_groups = 2
      }
  }
2017-05-09 20:37:28 +03:00
Paul Stack 67bbad1cf0 provider/aws: Update the ignoring of AWS specific tags (#14321)
We were too greedy with the AWS specific tags ignore function - we
basically were ignoring anything starting with `aws` rather than just
using `aws:`

Fixes: #14308
Fixes: #14247
2017-05-09 20:19:33 +03:00
Jake Champlin 770b861508 Merge pull request #14304 from paybyphone/zero-value-aws-lb-names
Allows zero-value ELB and ALB names
2017-05-09 13:16:41 -04:00
Jake Champlin 4677aca349 Merge pull request #14319 from hashicorp/f-update-partition-check
provider/aws: Use helper methods for checking partition
2017-05-09 12:30:07 -04:00
Jake Champlin 67ea7a3a08
reverse if statement 2017-05-09 12:19:50 -04:00
Jake Champlin 19e29c2944
provider/aws: Use helper methods for checking partition 2017-05-09 12:17:27 -04:00
Clint 88c2e29f91 provider/aws: Consolidate IAM Account Alias tests (#14316)
* provider/aws: combine aws alias tests

* tweaks

* fix up

* uncomment
2017-05-09 11:12:07 -05:00
Jake Champlin 7b05d7f050 Merge pull request #12414 from jmcarp/govcloud-cloudwatchlogs-tags
Skip tag operations on cloudwatch logs in govcloud partition.
2017-05-09 12:10:09 -04:00
Paul Stack 9dd4e5bcb0 provider/aws: Add support for targets to aws_ssm_association (#14246)
* provider/aws: Add support for targets to aws_ssm_association

Fixes: #13975

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSSMAssociation_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/05 20:32:43 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSSMAssociation_ -timeout 120m
=== RUN   TestAccAWSSSMAssociation_basic
--- PASS: TestAccAWSSSMAssociation_basic (139.13s)
=== RUN   TestAccAWSSSMAssociation_withTargets
--- PASS: TestAccAWSSSMAssociation_withTargets (33.19s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	172.343s
```

* Update ssm_association.html.markdown
2017-05-09 17:48:57 +03:00
stack72 d637885dc3
provider/aws: Removal of Optional from aws_ses_domain_identity arn param
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsSESDomainIdentity_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/09 13:05:15 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsSESDomainIdentity_ -timeout 120m
=== RUN   TestAccAwsSESDomainIdentity_basic
--- PASS: TestAccAwsSESDomainIdentity_basic (23.53s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	23.545s
```
2017-05-09 13:06:11 +03:00
stack72 880071ded5
Merge branch 'ses-arn' of https://github.com/joshuaspence/terraform into joshuaspence-ses-arn 2017-05-09 13:04:27 +03:00
Joshua Spence f488e385f2 Add `arn` attribute to `aws_ses_domain_identity` resource 2017-05-09 17:14:51 +10:00
Graham Davison 7ad0cdd8b0 Allows zero-value ELB and ALB names 2017-05-08 23:06:59 -07:00
clint shryock 8b252d19ab provider/aws: Update TestAccAWSCloudWatchEventTarget_ssmDocument / TestAccAWSCloudWatchEventTarget_full tests to avoid name collisions 2017-05-08 16:22:58 -05:00
Paul Stack 221a88610b provider/aws: Add support for importing Kinesis Streams (#14278)
Fixes: #14260

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSKinesisStream_import'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/08 10:32:47 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSKinesisStream_import -timeout 120m
=== RUN   TestAccAWSKinesisStream_importBasic
--- PASS: TestAccAWSKinesisStream_importBasic (101.93s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	101.978s
```
2017-05-08 14:11:23 +03:00
Paul Stack 03e4e00673 provider/aws: Refresh ssm document from state on 404 (#14279)
* provider/aws: Refresh ssm document from state on 404

Originally reported in #13976

When an SSM Document was deleted outside of Terraform, a terraform
refresh would return the following:

```
% 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_ssm_document.foo: Refreshing state... (ID: test_document-stack72)
Error refreshing state: 1 error(s) occurred:

* aws_ssm_document.foo: aws_ssm_document.foo: [ERROR] Error describing SSM document: InvalidDocument:
	status code: 400, request id: 70c9bed1-33bb-11e7-99aa-697e9b0914e9

```

On applying this patch, it now looks as follows:

```
% 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_ssm_document.foo: Refreshing state... (ID: test_document-stack72)
  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_ssm_document.foo
      arn:              "<computed>"
      content:          "    {\n      \"schemaVersion\": \"1.2\",\n      \"description\": \"Check ip configuration of a Linux instance.\",\n      \"parameters\": {\n\n      },\n      \"runtimeConfig\": {\n        \"aws:runShellScript\": {\n          \"properties\": [\n            {\n              \"id\": \"0.aws:runShellScript\",\n              \"runCommand\": [\"ifconfig\"]\n            }\n          ]\n        }\n      }\n    }\n"
      created_date:     "<computed>"
      default_version:  "<computed>"
      description:      "<computed>"
      document_type:    "Command"
      hash:             "<computed>"
      hash_type:        "<computed>"
      latest_version:   "<computed>"
      name:             "test_document-stack72"
      owner:            "<computed>"
      parameter.#:      "<computed>"
      platform_types.#: "<computed>"
      schema_version:   "<computed>"
      status:           "<computed>"

  Plan: 1 to add, 0 to change, 0 to destroy.
```

* Update resource_aws_ssm_document.go
2017-05-08 13:50:16 +03:00
Radek Simko b3eefecc05 provider/aws: Retry deletion of AWSConfig Rule on ResourceInUseException (#14269) 2017-05-08 11:15:12 +02:00
Russ Van Bert e88ca0b744 Grammar correction in alarm description (#14276) 2017-05-08 09:35:59 +03:00
Jake Champlin 00de514749 Merge pull request #14256 from alexwlchan/fix-error-message
Improve the wording of an error message
2017-05-05 17:15:09 -04:00
Alex Chan 8b22a85736
Improve the wording of an error message 2017-05-05 22:00:42 +01:00
Jake Champlin 88c6e95e4f Merge pull request #14245 from hashicorp/f-add-arn-security-group-data-source
provider/aws: Add ARN to security group data source
2017-05-05 15:12:34 -04:00
Jake Champlin ed403882e2
provider/aws: Add ARN to security group data source
Adds computed `arn` to security group data source

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccDataSourceAwsSecurityGroup"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/05/05 10:17:35 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccDataSourceAwsSecurityGroup -timeout 120m
=== RUN   TestAccDataSourceAwsSecurityGroup
--- PASS: TestAccDataSourceAwsSecurityGroup (56.72s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    56.725s
```
2017-05-05 10:25:52 -04:00
stack72 827a541b08
Removing contributor comment from CHANGELOG as it was in the wrong section 2017-05-05 17:14:53 +03:00
Gauthier Wallet c8ce9883bb provider/aws: Improved IAM Role description tests (#14220) 2017-05-05 17:03:59 +03:00
Kannan Goundan e1455350b8 aws_route53_record: More consistent unquoting of TXT/SPF records. (#14170)
* aws_route53_record: More consistent unquoting of TXT/SPF records.

Before, 'flatten' would remove the first two quotes.  This results in
confusing behavior if the value contained two quoted strings.

Now, 'flatten' we only remove the surrounding qutoes, which is more
consistent with 'expand'.

Should improve hashicorp/terraform#8423, but more could still be done.

* aws/route53: Cover new bugfix with an acceptance test
2017-05-05 11:41:53 +02:00
Paul Stack 3bb4c56165 provider/aws: Prevent Crash when importing aws_route53_record (#14218)
Fixes: #14217

We now check to make sure that we have the correct number of parts when
we have split the resource ID. It isn't an elegant fix but it works as
expected. Also added some more documentation about what is required to
actually construct the Id needed for import
2017-05-04 21:51:10 +03:00
Paul Stack 046bb0e1c3 provider/aws: Support run_command_parameters in aws_cloudwatch_event_target (#14067)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchEventTarget_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/29 11:00:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchEventTarget_ -timeout 120m
=== RUN   TestAccAWSCloudWatchEventTarget_basic
--- PASS: TestAccAWSCloudWatchEventTarget_basic (58.75s)
=== RUN   TestAccAWSCloudWatchEventTarget_missingTargetId
--- PASS: TestAccAWSCloudWatchEventTarget_missingTargetId (36.11s)
=== RUN   TestAccAWSCloudWatchEventTarget_full
--- PASS: TestAccAWSCloudWatchEventTarget_full (90.30s)
=== RUN   TestAccAWSCloudWatchEventTarget_ssmDocument
--- PASS: TestAccAWSCloudWatchEventTarget_ssmDocument (38.64s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	223.833s
```
2017-05-04 20:46:11 +03:00
Paul Stack e18f8df845 provider/aws: Add support for aws_ssm_maintenance_window (#14087)
* provider/aws: Add support for aws_ssm_maintenance_window

Fixes: #14027

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSSMMaintenanceWindow_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/29 13:38:19 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSSMMaintenanceWindow_basic -timeout 120m
=== RUN   TestAccAWSSSMMaintenanceWindow_basic
--- PASS: TestAccAWSSSMMaintenanceWindow_basic (51.69s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	51.711s
```

* provider/aws: Add documentation for aws_ssm_maintenance_window

* provider/aws: Add support for aws_ssm_maintenance_window_target

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSSMMaintenanceWindowTarget'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/29 16:38:22 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSSMMaintenanceWindowTarget -timeout 120m
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_basic
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_basic (34.68s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	34.701s
```

* provider/aws: Adding the documentation for aws_ssm_maintenance_window_target

* provider/aws: Add support for aws_ssm_maintenance_window_task

* provider/aws: Documentation for aws_ssm_maintenance_window_task
2017-05-04 20:36:28 +03:00
stack72 fff5fed0f0
provider/aws: Change aws_iam_role description to not pass empty string 2017-05-04 18:46:36 +03:00
Masayuki Morita 410fdad2cb provider/aws: Add support description to aws_iam_role
Fixes #14198
2017-05-04 23:11:20 +09:00
Matthew Frahry bcf1514422 Merge pull request #14090 from hashicorp/p-aws-config-config-source-detail
provider/aws Added default to event source
2017-05-03 18:36:02 -06:00
Paul Thrasher ccae9372e5 provider/aws: aws_db_option_group normalizes name to lowercase
This is a fix for PR #11040. The code here lowercases the name and/or prefix before sending it to the AWS API and the terraform state. This means the state will match the actual resource name and be able to converge the diff.
2017-05-03 16:50:40 -07:00
Paddy c043f1185c Merge pull request #14163 from hashicorp/paddy_14152_sfr_tenancy
provider/aws: support tenancy for spot fleets
2017-05-03 13:53:45 -07:00
Paddy 76795dc2fc Fix whitespace. 2017-05-03 13:28:37 -07:00
Paddy a345cc45d7 provider/aws: support tenancy for spot fleets
Add the `placement_tenancy` attribute to the `aws_spot_fleet_request`
resource so users can request instances use dedicated hardware.

Fixes #14152.
2017-05-02 15:52:54 -07:00
Jake Champlin 43a2220808 Merge pull request #14064 from dgolja/bugfix/sns_delivery_policy
provider/aws: Fixes the bug where SNS delivery policy get always recreated
2017-05-02 10:33:42 -04:00
Dejan Golja 1df7e3afad acceptance test for SNS delivery policy 2017-05-03 00:11:58 +10:00
Kannan Goundan adb789f0f8 aws_route53_record: Only unquote the record types that we quote. (#11257)
Also clean up the code a little.
2017-05-02 10:31:51 +01:00
Clint a8e4a9bf07 provider/aws: Update `aws_emr_cluster` to support Security Configuration (#14133)
* added emr security configurations

* gofmt after rebase

* provider/aws: Update EMR Cluster to support Security Configuration

* update test to create key

* update docs
2017-05-01 17:02:59 -05:00
Jake Champlin 3a01d5f5e1 Merge pull request #14104 from rlweb/feature/aws_dynamodb_table-add-timetolive
provider/aws: aws_dynamodb_table Add support for TimeToLive
2017-05-01 15:37:34 -04:00
Rhys Laval 64b5ff54eb Fix vet issue 2017-05-01 19:56:21 +01:00
Rhys Laval 8230a5ded8 provider/aws: aws_dynamodb_table Add support for TimeToLive. Fix errcheck 2017-04-30 23:34:19 +01:00
Rhys Laval 27d3d2a871 provider/aws: aws_dynamodb_table Add support for TimeToLive 2017-04-30 23:20:38 +01:00
Chris Kent 21f4848006 provider/aws: add additional custom endpoints
* Add option for custom CloudFormation, KMS, RDS, SNS, SQS endpoints
* Minor formatting to arrange internal endpoint variables alphabetically
* Minor refactoring for consistent internal endpoint variable naming
* Update CHANGELOG
* Update docs accordingly
2017-04-29 22:49:43 -04:00
Gareth Oakley e4c732b34c Add support for IAMDatabaseAuthenticationEnabled 2017-04-29 20:32:21 +01:00
= 46cb9d30f3 Added default to event source 2017-04-29 10:03:26 -06:00
stack72 be002d9345
provider/aws: Add documentation for the EFS File System DataSource 2017-04-29 11:38:10 +12:00
stack72 6f4f13e462
Merge branch 'provider/aws/data_source_aws_efs_file_system' of https://github.com/craigknott/terraform into craigknott-provider/aws/data_source_aws_efs_file_system 2017-04-29 11:09:44 +12:00
Clint 7c59f7e282 provider/aws: Add EMR Security Configuration Resource (#14080)
* provider/aws: Add EMR Security Configuration

* provider/aws: Document EMR security configuration

* small refactoring and add an import test
2017-04-28 16:28:49 -05:00