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

feat!: Upgrade google-project-factory to v10, add Terraform 0.13 constraint and module attribution #81

Merged
merged 4 commits into from
Jan 12, 2021

Conversation

bouk
Copy link
Contributor

@bouk bouk commented Dec 19, 2020

This is required to support Terraform version 0.14. It is also a
breaking change because it dropped the skip_gcloud_download variable.

This is required to support Terraform version 0.14. It is also a
breaking change because it dropped the `skip_gcloud_download` variable.
@zonget
Copy link

zonget commented Dec 21, 2020

Hi, I'm using my own fork to use this in TFC and I think it's also necessary to modify the google providers (https://github.com/zonget/terraform-google-bootstrap/commit/3555e63835c11d47a2c9cac9f96c65279bb428b9)

@rjerrems
Copy link
Contributor

rjerrems commented Jan 6, 2021

@bouk - I believe tests are failing because the v10.0.1 is built agains't a newer version of terraform.

Can you update the YAMLs in build/ to use this version of the image? https://github.com/terraform-google-modules/terraform-google-project-factory/blob/master/build/lint.cloudbuild.yaml#L24

@rjerrems
Copy link
Contributor

rjerrems commented Jan 6, 2021

This would also mean that this module is no longer terraform 12 version compatible (these are the errors I am seeing):

Warning: Provider source not supported in Terraform v0.12

  on .terraform/modules/project/modules/budget/versions.tf line 21, in terraform:
  21:     google-beta = {
  22:       source  = "hashicorp/google-beta"
  23:       version = ">= 3.43, < 4.0"
  24:     }
  

FYI @bharathkkb

@bouk
Copy link
Contributor Author

bouk commented Jan 6, 2021

I've bumped the tools version.

@rjerrems
Copy link
Contributor

rjerrems commented Jan 7, 2021

Thanks - it looks like tests are failing due to provider version mismatch of constraints:

       Error: Failed to query available provider packages
       
       Could not retrieve the list of available versions for provider
       hashicorp/google: no available releases match the given constraints ~> 3.43.0,
       ~> 3.9, >= 3.43.*, < 4.0.*, >= 3.50.*, < 4.0.*, >= 3.43.*, < 4.0.*, >= 3.43.*,
       < 4.0.*, ~> 3.5, >= 3.50.*, < 4.0.*, >= 3.43.*, < 4.0.*, >= 3.43.*, < 4.0.*,
       >= 3.43.*, < 4.0.*

FYI you can run the linting tests locally using this command make docker_test_lint which usually gives you an idea if there are any style/validation issues quickly.

Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Constraints in examples like


will need to be updated to >= 3.50

build/int.cloudbuild.yaml Outdated Show resolved Hide resolved
@rjerrems
Copy link
Contributor

rjerrems commented Jan 8, 2021

@bharathkkb - I have updated based on your feedback and added attribution as well.

I noticed we that I don't think we need the beta provider anymore so I also removed that. PTAL when you have a chance.

bharathkkb
bharathkkb previously approved these changes Jan 12, 2021
versions.tf Outdated Show resolved Hide resolved
@bharathkkb bharathkkb changed the title Upgrade google-project-factory to v10.0.1 feat!: Upgrade google-project-factory to v10, add Terraform 0.13 constraint and module attribution Jan 12, 2021
@bharathkkb bharathkkb merged commit 4d00da3 into terraform-google-modules:master Jan 12, 2021
@release-please release-please bot mentioned this pull request Jan 12, 2021
@bouk bouk deleted the project-factory-10 branch January 12, 2021 09:45
@ipv1337
Copy link

ipv1337 commented May 13, 2021

I'm finally getting around to playing catch up on these version updates.

Is there a documentation or instructions somewhere on a proper process to update our terraform foundations codebase that also uses this bootstrap module? Bootstrapping for the first time is trivial, but how do we perform upgrades to terraform in a sane manner for instance.

@morgante
Copy link
Contributor

@ipv1337 We maintain a changelog which explains what has changed between versions.

The process for upgrading is just to change the version you point to and run terraform apply. Any breaking changes are noted in the changelog (and trigger a major version upgrade).

@ipv1337
Copy link

ipv1337 commented May 13, 2021

Thanks @morgante.

I'll give that a try and see how that works out on my test foundation environment. I was expecting something more complex with terraform upgrades since I thought upgrading terraform requires some manual process for upgrading the state files as well.

@bharathkkb
Copy link
Member

I was expecting something more complex with terraform upgrades

This was a major version upgrade because we bumped min supported TF version to 0.13. You can also review the project factory 10.0 upgrade guide but should be no-op for the most part.

@ipv1337
Copy link

ipv1337 commented May 13, 2021

Great, thanks for the quick responses. I'll checkout the project factory upgrade guide as well!

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.

None yet

6 participants