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

google container_cluster master_auth should be optional #14630

Merged

Conversation

dwradcliffe
Copy link
Contributor

I'm not sure why master_auth is required; it's not even an option when you create a cluster via the console today.
This should make it optional.

@dwradcliffe dwradcliffe force-pushed the google_container_cluster_master_auth branch from f781ede to 3a929e9 Compare May 18, 2017 15:49
@dwradcliffe dwradcliffe force-pushed the google_container_cluster_master_auth branch from 3a929e9 to 8a4576f Compare May 18, 2017 15:58
@dwradcliffe
Copy link
Contributor Author

r? @danawillow @radeksimko

MasterAuth: &container.MasterAuth{
if v, ok := d.GetOk("master_auth"); ok {
masterAuths := v.([]interface{})
if len(masterAuths) > 1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're here, would you mind removing this check and instead putting MaxItems: 1 in the schema defined above? That'll move the check from the apply phase to the plan phase.

ForceNew: true,
MaxItems: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops, missed this earlier- you'll also need to set this to computed to get tests without master_auth to pass, since the server does return master_auth info.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do the tests pass now? 😕

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you running the acceptance tests or are you just looking at the travis build output? The build passes but the acceptance tests didn't when I ran them (https://github.com/hashicorp/terraform/blob/master/.github/CONTRIBUTING.md#running-an-acceptance-test)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh right, forgot about that.

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @dwradcliffe!

@danawillow danawillow merged commit 4e6dcb3 into hashicorp:master May 31, 2017
@ghost
Copy link

ghost commented Apr 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants