Commit Graph

696 Commits

Author SHA1 Message Date
Radek Simko bbda2d6733 Fix fmt modifiers for bool to be actually bool, not integer 2015-03-22 13:33:17 +00:00
Phil Frost b49fba6b61 Don't error when enabling DNS hostnames in a VPC
The AWS API call ModifyVpcAttribute will allow only one attribute to be
modified at a time. Modifying both results in the error:

    Fields for multiple attribute types specified: enableDnsHostnames, enableDnsSupport

Retructure the provider to honor this restriction.

Also, enable DNS support before attempting to enable DNS hostnames,
since the former is a prerequisite of the latter.

Additionally, fix what must have been a copy&paste error, setting
enable_dns_support to the value of enable_dns_hostnames.
2015-03-20 14:49:50 -04:00
Phil Frost 9545f26fa0 Correct AWS VPC or route table read functions
If the state file contained a VPC or a route table which no longer
exists, Terraform would fail to create the correct plan, which is to
recreate them.

In the case of VPCs, this was due to incorrect error handling. The AWS
SDK returns a aws.APIError, not a *aws.APIError on error.  When the VPC
no longer exists, upon attempting to refresh state Terraform would
simply exit with an error.

For route tables, the provider would recognize that the route table no
longer existed, but would not make the appropriate call to update the
state as such. Thus there'd be no crash, but also no plan to re-create
the route table.
2015-03-20 13:38:41 -04:00
Clint Shryock f97343dea1 provider/aws: Fix issue in AWS AutoScaling Group where health_check_type is not set correctly 2015-03-20 10:11:12 -05:00
Clint Shryock c48a5bf42b provider/aws: Fix DB Subnet refresh issue 2015-03-19 16:45:07 -05:00
Clint bb4dd8ae77 Merge pull request #1137 from deverton/aws-go-vpn
provider/aws: Add Support For AWS VPN Gateways using aws-sdk-go
2015-03-19 16:12:17 -05:00
Clint Shryock 1ccfcb5e3d Merge remote-tracking branch 'upstream/master'
* upstream/master:
  provider/aws: Fix dependency violation with subnets and security groups
2015-03-19 16:01:15 -05:00
Clint Shryock a8c80a447e Merge branch 'b-fix-route53-txt-records'
* b-fix-route53-txt-records:
  provider/aws: Fix issue with Route53 and TXT records
  provider/aws: Add test for TXT route53 record
2015-03-19 15:47:20 -05:00
Clint 3cbc8899b5 Merge pull request #1252 from hashicorp/fix-subnet-sg-dependency-violation
provider/aws: Fix dependency violation with subnets and security groups
2015-03-19 15:39:57 -05:00
Clint Shryock 3d8005729d provider/aws: Fix dependency violation with subnets and security groups
Though not directly connected, trying to delete a subnet and security group in
parallel can cause a dependency violation from the subnet, claiming there are
dependencies.

This commit fixes that by allowing subnet deletion to tolerate failure with a
retry / refresh function.

Fixes #934
2015-03-19 15:10:49 -05:00
Paul Hinze 5e1de9d930 Merge pull request #1250 from hashicorp/b-block-devices
providers/aws: fix bug w/ empty block dev mapping
2015-03-19 13:21:08 -05:00
Paul Hinze 6c62e23829 providers/aws: fix bug w/ empty block dev mapping
fixes #1249
2015-03-19 13:14:31 -05:00
Paul Hinze f990c3b02b providers/aws: fix blockdevices acceptance test
hashcodes just needed updating from latest hash func tweaks
2015-03-19 11:40:48 -05:00
Clint 21fa3d1fc9 Merge pull request #1210 from hashicorp/b-add-guards-aws-instance
provider/aws: Add additional guards for Tenancy, SourceDestCheck
2015-03-19 11:20:14 -05:00
Clint Shryock a063ebe992 provider/aws: Update tag support in AWS Elastic Network Interfaces 2015-03-19 11:07:01 -05:00
Clint df514c9003 Merge pull request #1149 from peterbeams/master
Support AWS Elastic Network Interfaces (ENI)
2015-03-19 11:04:30 -05:00
Clint Shryock c1ccbb5c7d provider/aws: Add VPC guards for Tenancy, SourceDestCheck 2015-03-19 10:07:46 -05:00
Paul Hinze 5fca25ae5e providers/aws: remove commented code
oopsie!
2015-03-19 09:19:10 -05:00
Paul Hinze 46b63074e0 Merge pull request #1045 from hashicorp/f-block-devices
providers/aws: rework instance block devices
2015-03-19 09:09:45 -05:00
Paul Hinze 2b23c402ee providers/aws: rework instance block devices
Instance block devices are now managed by three distinct sub-resources:

 * `root_block_device` - introduced previously
 * `ebs_block_device` - all additional ebs-backed volumes
 * `ephemeral_block_device` - instance store / ephemeral devices

The AWS API support around BlockDeviceMapping is pretty confusing. It's
a single collection type that supports these three members each of which
has different fields and different behavior.

My biggest hiccup came from the fact that Instance Store volumes do not
show up in any response BlockDeviceMapping for any EC2 `Describe*` API
calls. They're only available from the instance meta-data service as
queried from inside the node.

This removes `block_device` altogether for a clean break from old
configs. New configs will need to sort their `block_device`
declarations into the three new types. The field has been marked
`Removed` to indicate this to users.

With the new block device format being introduced, we need to ensure
Terraform is able to properly read statefiles written in the old format.
So we use the new `helper/schema` facility of "state migrations" to
transform statefiles in the old format to something that the current
version of the schema can use.

Fixes #858
2015-03-19 09:03:41 -05:00
Dan Everton 8ebbaf550c Fixes for goamz removal. 2015-03-19 11:14:41 +10:00
Dan Everton f7289599cc Merge branch 'master' into aws-go-vpn 2015-03-19 11:03:48 +10:00
Clint eadc44d5f7 Merge pull request #1223 from hashicorp/b-fix-ingress-self-ommission
provider/aws: Fix issue with ignoring the 'self' attribute of a Security Group rule
2015-03-18 16:42:17 -05:00
Mitchell Hashimoto e84711b460 providers/aws: more classic-mode fixes for instance
/cc @catsby - Just a quick note to be careful about checking the nil of
a field before cehcking the value (see the subnetid check), to avoid
panics
2015-03-18 20:54:44 +01:00
Mitchell Hashimoto 50c49396f4 providers/aws: only set instance tenancy if its set
/cc @clint
2015-03-18 20:48:39 +01:00
Clint fd1514dfaf Merge pull request #1225 from hashicorp/b-fix-db-parameter-group-cases
provider/aws: Fixes issue 886 in DB Parameter group
2015-03-18 11:01:04 -05:00
Paul Hinze 5b84f011dd Merge pull request #1231 from hashicorp/b-instance-user-data-test-fix
providers/aws: fix TestAccAWSInstance_normal
2015-03-18 09:00:37 -05:00
Paul Hinze ca6f6a1e14 providers/aws: fix TestAccAWSInstance_normal
The test just needed updated SHAs for user_data.
2015-03-18 08:57:41 -05:00
Mitchell Hashimoto d823a8cf81 providers/aws: fix security group self ingress rules on EC2-classic 2015-03-18 13:47:59 +00:00
Clint Shryock f74e68ea46 provider/aws: Fixes issue 886 in DB Parameter group 2015-03-17 17:22:30 -05:00
Clint Shryock 7034619863 provider/aws: Fix issue where we ignored the 'self' attribute of a security group rule 2015-03-17 15:48:10 -05:00
Clint Shryock 49e6c8fd87 provider/aws: Fix wildcard support in Route53 record
Fixes a bug in Route53 and wildcard entries. Refs #501.
Also fixes:
- an issue in the library where we don't fully wait for the results, because the
  error code/condition changed with the migration to aws-sdk-go
- a limitation in the test, where we only consider the first record returned
2015-03-17 14:57:45 -05:00
Peter Beams e4214a9983 ran go fmt and made 1 fix after running tests again 2015-03-17 13:00:36 +00:00
Peter Beams 34d2efa7df moving expand/flatten methods into structure.go and unit testing them 2015-03-17 12:42:05 +00:00
Peter Beams 130775f38a changes after ec2 connection renamed 2015-03-17 09:48:08 +00:00
Peter Beams c72918efb3 Merge branch 'master' of github.com:hashicorp/terraform 2015-03-17 09:04:16 +00:00
Clint Shryock 346ff12bc5 provider/aws: Fix issue with Route53 and TXT records 2015-03-16 15:36:18 -05:00
Clint Shryock f4808b1ea7 provider/aws: Add test for TXT route53 record 2015-03-16 15:28:45 -05:00
Clint dc4abb48fa Merge pull request #1195 from hashicorp/f-retire-goamz
provider/aws: Retire goamz
2015-03-16 08:42:40 -05:00
Clint Shryock 670d22e18f update acceptance test with the correct depends_on declarations 2015-03-13 14:58:05 -05:00
Clint Shryock 14a4ea65ea Merge branch 'master' into b-aws-instance-sec-groups
* master:
  provider/aws: Fix encoding bug with AWS Instance
  minor style cleanups
  Tags Schema
  Added Tagging
  Added vpc refactor in aws sdk go
  Removed additional variable for print, added for debugging
  Using hashicorp/aws-sdk-go
  Changed things around as suggested by @catsby
  Refactor with Acceptance Tests
  VPC Refactor
  First refactor
  Added Connection to config
2015-03-13 14:39:29 -05:00
Clint Shryock d5f23aec0a provider/aws: Fix encoding bug with AWS Instance 2015-03-13 10:54:00 -05:00
Clint Shryock 28fbd971fc Retire goamz 2015-03-13 09:42:50 -05:00
Clint Shryock 580b696e7f Strike 'goamz' from the repo' 2015-03-12 16:49:38 -05:00
Clint Shryock 57556bba75 Replace tags files with tags_sdk, rename, and update 2015-03-12 16:43:08 -05:00
Clint Shryock 0fbd701ccb minor style cleanups 2015-03-12 15:13:45 -05:00
Clint Shryock ddc2d8de2e Merge branch 'master' into rmenn-aws-go-vpc
* master: (69 commits)
  upgrade tests and remove ICMPTypeCode for now
  helper/ssh: update import location
  clean  up
  provider/aws: Convert AWS Network ACL to aws-sdk-go
  Update website docs on AWS RDS encryption field
  more test updates
  provider/aws update Network ACL tests
  code cleanup on subnet check
  restore IOPS positioning
  Code cleanup
  Update CHANGELOG.md
  Bugfix: Add tags on AWS IG creation, not just on update
  fix nit-pick from go vet
  remove duplicated function
  provider/aws: Convert AWS Route Table Association to aws-sdk-go
  Cleansup: Restore expandIPPerms, remove flattenIPPerms
  clean up debug output to make go vet happy
  providers/aws: Convert AWS VPC Peering to aws-sdk-go
  provider/aws: Add env default for AWS_ACCOUNT_ID in VPC Peering connection
  convert route table tests to aws-sdk-go
  ...
2015-03-12 15:07:28 -05:00
Clint Shryock 33fdc0c63f update the new test config 2015-03-12 15:01:24 -05:00
Clint Shryock 3a5918d013 Add acceptance test for Network / Instance security group fix 2015-03-12 14:26:10 -05:00
Clint Shryock 749db242f4 Fix issue with Network interfaces and an instance-level security groups (#1188) 2015-03-12 11:08:53 -05:00
Dan Everton cfd8d913bd Make vpnGatewayStateRefreshFunc private 2015-03-12 08:13:39 +10:00
Dan Everton 9f50b048e1 Merge branch 'master' into aws-go-vpn 2015-03-12 08:09:27 +10:00
Clint 9654f2ff3a Merge pull request #1147 from hashicorp/aws-go-instance
provider/aws: Convert AWS Instance to aws-sdk-go
2015-03-11 17:07:58 -05:00
Clint Shryock 670d53b1a1 upgrade tests and remove ICMPTypeCode for now 2015-03-11 16:21:22 -05:00
Clint Shryock 8a5eadedd1 clean up 2015-03-11 15:18:42 -05:00
Clint Shryock bd591877fe provider/aws: Convert AWS Network ACL to aws-sdk-go 2015-03-11 15:01:07 -05:00
Clint Shryock 70a989a23e more test updates 2015-03-11 11:19:08 -05:00
Clint Shryock 8a5c3b8525 provider/aws update Network ACL tests 2015-03-11 10:40:32 -05:00
Clint 9b974b0248 Merge pull request #1176 from TimeIncOSS/tags-updating
Bugfix: Add tags on AWS IG creation, not just on update
2015-03-11 10:31:33 -05:00
Clint Shryock 751140351b code cleanup on subnet check 2015-03-11 09:55:32 -05:00
Clint Shryock 9d6f05e529 restore IOPS positioning 2015-03-11 09:24:59 -05:00
Clint Shryock f8c22c1e2d Merge branch 'master' into aws-go-instance
* master:
  Code cleanup
  Update CHANGELOG.md
  fix nit-pick from go vet
  remove duplicated function
  provider/aws: Convert AWS Route Table Association to aws-sdk-go
  Cleansup: Restore expandIPPerms, remove flattenIPPerms
  clean up debug output to make go vet happy
  providers/aws: Convert AWS VPC Peering to aws-sdk-go
  provider/aws: Add env default for AWS_ACCOUNT_ID in VPC Peering connection
  convert route table tests to aws-sdk-go
  provider/aws: Convert AWS Route Table to aws-sdk-go
  providers/aws: iops in root device skipped when output state
  Give route table assoc it's own copy of this method for now
  provider/aws: Convert Main Route Table assoc. to aws-sdk-go
  aws/Route53 record creation timeout 10->30 mins
  provider/aws: Convert AWS Security Group to aws-sdk-go
  Fixing up the tests to make them pass correctly
  Fixing a corner case while retrieving a template UUID
  Adding tests and docs for the new VPN resources
  Adding a few new resources
2015-03-11 09:21:46 -05:00
Clint 344382df2e Merge pull request #1162 from hashicorp/aws-go-security-groups
provider/aws: Convert AWS Security Groups to aws-sdk-go
2015-03-11 08:33:01 -05:00
Clint Shryock 902ca25f36 Code cleanup 2015-03-11 08:30:43 -05:00
Mitchell Hashimoto ac92766d2c Merge pull request #1164 from TimeIncOSS/route53-increase-timeout
Increase aws/Route53 record creation timeout
2015-03-11 08:31:14 +01:00
Radek Simko c7ccf4f74d Bugfix: Add tags on AWS IG creation, not just on update 2015-03-10 23:01:05 +00:00
Clint 263395a9f0 Merge pull request #1171 from hashicorp/aws-go-route-table-assoc
provider/aws: Convert AWS Route Table Association to aws-sdk-go
2015-03-10 17:01:21 -05:00
Clint Shryock 314453abe5 fix nit-pick from go vet 2015-03-10 16:57:43 -05:00
Clint e4a298fdfb Merge pull request #1174 from hashicorp/aws-go-vpc-peering
providers/aws: Convert AWS VPC Peering to aws-sdk-go
2015-03-10 16:53:31 -05:00
Clint Shryock 3c3b7d51a2 remove duplicated function 2015-03-10 16:52:09 -05:00
Clint Shryock b038e5f720 provider/aws: Convert AWS Route Table Association to aws-sdk-go 2015-03-10 16:43:42 -05:00
Clint 357ef9f313 Merge pull request #1170 from hashicorp/aws-go-route-table
provider/aws: Convert AWS Route Table to aws-sdk-go
2015-03-10 16:42:56 -05:00
Clint 2d2072f8a8 Merge pull request #1165 from hashicorp/aws-go-main-route-table
provider/aws: Convert Main Route Table assoc. to aws-sdk-go
2015-03-10 16:40:15 -05:00
Clint Shryock 3977256c17 Cleansup: Restore expandIPPerms, remove flattenIPPerms 2015-03-10 16:35:49 -05:00
Clint Shryock a22c23ad42 clean up debug output to make go vet happy 2015-03-10 15:55:49 -05:00
Paul Hinze f3a786b084 Merge pull request #1166 from suguru/f-aws-block-device-root-iops
providers/aws: iops in root device skipped when output state
2015-03-10 14:29:23 -06:00
Clint Shryock 30125e3a5f providers/aws: Convert AWS VPC Peering to aws-sdk-go 2015-03-10 15:21:31 -05:00
Clint Shryock fe293f909e provider/aws: Add env default for AWS_ACCOUNT_ID in VPC Peering connection 2015-03-10 14:44:07 -05:00
Clint Shryock e7b3f3cf17 convert route table tests to aws-sdk-go 2015-03-10 10:30:01 -05:00
Clint Shryock 30f401eab7 provider/aws: Convert AWS Route Table to aws-sdk-go 2015-03-10 10:23:14 -05:00
Suguru Namura 30941dfdc4 providers/aws: iops in root device skipped when output state 2015-03-10 19:50:05 +09:00
Dan Everton d6a731040c Format the resource_vpn_gateway*.go files. 2015-03-10 10:30:42 +10:00
Dan Everton c172fd3736 Fix error handling.
AWS returns IncorrectState not DependencyViolation when a VPN gateway is
still attached to a VPC.
2015-03-10 10:28:44 +10:00
Dan Everton d253fff4e5 Hardcode type parameter value.
Current AWS documentation says there's only one type of VPN gateway for
now.
2015-03-10 09:49:46 +10:00
Clint Shryock 795970d5a2 Give route table assoc it's own copy of this method for now 2015-03-09 17:12:15 -05:00
Clint Shryock 5a13ac9bc9 provider/aws: Convert Main Route Table assoc. to aws-sdk-go 2015-03-09 16:15:25 -05:00
Radek Simko bc44fdc1a7 aws/Route53 record creation timeout 10->30 mins 2015-03-09 20:12:15 +00:00
Clint Shryock 20b02cacd4 provider/aws: Convert AWS Security Group to aws-sdk-go
Convert security group test too
2015-03-09 11:45:58 -05:00
Rahul Menon a34800dff2 Tags Schema 2015-03-09 14:39:06 +05:30
Dan Everton 7565e69ba3 Merge branch 'master' into aws-go-vpn 2015-03-07 09:46:23 +10:00
Clint Shryock 94d30aa70a provider/aws: Convert aws instance test to aws-sdk
convert AWS Instance and Test file to use aws-sdk-go
2015-03-06 14:53:05 -06:00
Peter Beams 810860ec37 fixing indentation 2015-03-06 16:39:00 +00:00
Peter Beams 79eb50e06b removing commented imports 2015-03-06 16:37:18 +00:00
Peter Beams 3052edee6b removing unrequired changes 2015-03-06 16:12:09 +00:00
Peter Beams efcba8df2e tweaks after merge from master 2015-03-06 16:08:51 +00:00
Peter Beams e59d4fc976 merging from hashicorp master 2015-03-06 15:53:31 +00:00
Peter Beams c3ba0a7f6d adding acceptance tests for network interface 2015-03-06 15:49:56 +00:00
Peter Beams 39346e6f16 tweaks in new aws network interface 2015-03-06 09:29:25 +00:00
Dan Everton 7240af439c Minor test fixes. 2015-03-06 15:48:30 +10:00
Paul Hinze bc1baa8712 providers/aws: final_snapshot_id isn't ForceNew
Removing `ForceNew` from `final_snapshot_identifier` - it's a parameter
that's _only_ passed during the DeleteDBInstance API call, so it's perfectly
valid to change the attribute for an existing DB Instance.

fixes #1138
2015-03-05 19:07:41 -06:00