Commit Graph

2580 Commits

Author SHA1 Message Date
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
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
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