Commit Graph

60 Commits

Author SHA1 Message Date
Mitchell Hashimoto f0511631bf
provider/aws: id-only refresh for autoscaling groups 2016-04-21 21:36:52 -07:00
Clint 2ea8c64079 provider/aws: More randomization to our Acc tests (#6124)
* provider/aws: Add more Randomization to DB Parameter Group Tests, to avoid collisions

* provider/aws: Add more randomization to Autoscaling group tests
2016-04-11 12:06:28 -05:00
Paul Hinze 6f76fb0702 provider/aws: set ASG health_check_grace_period default to 300
Closes #5658
2016-03-23 18:55:37 -05:00
clint shryock 5dc387354d provider/aws: Randomize tests more to reduce conflicts
- ASG placement tests
- Randomize DynamoDB names in tests
- tag the sg created in this test to help identify in the console
- randomize policy and role names
2016-03-08 09:56:14 -06:00
stack72 d3697fa50b provider/aws: Combine AWS Metrics Collection resource and AWS
Autoscaling Group
2016-02-29 20:58:41 +00:00
Trevor Pounds 066a60debe Add termination policies acceptance test. 2016-02-22 17:05:10 -08:00
Trevor Pounds 164596880a Update acceptance test to use t2.micro instances.
The AWS free tier allows up to 750 hours on t2.micro
instance types. It's better to use cheaper instances
in case the resources are not cleaned up if a tests
is canceled or crashes.
2016-02-09 00:24:38 -08:00
Trevor Pounds 5801b991c9 Cleanup unrelated config to speed up autogenerate name acc test.
Removes overspecified config that is unrelated to testing the auto scaling
group's autogenerated name. The test is only concerned with checking that
the auto scaling group was created successfully with an autogenerated name
matching a specific pattern.
2016-02-08 21:28:35 -08:00
Trevor Pounds eba605fa6a Cleanup unrelated config to speed up AZ/VPC acc tests.
Removes overspecified config that is unrelated to the auto scaling
group's availability zone and VPC identifier acceptance tests. The
created auto scaling groups do not need to spin up any hosts since
the acceptance tests are only concerned with checking the existence
of the associated availability zones and VPC identifiers.
2016-02-08 19:55:11 -08:00
Trevor Pounds dac7226a8e Check calculated availability zones. 2016-02-07 14:24:31 -08:00
Paul Hinze c70eab6500 aws: undeprecate min_elb_capacity; restore min capacity waiting
It was a mistake to switched fully to `==` when activating waiting for
capacity on updates in #3947. Users that didn't set `min_elb_capacity ==
desired_capacity` and instead treated it as an actual "minimum" would
see timeouts for every create, since their target numbers would never be
reached exactly.

Here, we fix that regression by restoring the minimum waiting behavior
during creates.

In order to preserve all the stated behavior, I had to split out
different criteria for create and update, criteria which are now
exhaustively unit tested.

The set of fields that affect capacity waiting behavior has become a bit
of a mess. Next major release I'd like to rework all of these into a
more consistently named block of config. For now, just getting the
behavior correct and documented.

(Also removes all the fixed names from the ASG tests as I was hitting
collision issues running them over here.)

Fixes #4792
2016-01-27 13:30:44 -06:00
Paul Hinze 319f7d77a0 Merge pull request #3947 from hashicorp/phinze/asg-wait-on-update
provider/aws: wait for ASG capacity on update
2016-01-06 15:55:43 -06:00
Paul Hinze f473c2a6d4 provider/aws: don't set static ELB names in tests
Prevents ELB name collisions during test runs
2015-12-21 17:41:55 -06:00
Paul Hinze 8e40b6b855 provider/aws: fixes to ASG placement_group tests
Based on @stack72's recommendations in #3704, thanks @stack72!
2015-12-03 18:17:54 -06:00
Paul Hinze 709d1f3599 Merge pull request #3704 from dayer4b/add-placement-group
added placement group as an option for autoscaling groups
2015-12-03 18:05:01 -06:00
Paul Hinze 7f9360797c provider/aws: wait for ASG capacity on update
It's a bit confusing to have Terraform poll until instances come up on
ASG creation but not on update. This changes update to also poll if
min_size or desired_capacity are changed.

This changes the waiting behavior to wait for precisely the desired
number of instances instead of that number as a "minimum". I believe
this shouldn't have any undue side effects, and the behavior can still
be opted out of by setting `wait_for_capacity_timeout` to 0.
2015-11-17 10:25:41 -06:00
Sunil K Chopra bf88ee8ddb fix test to include creation of placement group 2015-11-13 12:40:19 -06:00
Sunil K Chopra df41f10d1d tests! yes! (thanks stack72) 2015-11-02 09:37:09 -06:00
stack72 69b905fb92 Making the AutoScalingGroup name optiona 2015-10-31 09:24:46 +00:00
Clint 3ce656b007 Merge pull request #2890 from pforman/asg-termination
Update AWS ASG termination policy code and tests
2015-10-26 16:42:53 -05:00
Clint Shryock 0c2f189d08 provider/aws: Update to aws-sdk 0.9.0 rc1 2015-08-17 13:27:16 -05:00
Paul Forman c617445fec Update AWS ASG termination policy code and tests
The initial commit of AWS autoscaling group termination policy was
unfinished.  It only worked on "create", and so had a needless ForceNew
that would rebuild autoscaling groups on any change.  It also used a
HashString set, so it didn't preserve ordering of multiple policies
correctly.

Added the "update" operation, and converted to a TypeList to preserve
ordering.  In addition, removing the policy or setting it to a null list
will reset the policy to "Default", the standard AWS policy.

Updated the acceptance tests to verify the update, but the null case is
difficult to test.
2015-07-29 22:56:56 -06:00
Clint Shryock 579ccbefea provider/aws: Update source to comply with upstream breaking change 2015-07-28 15:29:46 -05:00
Clint Shryock 04a5890853 minor fix to the test 2015-07-14 10:39:31 -05:00
Clint Shryock ed98e02e4a provider/aws: Improved Auto Scaling Groups updates
- availability zones are optional if you specify a VPC Zone Identifier (subnet)
- availability zones can be updated in place
2015-07-14 10:19:10 -05:00
Paul Hinze b71fa3d0ae provider/aws: handle upstream aws-sdk-go repo move
`awslabs/aws-sdk-go => aws/aws-sdk-go`

Congrats to upstream on the promotion. :)
2015-06-03 13:36:57 -05:00
Paul Hinze e84203a2dc provider/aws: remove asg test dependence on default SG
accidentally pushed this with an implicit dependency on the default SG
and VPC
2015-06-01 12:12:49 -05:00
Chris Bednarski 3768bdeae1 Updated the names for autoscaling to match breaking changes in upstream
AutoScalingGroup -> Group

04d1270245
2015-05-29 00:55:59 -07:00
Paul Hinze 31258e06c6 provider/aws: fix breakages from awserr refactor
This landed in aws-sdk-go yesterday, breaking the AWS provider in many places:

3c259c9586

Here, with much sedding, grepping, and manual massaging, we attempt to
catch Terraform up to the new `awserr.Error` interface world.
2015-05-20 06:21:23 -05:00
Paul Hinze b56a42627f provider/aws: ASGs can wait for ELB InService
This enhances the waiting strategy introduced in #1839 to wait for each
ASG instance to become InService in attached ELBs before continuing.
2015-05-14 15:03:53 -05:00
Paul Hinze 1594cb3dbe provider/aws: remove names from LCs in ASG tests
Makes the tests a little more durable if your account happens to end up
with a dangling LC.
2015-05-07 10:14:49 -05:00
Paul Hinze 063454e9b8 provider/aws: wait for ASG capacity on creation
On ASG creation, waits for up to 10m for desired_capacity or min_size
healthy nodes to show up in the group before continuing.

With CBD and proper HealthCheck tuning, this allows us guarantee safe
ASG replacement.
2015-05-06 18:34:20 -05:00
Clint Shryock 7a99dd48b2 provider/aws: Convert Launch Configuration over to upstream
- removes extra ASG connection
2015-04-16 07:10:17 -05:00
Clint Shryock 210b380d01 go vet updates 2015-04-15 15:32:20 -05:00
Clint Shryock 723be13f96 go fmt asg things 2015-04-15 15:30:35 -05:00
Clint Shryock 1f7d0944f1 provider/aws: Convert AWS ASG to upstream aws-sdk-go 2015-04-15 15:29:59 -05:00
Clint Shryock 84e448de1a Fix hashcode for ASG test 2015-04-01 10:42:53 -05:00
Clint Shryock deda59b50e minor code cleanups to get acceptance tests passing 2015-03-26 14:49:15 -05:00
Radek Simko fff05e2aad Tags support added for AWS ASG 2015-03-26 07:35:15 +00: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 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 92bf85925b providers/aws: Convert Launch Configurations to awslabs/aws-sdk-go 2015-02-24 21:02:01 -06:00
Mitchell Hashimoto 5a64d0900b providers/aws: test for allowing in-place lC update 2015-02-17 16:12:02 -08:00
Sander van Harmelen 83c760fcb3 core: refactoring the way sets work internally v2
This is a refactored solution for PR #616. Functionally this is still
the same change, but it’s implemented a lot cleaner with less code and
less changes to existing parts of TF.
2014-12-12 23:21:20 +01:00
Armon Dadgar fae29f4685 Merge pull request #506 from muralimadhu/master
Support termination policies in aws auto scaling group
2014-12-07 23:35:33 -08:00
Sander van Harmelen eccd5ad308 Refactored about 90%
Still need to update 2 resources and check the acceptance tests, but
overall we’re nearly there 😃
2014-11-21 17:58:34 +01:00
Madhu 7d4064ca03 Termination Policy Support 2014-10-23 14:58:54 -07:00
John Eckhart 22fa84ebcb Fix build breaks from latest goamz 2014-10-17 00:53:54 -04:00
Mitchell Hashimoto 5eccbba606 providers/aws: support non-destructive update of desired_capacity for
ASG
2014-10-10 16:25:23 -07:00
Mitchell Hashimoto caaa9d145a providers/aws: convert autoscaling group to helper/schema 2014-10-10 14:34:40 -07:00