Commit Graph

506 Commits

Author SHA1 Message Date
Clint 0adb052c11 provider/aws: Remove goamz/rds
consolidates the conversion of AWS RDS to aws-sdk-go
2015-02-27 10:54:37 -06:00
Clint Shryock b5590c6247 provider/aws: convert aws rds subnet to aws-sdk-go 2015-02-27 09:56:38 -06:00
Clint c44d0e6301 Merge pull request #1064 from hashicorp/aws-go-db-security-group
provider/aws: Convert AWS DB Security Group to aws-sdk-go
2015-02-27 08:49:48 -06:00
Clint Shryock 659ddd6fa1 provider/aws: convert db param group test to use aws-sdk-go 2015-02-26 15:54:03 -06:00
Clint Shryock f453d1863a remove helper functions, flatten status in the function 2015-02-26 15:47:30 -06:00
Clint Shryock 561e92e65d provider/aws: Convert db security group test 2015-02-26 15:36:38 -06:00
Clint Shryock ac8da7a988 provider/aws: Convert AWS DB Security Group to aws-sdk-go
Part 1: converting the test next
2015-02-26 15:08:39 -06:00
Clint Shryock bd2791824f Update ingress signature 2015-02-26 11:03:56 -06:00
Clint Shryock 242cdc7a29 provider/aws: Convert RDS DB Parameter group to aws-sdk-go 2015-02-26 09:33:33 -06:00
Clint Shryock f3ba181861 Swap awslabs/aws-sdk-go for hashicorp fork
A temporary change to prevent upstream break while awslabs continues to
refactor.
2015-02-25 15:29:11 -06:00
Clint Shryock 31236b8f9e Fix zero case 2015-02-25 11:05:14 -06:00
Clint Shryock 5252623656 provider/aws: Remove sentinel value default for RDS instance; default 1 to match API 2015-02-25 10:44:10 -06:00
Clint Shryock bb94eaa50d provider/aws: Fix issue with AWS RDS DB instance which prevented disabling backups 2015-02-25 09:41:05 -06:00
Clint Shryock 4064d29050 Merge branch 'master' into aws-go-rds-instance
* master:
  providers/aws: Convert Launch Configurations to awslabs/aws-sdk-go
  update CHANGELOG
  terraform: test post state update is called
  command: StateHook for continous state updates
  terraform: more state tests, fix a bug
  state: deep copies are required
  terraform: make DeepCopy public
  state/remote: increment serial properly
  state: only change serial if changed
  terraform: call the EvalUpdateStateHook strategically
  terraform: PostStateUpdate hook and EvalUpdateStateHook
2015-02-24 21:43:03 -06:00
Clint Shryock 92bf85925b providers/aws: Convert Launch Configurations to awslabs/aws-sdk-go 2015-02-24 21:02:01 -06:00
Clint Shryock d79b0d7fd1 provider/aws: Convert AWS DB Instance over to awslabs/aws-sdk-go
- Remove check on password for AWS RDS Instance
- Update documentation on AWS RDS Instance regarding DB Security Groups
- Change error handling to check error code from AWS API [ci skip]
2015-02-24 16:51:47 -06:00
Mitchell Hashimoto 84b1db4505 Merge pull request #1021 from hashicorp/b-aws-instance-source-dest-check-on-create
providers/aws: fix source_dest_check on instance creation
2015-02-23 13:45:17 -08:00
Clint f6249ff6db Merge pull request #1018 from hashicorp/aws-go-autoscaling
Convert AWS AutoScalingGroup to awslabs/aws-sdk-go
2015-02-23 10:22:22 -06:00
Paul Hinze 473b03ccae providers/aws: fix source_dest_check on instance creation
The `SourceDestCheck` attribute can only be changed via
`ModifyInstance`, so the AWS instance resource's `Create` function calls
out to `Update` before it returns to take care of applying
`source_dest_check` properly.

The `Update` function originally guarded against unnecessary API calls
with `GetOk`, which worked fine until #993 when we changed the `GetOk`
semantics to no longer distinguish between "configured and zero-value"
and "not configured".

I attempted in #1003 to fix this by switching to `HasChange` for the
guard, but this does not work in the `Create` case.

I played around with a few different ideas, none of which worked:

(a) Setting `Default: true` on `source_dest_check' has no effect

(b) Setting `Computed: true` on `source_dest_check' and adding a `d.Set`
    call in the `Read` function (which will initially set the value to `true`
    after instance creation). I really thought I could get this to work,
    but it results in the following:

```go
d.Get('source_dest_check')       // true
d.HasChange('source_dest_check') // false
d.GetChange('source_dest_check') // old: false, new: false
```

I couldn't figure out a way of coherently dealing with that result, so I
ended up throwing up my hands and giving up on the guard altogether.
We'll call `ModifyInstance` more than we have to, but this at least
yields expected behavior for both Creates and Updates.

Fixes #1020
2015-02-21 14:26:46 -06:00
Clint Shryock 5b35b85527 remove the rand, it's not helping like I thought 2015-02-20 15:49:51 -06:00
Clint Shryock 4326b6b8b5 cleanups after feedback 2015-02-20 14:28:14 -06:00
Mitchell Hashimoto 523639b5cd fmt 2015-02-20 10:22:26 -08:00
Mitchell Hashimoto cf5697ff32 providers/aws: if a VPC doesn't exist, then remove from state 2015-02-20 10:20:20 -08:00
Clint Shryock d79ac17757 randomize ASG name in test, to get around slow AWS delete time 2015-02-20 11:40:47 -06:00
Clint Shryock b38a3767eb provider/aws: Convert AWS AutoScalingGroup to awslabs/aws-sdk-go 2015-02-20 11:28:20 -06:00
Clint Shryock 08949866c5 Merge config 2015-02-20 09:08:41 -06:00
Clint Shryock 57300d32c6 merge master 2015-02-20 08:55:54 -06:00
Clint Shryock 116e6cac33 provider/aws: Convert AWS S3 Bucket to awslabs/aws-sdk-go 2015-02-19 15:38:56 -06:00
Clint Shryock 94e7723370 provider/aws: Convert Route 53 Zone resource to use new awslabs/aws-sdk-go
library.

This commit updates the Route 53 Zone resource to use AWS Labs aws-sdk-go
library instead of mitchellh/goamz.

- hard code us-east-1 for Route53 region, since it's a global endpoint
- add some units test for CleanZoneID
2015-02-19 15:05:46 -06:00
Mitchell Hashimoto e3b64f5bb5 providers/aws: style 2015-02-19 10:52:09 -08:00
Mitchell Hashimoto cd1e70faab providers/aws: acceptance test was too strict 2015-02-19 09:54:16 -08:00
Mitchell Hashimoto 448ebd1372 Merge pull request #1005 from hashicorp/f-fix-elb-subnet-test
Revert "Merge pull request #804 from PeoplePerHour/f-aws-elb-subnet"
2015-02-19 09:46:05 -08:00
Mitchell Hashimoto 39d28a9612 Merge pull request #1003 from hashicorp/b-aws-instance-source-dest-check
providers/aws: fix aws_instance source_dest_check
2015-02-19 09:37:13 -08:00
Paul Hinze 86a2449569 Revert "Merge pull request #804 from PeoplePerHour/f-aws-elb-subnet"
Unfortunately, the acceptance tests here were improperly passing, and
allowing Subnet updates on ELBs is not as straightfoward as simply
removing `ForceNew`.

Subnets on ELBs need to be managed by two explicit API calls:

 * `AttachLoadBalancerToSubnets` - http://bit.ly/elbattachsubnet
 * `DetachLoadBalanceFromSubnets` - http://bit.ly/elbdetachsubnet

We'll need to circle back and use these APIs to explicitly add support.

This fixes the failure of `TestAccAWSELB_AddSubnet` by removing the
test.

This reverts commit 61e91017be, reversing
changes made to 49b3afe452.
2015-02-18 18:15:04 -06:00
Paul Hinze 3c4d1791e5 providers/aws: fix aws_instance source_dest_check
Was relying on old behavior of GetOk and therefore never properly seeing
a change from true -> false.

This fixes the acceptance test failure of
`TestAccAWSInstance_sourceDestCheck`.
2015-02-18 17:46:50 -06:00
Paul Hinze 434a9759a0 providers/aws: enhance root_block_device acceptance test
So that we have a test that will fail in case the flubbery of #1000
returns.
2015-02-18 17:28:28 -06:00
Mitchell Hashimoto eca5fe3ff3 providers/aws: fix ELB acceptance test 2015-02-18 15:18:51 -08:00
Mitchell Hashimoto 05a34d7d77 providers/aws: root block device not being set properly
The value to set must not contain invalid fields.
2015-02-18 14:45:13 -08:00
Mitchell Hashimoto c7e536680d Merge pull request #999 from TimeInc/clean-code
Clean code (get rid of go vet errors)
2015-02-18 12:28:12 -08:00
Paul Hinze 73d20b4c58 providers/aws: add root_block_device to aws_instance
AWS provides a single `BlockDeviceMapping` to manage three different
kinds of block devices:

 (a) The root volume
 (b) Ephemeral storage
 (c) Additional EBS volumes

Each of these types has slightly different semantics [1].

(a) The root volume is defined by the AMI; it can only be customized
with `volume_size`, `volume_type`, and `delete_on_termination`.

(b) Ephemeral storage is made available based on instance type [2]. It's
attached automatically if _no_ block device mappings are specified, and
must otherwise be defined with block device mapping entries that contain
only DeviceName set to a device like "/dev/sdX" and VirtualName set to
"ephemeralN".

(c) Additional EBS volumes are controlled by mappings that omit
`virtual_name` and can specify `volume_size`, `volume_type`,
`delete_on_termination`, `snapshot_id`, and `encryption`.

After deciding to ignore root block devices to fix #859, we had users
with configurations that were attempting to manage the root block device chime
in on #913.

Terraform does not have the primitives to be able to properly handle a
single collection of resources that is partially managed and partially
computed, so our strategy here is to break out logical sub-resources for
Terraform and hide the BlockDeviceMapping inside the provider
implementation.

Now (a) is supported by the `root_block_device` sub-resource, and (b)
and (c) are still both merged together under `block_device`, though I
have yet to see ephemeral block devices working properly.

Looking into possibly separating out `ephemeral_block_device` and
`ebs_block_device` sub-resources as well, which seem like the logical
next step. We'll wait until the next big release for this, though, since
it will break backcompat.

[1] http://bit.ly/ec2bdmap
[2] http://bit.ly/instancestorebytype

Fixes #913
Refs #858
2015-02-18 13:15:11 -06:00
Radek Simko e149a97658 Make composite literals to use keyed fields
This will prevent following error:
 - * composite literal uses unkeyed fields
2015-02-18 18:26:59 +00:00
Mitchell Hashimoto fc7c859c8a providers/aws: egress should be computed 2015-02-18 09:27:55 -08:00
Mitchell Hashimoto 5e8c3113b4 providers/aws: style change 2015-02-18 09:07:46 -08:00
Mitchell Hashimoto 44c45994c8 Merge pull request #963 from julienba/master
providers/aws: vpc_peering_connection
2015-02-18 06:56:28 -08:00
jba 372035368f allow update 2015-02-18 10:45:12 +01:00
Mitchell Hashimoto c40238041c providers/aws: fix bad arg giving wrong type [GH-992] 2015-02-17 16:39:51 -08:00
Mitchell Hashimoto e04def93e6 Merge pull request #991 from hashicorp/b-autoscale-lc-update
providers/aws: allow in-place update of launch configuration
2015-02-17 16:29:56 -08:00
Mitchell Hashimoto 5a64d0900b providers/aws: test for allowing in-place lC update 2015-02-17 16:12:02 -08:00
Mitchell Hashimoto b5df47efc9 providers/aws: support updating ASG launch config [GH-904] 2015-02-17 15:48:15 -08:00
Mitchell Hashimoto 66f7731995 helper/schema: GetChange shouldn't return true when no change 2015-02-17 15:43:19 -08:00