Commit Graph

455 Commits

Author SHA1 Message Date
Mitchell Hashimoto b5df47efc9 providers/aws: support updating ASG launch config [GH-904] 2015-02-17 15:48:15 -08:00
Mitchell Hashimoto 0feb29944c Merge pull request #856 from CashStar/aws_egress
provider/aws: adding support for egress rules in AWS Security Groups
2015-02-17 13:59:47 -08:00
Mitchell Hashimoto 1752c93e0c update CHANGELOG 2015-02-17 09:44:44 -08:00
Mitchell Hashimoto 9a19eb3110 Merge pull request #721 from robzienert/change-elb-listener-force-new
providers/aws: Changing AWS ELB to not ForceNew when listeners change
2015-02-17 09:43:46 -08:00
Mitchell Hashimoto aad83447d2 Merge pull request #889 from bitglue/deleted_subnet
provider/aws: Fix error when refreshing on a deleted AWS subnet
2015-02-17 09:30:48 -08:00
Mitchell Hashimoto c5e035361f Merge pull request #896 from bitglue/storage_type
provider/aws: Support storage_type parameter for aws_db_instance
2015-02-17 09:30:03 -08:00
Mitchell Hashimoto f63aa41d67 Merge pull request #897 from bitglue/apply_method
provider/aws: Implement apply_method for RDS parameters
2015-02-17 09:28:24 -08:00
Mitchell Hashimoto fd01b01a9e Merge pull request #923 from hashicorp/aws-read-termination-policies
providers/aws: read ASG termination policies
2015-02-17 09:25:16 -08:00
Clint Shryock 1ee3d232a1 simplify HasSuffix check 2015-02-11 16:49:03 -08:00
Clint Shryock 90c8317899 Auto add full domain suffix if not present 2015-02-11 16:39:25 -08:00
Paul Hinze 6f5234c52f Merge pull request #916 from gosuri/aws-elb-update-issue
fix for #915 - aws_elb.health_check attributes does not update during update
2015-02-06 17:14:44 -06:00
Greg Osuri 481b3c7e3b provider/aws: fix for #915, disabling ForceNew while updating elb healthchecks 2015-02-06 15:03:52 -08:00
Paul Hinze c21907850d Merge pull request #921 from hashicorp/fix-diffreader-map-handling
helper/schema: fix DiffFieldReader map handling
2015-02-04 10:06:13 -06:00
Paul Hinze 926effb800 providers/aws: read ASG termination policies
Right now we yield a perpetual diff on ASGs because we're not reading
termination policies back out in the provider.

This depends on https://github.com/mitchellh/goamz/pull/218 and fixes
it.
2015-02-04 10:00:03 -06:00
Paul Hinze 219aa3e788 helper/schema: fix DiffFieldReader map handling
An `InstanceDiff` will include `ResourceAttrDiff` entries for the
"length" / `#` field of maps. This makes sense, since for something like
`terraform plan` it's useful to see when counts are changing.

The `DiffFieldReader` was not taking these entries into account when
reading maps out, and was therefore incorrectly returning maps that
included an extra `'#'` field, which was causing all sorts of havoc
for providers (extra tags on AWS instances, broken google compute
instance launch, possibly others).

 * fixes #914 - extra tags on AWS instances
 * fixes #883 - general core issue sprouted from #757
 * removes the hack+TODO from #757
2015-02-03 20:17:57 -06:00
Paul Hinze 92335b742a provider/aws: aws_main_route_table_association
This resource allows an existing Route Table to be assigned as the
"main" Route Table of a VPC. This means that the Route Table will be
used for any subnets within the VPC without an explicit Route Table
assigned [1].

This is particularly useful in getting an Internet Gateway in place as
the default for a VPC, since the automatically created Main Route Table
does not have one [2].

Note that this resource is an abstraction over an association and does not
map directly to a CRUD-able object in AWS. In order to retain a coherent
"Delete" operation for this resource, we remember the ID of the AWS-created
Route Table and reset the VPC's main Route Table to it when this
resource is deleted.

refs #843, #748

[1] http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html#RouteTableDetails
[2] http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Internet_Gateway.html#Add_IGW_Routing
2015-02-03 13:47:43 -06:00
Greg Osuri 04ac1ffd02 provider/aws: fix for #915 - aws_elb.health_check attributes does not update during update 2015-02-02 19:25:54 -08:00
Phil Frost 863fd0c7d2 Avoid unnecessary updating of aws_subnet
If map_public_ip_on_launch was not specified, AWS picks a default of
"0", which is different than the "" in the state file, triggerinng an
update each time. Mark that parameter as Computed, avoiding the update.
2015-01-30 13:17:16 -05:00
Phil Frost 8eb5418c4a Implement apply_method for RDS parameters
This is necessary to support creating parameter groups with parameters
that require a reboot, since the RDS API will return an error when
attempting to set those parameters with ApplyMethod "immediate".
2015-01-30 13:06:15 -05:00
Phil Frost bfaf8ccee6 Support storage_type parameter for aws_db_instance
This allows provisioning "gp2" (general purpose SSD) storage for DB
instances.
2015-01-30 13:01:10 -05:00
Phil Frost 04e86697fb Fix error when refreshing on a deleted AWS subnet
If a subnet exists in the state file and a refresh is performed, the
read function for subnets would return an error. Now it updates the
state to indicate that the subnet no longer exists, so Terraform can
plan to recreate it.
2015-01-29 11:06:40 -05:00
Phil Frost 254b25a64f Fix aws_db_instance to not recreate each time
Several of the arguments were optional, and if omitted, they are
calculated. Mark them as such in the schema to avoid triggering an
update.

Go back to storing the password in the state file. Without doing so,
there's no way for Terraform to know the password has changed. It should
be hashed, but then interpolating the password yields a hash instead of
the password.

Make the `name` parameter optional. It's not required in any engine, and
in some (MS SQL Server) it's not allowed at all.

Drop the `skip_final_snapshot` argument. If `final_snapshot_identifier`
isn't specified, then don't make a final snapshot. As things were, it
was possible to create a resource with neither of these arguments
specified which would later fail when it was to be deleted since the RDS
API requires exactly one of the two.

Resolves issue #689.
2015-01-28 12:03:26 -05:00
Paul Hinze 3cb5ba01a7 whitespace: fix mixed case indent 2015-01-28 05:16:04 -06:00
Paul Hinze c88c4a33e1 providers/aws: ignore ec2 root devices
fixes #859

EC2 root block devices are attached automatically at launch [1] and show
up in DescribeInstances responses from then on. By skipping these when
recording state, Terraform can avoid thinking there should be block
device changes when there are none.

Note this requires that https://github.com/mitchellh/goamz/pull/214 land
first so the proper field is exposed.

[1] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/RootDeviceStorage.html
2015-01-28 05:14:21 -06:00
Seth Vargo 918ba4c3be Merge pull request #851 from hashicorp/sethvargo/aws_envvars
Use standard AWS environment variables
2015-01-25 13:29:32 -05:00
Graham Floyd 91378ce0af Add test for launch configuration with spot price 2015-01-23 15:51:25 -06:00
nevins-b 47b244d296 adding support for egress rules in AWS Security Groups 2015-01-23 09:46:20 -05:00
Seth Vargo 072a1cf353 Read the "standard" AWS environment variables
This is 100% backwards-compatible
2015-01-22 16:09:25 -05:00
Graham Floyd c9a0627f13 Add spot_price parameter to aws_launch_configuration resource 2015-01-21 22:48:04 -06:00
Otto Jongerius 7759a28e9c No longer needed after merging of PR 804. 2015-01-21 18:48:28 +11:00
Armon Dadgar df71834ff7 Merge pull request #831 from gulyasm/log-typo
Fixed wrong cross zone balancing error log.
2015-01-20 13:20:25 -08:00
gulyasm 0486dd0624 Fixed wrong cross zone balancing error log.
If updating the cross zone balancing in the aws elb resource fails, the
error log claimed that the health check configuration failed. Fixed.
2015-01-17 16:20:35 +01:00
Jeff Mitchell f2bd1f45ab Move duplicated envDefaultFunc out of each provider and into Schema. 2015-01-16 17:25:39 +00:00
Mitchell Hashimoto 61e91017be Merge pull request #804 from PeoplePerHour/f-aws-elb-subnet
providers/aws: elb subnet change should not force a new resource
2015-01-16 08:33:32 -08:00
Panagiotis Moustafellos a49f1b5dd8 epic typo 2015-01-16 16:07:55 +02:00
Panagiotis Moustafellos cedf3a9415 providers/aws: elb subnet change acceptance test
add listeners

add orig subnet
2015-01-15 16:02:47 +02:00
Panagiotis Moustafellos c963793f3d providers/aws: elb subnet change should not force a new resource 2015-01-15 10:43:26 +02:00
Mitchell Hashimoto 08813e6571 Merge branch 'add-ig-tags' of https://github.com/robzienert/terraform into robzienert-add-ig-tags
Conflicts:
	builtin/providers/aws/resource_aws_internet_gateway_test.go
2015-01-10 15:28:14 -08:00
Paul Hinze f800441fe1 provider/aws: fix aws_db_instance acceptance tests
- 5.6.17 is no longer a valid mysql engine version, bumping to 5.6.21
- updating security_group_names assertion to match new set structure
  introduce in #663
2015-01-10 15:55:08 -06:00
Mitchell Hashimoto cc0ee4a6bb Merge pull request #731 from atlassian/tags
providers/aws: make tags not computed
2015-01-06 15:38:35 -08:00
Armon Dadgar eef75a7a2a Merge pull request #695 from moredip/aws_key_pair-resource
add aws_key_pair resource
2015-01-06 10:46:58 -08:00
Armon Dadgar 0ffc11c885 Merge pull request #704 from yahyapo/master
[AWS] Adding default network ACL ID and default security group ID to VPC reference attributes
2015-01-06 10:29:16 -08:00
Armon Dadgar 11dc775c25 Merge pull request #701 from ceh/issue-687
builtin/providers/aws: acceptance tests for assigning private IPs on AWS instance
2015-01-05 11:41:15 -08:00
Sander van Harmelen 54ab857a54 Merge pull request #728 from atlassian/route_diff_fix
Route diff fix
2015-01-05 10:43:02 +01:00
Sander van Harmelen 7106917e98 Merge pull request #726 from atlassian/vgw_routes
Vgw routes
2015-01-05 10:39:42 +01:00
Emil Hessman c738bf0477 builtin/providers/aws: remove unreachable code and skip unnecessary remote call
When DeleteInternetGateway is successful it returns a nil error value.
However, for a nil error value, the RetryFunc returns an error yielding a
unnecessary second call to DeleteInternetGateway in the retry logic.

The logic works because DeleteInternetGateway eventually returns an ec2.Error
with error code InvalidInternetGatewayID.NotFound since the internet gateway
has been deleted in the previous call. The return value of nil breaks the
retry logic and the deletion is deemed successful.

Fix the unnecessary second call to DeleteInternetGateway by short circuiting
with a nil error value when deletion of the internet gateway is successful on
the first try.

Add an acceptance test for internet gateway deletion and remove unreachable
code while here.
2015-01-03 21:56:44 +01:00
Otto Jongerius eb1776c7e3 "Computed" should be false 2015-01-03 18:33:18 +11:00
Otto Jongerius 66159fd008 ignore routes originating from vgws 2015-01-02 19:17:52 +11:00
Otto Jongerius f6385215f6 Merge branch 'master' into route_diff_fix 2015-01-02 19:08:53 +11:00
Otto Jongerius 9bdb2fb2d1 This change belongs in a branch 2015-01-02 19:08:33 +11:00