Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

terraform/aws/workers: fix upgrades from v0.1.0 #638

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

iaguis
Copy link
Contributor

@iaguis iaguis commented Jun 18, 2020

This changes LoadBalancer names and reverts ASG names to the old scheme so upgrades from v0.1.0 are smooth.

In a following release we can change the ASG name again and we can look into using something like create_before_destroy to avoid downtime.

iaguis and others added 2 commits June 18, 2020 10:59
Even though the new name is better, changing it will recreate the ASG
when updating from v0.1.0.

To avoid this we switch back to the old name.

Co-authored-by: Mateusz Gozdek <mateusz@kinvolk.io>
Doing so will cause the LoadBalancer to be recreated by Terraform. First
the new one will be created and then the old one will be destroyed.

We need to do this because our LoadBalancers changed their
health_check.matcher to TCP and modifying them in place is not supported
by the AWS provider.

Also, this uses an underscore instead of a dash to separate words, which
better follows Terraform's conventions[[1]].

[1]: https://www.terraform.io/docs/extend/best-practices/naming.html#resource-names

Co-authored-by: Mateusz Gozdek <mateusz@kinvolk.io>
@iaguis iaguis requested a review from johananl June 18, 2020 09:20
Copy link
Member

@johananl johananl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Didn't run tests.

@iaguis iaguis merged commit 84c3265 into master Jun 18, 2020
@iaguis iaguis deleted the iaguis/fix-aws-upgrades branch June 18, 2020 11:25
@iaguis
Copy link
Contributor Author

iaguis commented Jun 18, 2020

I did test this several times, so I'm fine with merging it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants