Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade terraform and aws provider to latest possible #21

Closed
wants to merge 8 commits into from

Conversation

karandit
Copy link
Contributor

Problem: we would like to reduce technical debt, hence use latest versions from tf and aws provider

Solution: upgrade tf to 1.5.7, aws provider to 5.19.0, use nix develop instead of nix-shell

Problem: we'd like to use latest tf version, but the tf state uses 0.11

Solution: go back in time to tf 0.12.29 and apply `terraform 0.12upgrade`

see https://developer.hashicorp.com/terraform/language/v1.1.x/upgrade-guides/0-12
Problem: we'd like to use latest tf version, but the tf state uses 0.12

Solution: go back in time to tf 0.13.7 and apply `terraform 0.13upgrade`

https://developer.hashicorp.com/terraform/language/v1.1.x/upgrade-guides/0-13
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-3-upgrade#domain_validation_options-changed-from-list-to-set

Meanwhile a small change was detected, but following the suggestion
`terraform state mv 'aws_route53_record.cert_validation[0]'
'aws_route53_record.cert_validation["ghc.dev"]'` there was no change
Problem: we'd like to use latest tf version, but the tf state uses 0.14

Solution: go back in time to tf 0.15.5, run terraform plan, fix
incompatilbities, terraform apply
Problem: we would like to use the latest version from AWS provider, but
there were some deprecated attributes

Solution: upgrade AWS provider to the latest 3.xx and adjust resources
Problem: we would like to use the latest version from AWS provider, but
there were attributes changes during the years

Solution: upgrade AWS provider to the latest 4.xx and adjust resources
Problem: we would like to use the latest version from AWS provider

Solution: upgrade AWS provider to the latest 5.xx
Problem: we would like to use latest tf version

Solution: update flake nixpkgs and tf version
@karandit karandit closed this Sep 29, 2023
@karandit karandit deleted the karandit/upgrade-tf-to-0.12 branch September 29, 2023 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant