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

Gke terraform upgrade to 0.12 and fix bastion instance zone to be region agnostic #554

Merged

Conversation

jlerche
Copy link
Contributor

@jlerche jlerche commented Jun 4, 2019

What problem does this PR solve?

This PR fixes #522 as well as upgrading the GCP terraform script to 0.12 compatibility. It will break backwards compatibility, but terraform will not run until upgraded

What is changed and how it works?

  • Previously, bastion instance zone was hardcoded, script now checks gcloud compute regions describe name-of-region to see what zones are available in the region, and grabs the first one in the result
  • Upgraded to be compatible with terraform 0.12
  • Usability: Previously, when doing terraform destroy it would frequently abort because GCP does not allow deleting simultaneous node pools. The user would then have to re-run the command. This no longer happens, the downside is that terraform apply will run a little slower as the node pools are now created and destroyed sequentially.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    terraform apply
    terraform destroy

Code changes

  • Has Terraform changes

Side effects

  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Does this PR introduce a user-facing change?:

NONE

@jlerche jlerche changed the title Gke terraform region agnostic upgrade tf 0 12 Gke terraform upgrade to 0.12 and fix bastion instance zone to be region agnostic Jun 4, 2019
@jlerche
Copy link
Contributor Author

jlerche commented Jun 4, 2019

@yikeke @DanielZhangQD PTAL

@yikeke
Copy link
Contributor

yikeke commented Jun 5, 2019

@yikeke @DanielZhangQD PTAL

Good job! And please remove the note accordingly under the "Destroy" section in the deploy/gcp/README.md file, thanks!

@jlerche jlerche force-pushed the gke_terraform_region_agnostic_upgrade_tf_0-12 branch from cd74920 to 954ad0b Compare June 5, 2019 22:46
Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

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

LGTM

@jlerche jlerche self-assigned this Jun 6, 2019
@jlerche jlerche requested a review from aylei June 6, 2019 04:00
deploy/gcp/main.tf Show resolved Hide resolved
deploy/gcp/main.tf Show resolved Hide resolved
Copy link
Contributor

@aylei aylei left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@yikeke yikeke left a comment

Choose a reason for hiding this comment

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

LGTM

@tennix tennix merged commit 36e4ae0 into pingcap:master Jun 6, 2019
@jlerche jlerche deleted the gke_terraform_region_agnostic_upgrade_tf_0-12 branch June 7, 2019 22:55
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.

GCP terraform deploy has zone for bastion instance hardcoded - fails to create when region is us-east1
4 participants