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

some resources upgraded to google provider 3.0 #8103

Conversation

mccare
Copy link
Contributor

@mccare mccare commented Dec 13, 2019

Upgraded some google cloud terraform resources to fit google cloud provider 3.0

  • instance template name_prefix is maximum length of 32
  • instance group manager needs the instance_template in a version block

See also https://www.terraform.io/docs/providers/google/guides/version_3_upgrade.html

Btw, syntax is still terraform 0.11 and needs to be transformed with terraform 0.12upgrade

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 13, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @mccare. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 13, 2019
@rifelpet
Copy link
Member

rifelpet commented Dec 13, 2019

/ok-to-test

These changes appear backwards compatible with the 2.X provider version, so it appears to be safe though I don't use GCE + terraform so I can't test it myself.

Travis CI is complaining that you need to run make goimports

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 13, 2019
@mccare mccare force-pushed the mccare-terraform-google-provider-3-upgrade branch from a0d4bc9 to ddc0879 Compare December 13, 2019 18:22
@mccare
Copy link
Contributor Author

mccare commented Dec 13, 2019

Did run make gofmt

@rifelpet
Copy link
Member

One more thing, it might be a good idea to add a version requirement to the provider definition so that users dont accidentally use 2.X.

It should just be a matter of adding a providerGoogle["version"] = ">= 3.0.0" here:

if t.Cloud.ProviderID() == kops.CloudProviderGCE {
providerGoogle := make(map[string]interface{})
providerGoogle["project"] = t.Project
providerGoogle["region"] = t.Region
for k, v := range tfGetProviderExtraConfig(t.clusterSpecTarget) {
providerGoogle[k] = v
}
providersByName["google"] = providerGoogle

https://www.terraform.io/docs/configuration/providers.html#provider-configuration

@justinsb
Copy link
Member

Thanks @mccare

As we're trying to get GCE support to stable, this seems like the right time to make these changes - thanks! cc @geojaz

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb, mccare

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2019
@justinsb
Copy link
Member

And @rifelpet is right, sorry I overlooked that comment. I'll send a PR to implement it!

@k8s-ci-robot k8s-ci-robot merged commit f6a7719 into kubernetes:master Dec 14, 2019
justinsb added a commit to justinsb/kops that referenced this pull request Dec 14, 2019
There were some incompatible changes made in version 3 of the GCE
provider, so we specify a minimum version to make version mismatches
more obvious.

As suggested in kubernetes#8103
@mccare mccare deleted the mccare-terraform-google-provider-3-upgrade branch December 15, 2019 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants