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-cluster-autopilot: add validation for release_channel input variable #1645

Conversation

olliefr
Copy link
Collaborator

@olliefr olliefr commented Sep 3, 2023

This PR adds validation for the release_channel input variable. This is to align the code with the requirements for Autopilot clusters and to make the module more resilient to invalid input.

Relevant Google Cloud docs:

The validation should not have any adverse effect on the rest of the codebase because the input variable name or type has not changed and the default value is provided. The default value I picked is the same value that the API uses if no value is specified. It is also the same value that is used by Cloud Console's form to create a new Autopilot cluster.

I also added a bit of context to the input variable's documentation string.


Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

Copy link
Collaborator

@ludoo ludoo left a comment

Choose a reason for hiding this comment

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

Thank you for this PR!

@ludoo ludoo enabled auto-merge (squash) September 3, 2023 00:29
@ludoo ludoo merged commit 42ebbcc into GoogleCloudPlatform:master Sep 3, 2023
@olliefr olliefr deleted the olliefr/gke-cluster-autopilot-release-channel branch September 3, 2023 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants