Commit Graph

2701 Commits

Author SHA1 Message Date
Brad Sickles 732b8d3b6e Implementing aws_ami_launch_permission. (#7365) 2016-07-21 23:08:32 +01:00
Paul Hinze 261043fd1a Merge pull request #7523 from hashicorp/f-aws-beanstalk-env-poll-timing
provider/aws: Beanstalk environments, bump the minimum timeout between API calls
2016-07-21 16:43:21 -05:00
Paul Stack eb314ee520 provider/aws: Set `storage_encrypted` to state in (#7751)
`aws_rds_cluster_instance`

The Import test showed that there was no setting of the
`storage_encrypted` value back to state on the Read func.

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSClusterInstance_importBasic'
==> 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=TestAccAWSRDSClusterInstance_importBasic -timeout 120m
=== RUN   TestAccAWSRDSClusterInstance_importBasic
--- PASS: TestAccAWSRDSClusterInstance_importBasic (754.30s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    754.411s
```
2016-07-21 14:16:13 -05:00
stack72 399f1c20e0
provider/aws: Rename the Basic Import test for CloudFront distributions 2016-07-21 12:41:01 +01:00
stack72 c9a53c20ba
Merge branch 'rossd/cloudfront_import' of https://github.com/dropbox/terraform into dropbox-rossd/cloudfront_import 2016-07-21 10:31:35 +01:00
Paul Hinze df5d2c9a63 provider/aws: pull iamconn setup earlier (#7734)
Fixes problem introduced in re-arrangement of config
2016-07-21 00:38:14 +01:00
Jan Schumann ecb4b5aada providers/aws: Opsworks permission resource (#6304)
* add opsworks permission resource

* add docs

* remove permission from state if the permission object could not be found

* remove nil validate function. validation is done in schema.Resource.

* add id to the list of exported values

* renge over permission to check that we have found got the correct one

* removed comment

* removed set id

* fix unknown region us-east-1c

* add user_profile resource

* add docs

* add default value
2016-07-21 00:29:33 +01:00
Paul Stack a2c5b31490 provider/aws: Support kms_key_id for `aws_rds_cluster` (#7662)
* provider/aws: Support kms_key_id for `aws_rds_cluster`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSCluster_'
==> 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=TestAccAWSRDSCluster_
-timeout 120m
=== RUN   TestAccAWSRDSCluster_basic
--- PASS: TestAccAWSRDSCluster_basic (127.57s)
=== RUN   TestAccAWSRDSCluster_kmsKey
--- PASS: TestAccAWSRDSCluster_kmsKey (323.72s)
=== RUN   TestAccAWSRDSCluster_encrypted
--- PASS: TestAccAWSRDSCluster_encrypted (173.25s)
=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- PASS: TestAccAWSRDSCluster_backupsUpdate (264.07s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    888.638s
```

* provider/aws: Add KMS Key ID to `aws_rds_cluster_instance`

```

```
2016-07-20 23:52:34 +01:00
Paul Hinze 4078221957 provider/aws: Clean up aws config path a bit (#7672)
Rearrange client setup, and remove the extraneous log lines we make per
connection. There's no need to log one line per API client - we're just
setting up structs for most of them.

Since this collapses the file down quite a bit, switch to alphabetized
client setup, since previously there wasn't much of an order to things.
2016-07-20 23:49:57 +01:00
Ross Delinger 6ef7f9cd4d Add import support to CloudFront Distributions.
* Import support and acceptance tests for import support have been added.
* geo_restriction.location is now guarnteed to be in sorted order (was
causing a failure in the test)
2016-07-20 15:25:06 -07:00
Clint 4d126aaf6f provider/aws: Fix regression in Security Group Rules with self reference (#7706)
* provider/aws: Failing test for #7670

* provider/aws: Fix security group rule regression with self (#7670)
2016-07-20 15:47:10 -05:00
Paul Stack b4fa54e3c0 provider/aws: Support Import `aws_rds_cluster` (#7366)
```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSRDSCluster_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=TestAccAWSRDSCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRDSCluster_importBasic
--- FAIL: TestAccAWSRDSCluster_importBasic (122.71s)
    testing.go:255: Step 1 error: ImportStateVerify attributes not
    equivalent. Difference is shown below. Top is actual, bottom is
    expected.

    (map[string]string) {

    }

(map[string]string) (len=1) {
         (string) (len=19) "skip_final_snapshot": (string) (len=4) "true"

}

FAIL
exit status 1
FAIL    github.com/hashicorp/terraform/builtin/providers/aws    122.733s
make: *** [testacc] Error 1
```
2016-07-20 19:53:37 +01:00
Paul Stack 7879450cf3 provider/aws: Fix the import of `aws_redshift_cluster` breaking (#7677)
`skip_final_snapshot`

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRedshiftCluster_importBasic'
==> 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=TestAccAWSRedshiftCluster_importBasic -timeout 120m
=== RUN   TestAccAWSRedshiftCluster_importBasic
--- PASS: TestAccAWSRedshiftCluster_importBasic (641.87s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    641.888s
```
2016-07-20 19:38:44 +01:00
Paul Stack 5cd1b6624a provider/aws: Support Tags on `aws_rds_cluster` (#7695)
Fixes #7692

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSRDSCluster_'
==> 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=TestAccAWSRDSCluster_
-timeout 120m
=== RUN   TestAccAWSRDSCluster_basic
--- PASS: TestAccAWSRDSCluster_basic (160.77s)
=== RUN   TestAccAWSRDSCluster_updateTags
--- PASS: TestAccAWSRDSCluster_updateTags (329.20s)
=== RUN   TestAccAWSRDSCluster_encrypted
--- PASS: TestAccAWSRDSCluster_encrypted (227.29s)
=== RUN   TestAccAWSRDSCluster_backupsUpdate
--- PASS: TestAccAWSRDSCluster_backupsUpdate (196.92s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    914.199s
```
2016-07-20 19:37:26 +01:00
Paul Stack ee9114bcc4 provider/aws: Fix bug with Updating `aws_autoscaling_group` (#7698)
`enabled_metrics`

Fixes #7693

The metrics_granularity parameter was not being passed to the
`EnableMetricsCollection` when we were calling it from the Update func.
this was causing the API call to silently fail and not update the
metrics for collection - unfortunately the enabled_metrics were still
being added to the state :(

By passing the granularity, we now get the correct metrics for
collection

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAutoScalingGroup_'
==> 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=TestAccAWSAutoScalingGroup_ -timeout 120m
=== RUN   TestAccAWSAutoScalingGroup_importBasic
--- PASS: TestAccAWSAutoScalingGroup_importBasic (166.86s)
=== RUN   TestAccAWSAutoScalingGroup_basic
--- PASS: TestAccAWSAutoScalingGroup_basic (240.23s)
=== RUN   TestAccAWSAutoScalingGroup_autoGeneratedName
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (50.29s)
=== RUN   TestAccAWSAutoScalingGroup_terminationPolicies
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (79.93s)
=== RUN   TestAccAWSAutoScalingGroup_tags
--- PASS: TestAccAWSAutoScalingGroup_tags (270.79s)
=== RUN   TestAccAWSAutoScalingGroup_VpcUpdates
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (77.76s)
=== RUN   TestAccAWSAutoScalingGroup_WithLoadBalancer
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (400.67s)
=== RUN   TestAccAWSAutoScalingGroup_withPlacementGroup
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (134.39s)
=== RUN   TestAccAWSAutoScalingGroup_enablingMetrics
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (305.32s)
=== RUN   TestAccAWSAutoScalingGroup_withMetrics
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (48.56s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws
1774.819s
```
2016-07-20 19:36:45 +01:00
Paul Stack 0edf83008c provider/aws: Support `task_role_arn` on `aws_ecs_task_definition` (#7653)
Fixes #7633
2016-07-20 17:00:57 +01:00
Paul Hinze 62ec69a66a Merge pull request #7669 from kwilczynski/fix/aws-network-acl-rule
Fix icmp_type and icmp_code in aws_network_acl_rule.
2016-07-19 09:27:42 -05:00
avichalbadaya 7369c1c9f4 Allowing ap-south-1 (Mumbai) as valid AWS region (#7688)
* Update website_endpoint_url_test.go

Allow ap-south-1 (Mumbai) as valid region

* Update hosted_zones.go

Allowing ap-south-1 (Mumbai) as valid region

* Update website_endpoint_url_test.go

reformatting

* Update hosted_zones.go

reformatting

* Update resource_aws_s3_bucket.go

making changes for ap-south-1 (Mumbai) region
2016-07-19 09:01:49 +01:00
Paul Stack 565733398d provider/aws: Support Import of `aws_cloudwatch_metric_alarm` (#7687)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_'
==> 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=TestAccAWSCloudWatchMetricAlarm_ -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_importBasic
--- PASS: TestAccAWSCloudWatchMetricAlarm_importBasic (17.82s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (17.11s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    34.957s
```
2016-07-19 05:52:02 +02:00
Radek Simko 37b6ab4507 provider/aws: Bump rds_cluster timeout to 15 mins (#7604) 2016-07-18 14:39:51 +01:00
stack72 a04e336ef9
Merge branch 'master' of github.com:hashicorp/terraform 2016-07-18 13:34:17 +01:00
stack72 8a72bfa5a9
provider/aws: Fix the Destroy func in the Route53 record tests
The test didn't expand the record name - therefore, when the name was
empty, it wasn't setting it to the domain name (like the normal resource
does!) This was causing an error
2016-07-18 13:25:42 +01:00
macheins aabb200f2d
Allow empty names in aws_route53_record
Added test for aws_route53_record with empty name

Integrated test for aws_route53_record with empty name

Changed test to use a third-level domain for zone
2016-07-18 13:25:38 +01:00
David Kelly 08291afd97 Increased lambda event mapping creation timeout (#7657)
Increased the retry timeout from 1 to 5 minutes due to the time for IAM permission propagation
2016-07-18 14:14:35 +02:00
David Harris 05aef0e660 provider/aws: Support ec2-classic and vpc in beanstalk recurring plans. (#6491)
* provider/aws: Support ec2-classic and vpc

Fix Elastic Beanstalk recurring plans when additional security groups
are supplied. In the previous version, only non-default vpc security
groups would be handled by dropGeneratedSecurityGroup.

* provider/aws: Elastic Beanstalk VPC Test
2016-07-18 11:37:37 +01:00
Krzysztof Wilczynski 6dd0e3f6db
Add validation for icmp_type and icmp_code.
Also, change order of processing to parse icmp_type first. Change wording of the
debug messages, and change format string type for rule_number where appropriate.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-07-17 03:24:48 +09:00
Radek Simko b8d21330a7 provider/aws: Allow importing lambda_function (#7610) 2016-07-16 15:36:28 +01:00
stack72 6468b899b9
provider/aws: Fix the AMI ID in the test for VPC Classic Link 2016-07-16 15:17:37 +01:00
Andrew Sy Kim e85297f958 provider/aws: Allow VPC Classic Linking in Autoscaling Launch Configs (#7470)
* support for vpc linking ec2 instances in launch configs

* add acceptance testing

* generate vpc and security groups for each test run
2016-07-16 15:13:29 +01:00
David Harris 03157610d8 provider/aws: Read Elastic Beanstalk stack name (#7671) 2016-07-16 14:43:12 +01:00
Paul Hinze 71932138b9 Merge pull request #7667 from hashicorp/phinze/skip-final-snapshot-import
provider/aws: Fixup skip_final_snapshot import
2016-07-15 13:34:37 -06:00
David Harris bbe7fd2613 provider/aws: Fix Elastic Beanstalk test (#7668)
This fixes the `TestAccAWSBeanstalkEnv_tier` test. The instance profile
needs access to send and receive messages from its sqs queue. Without
these permissions Beanstalk returns an error event, causing the test to
fail.
2016-07-15 20:03:42 +01:00
Krzysztof Wilczynski 81003fa6b1
Fix icmp_type and icmp_code in aws_network_acl_rule.
The ICMP type 0 (Echo Reply) was not handled correctly. This commit changes the
type of attributes "icmp_type" and "icmp_code" from TypeInt to TypeString,
allowing for the string value to be manually converted into an integer. This
enables an integer values such as -1, 0, 8, etc., coming from the resource
definition in the template to be handled correctly.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-07-16 03:28:09 +09:00
Paul Hinze 93832527b1
provider/aws: Fixup skip_final_snapshot import
Neither skip_final_snapshot nor final_snapshot_identifier can be fetched
from any API call, so we need to default skip_final_snapshot to true
during import so that final_snapshot_identifier is not required
2016-07-15 11:30:33 -06:00
James Nugent 082c4fc2c8 Merge pull request #7538 from hashicorp/import-aws-sqs
provider/aws: Support Import `aws_sqs_queue`
2016-07-14 13:29:19 -06:00
clint shryock bb10d75d7d ensure pollInterval is 0 2016-07-13 15:46:12 -06:00
clint shryock a941963ca2 match the system limit 2016-07-13 15:39:53 -06:00
clint shryock de60481428 provider/aws: Rework Beanstalk optional polling
expose a poll_interval for users to configure polling for updates
2016-07-13 15:38:23 -06:00
stack72 3d480ca767
provider/aws: Support Import `aws_sqs_queue`
Needed to change the test due to SQS having issues recreating the same
queue multiple times. Now it uses a random name

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSQSQueue_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSQSQueue_
-timeout 120m
=== RUN   TestAccAWSSQSQueue_importBasic
--- PASS: TestAccAWSSQSQueue_importBasic (20.53s)
=== RUN   TestAccAWSSQSQueue_basic
--- PASS: TestAccAWSSQSQueue_basic (33.85s)
=== RUN   TestAccAWSSQSQueue_redrivePolicy
--- PASS: TestAccAWSSQSQueue_redrivePolicy (26.59s)
=== RUN   TestAccAWSSQSQueue_Policybasic
--- PASS: TestAccAWSSQSQueue_Policybasic (36.92s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    117.908s
```
2016-07-13 22:36:28 +01:00
James Nugent 28438daeb4 provider/aws: Fix IDs in aws_iam_policy_document
We cannot use the "id" field to represent policy ID, because it is used
internally by Terraform. Also change the "id" field within a statement
to "sid" for consistency with the generated JSON.
2016-07-13 12:10:20 -06:00
Clint 3cea29176f provider/aws: Safely get ELB values (#7585)
- removes dereferences to avoid nil crashes
2016-07-13 10:07:56 +01:00
Justin Nauman 71532fff8b - Adding in additional retry logic due to latency with AWS delete (#7312) 2016-07-12 13:19:55 -06:00
Radek Simko df40b91fb8 provider/aws: Allow importing iam_saml_provider (#7605) 2016-07-12 17:04:01 +01:00
Paul Stack 7a58ad95f5 provider/aws: Support Import for `aws_simpledb_domain` (#7601)
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSimpleDBDomain_'
==> 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=TestAccAWSSimpleDBDomain_ -timeout 120m
=== RUN   TestAccAWSSimpleDBDomain_importBasic
--- PASS: TestAccAWSSimpleDBDomain_importBasic (19.59s)
=== RUN   TestAccAWSSimpleDBDomain_basic
--- PASS: TestAccAWSSimpleDBDomain_basic (19.93s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    39.535s
```
2016-07-12 13:15:47 +01:00
Martin Häger 32abd937f1 SimpleDB domain resource (#7600) 2016-07-12 12:55:58 +01:00
Paul Stack 303ba86cf6 provider/aws: Allow `port` on `aws_db_instance` to be updated (#7441)
Fixes #2439

Port used to ForceNew, it has now been changed to allow it to be
updated. 2 changes were needed:

1. Setting the port back to state
2. Adding the wait for state function to the Update func

```
make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBInstance_portUpdate'
==> 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_portUpdate -timeout 120m
=== RUN   TestAccAWSDBInstance_portUpdate
--- PASS: TestAccAWSDBInstance_portUpdate (699.84s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    699.861s
```
2016-07-12 09:07:25 +01:00
Radek Simko 8fa75ea383 provider/aws: Allow import of KMS key (#7599) 2016-07-12 08:49:33 +01:00
Radek Simko 40e05ecc33 provider/aws: Allow import of glacier_vault (#7596) 2016-07-12 08:49:26 +01:00
Radek Simko 86c1661205 provider/aws: Allow import of efs_mount_target 2016-07-12 00:18:13 +01:00
Radek Simko f5ef8f36c2 provider/aws: Allow import of efs_file_system 2016-07-12 00:02:47 +01:00