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

Changed admin_username and key_data to require a new resource. #904

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Feb 28, 2018

Also fixed a terraform crash when key_data is empty. Added Kubernetes cluster example. Fixes #903, #895

…cash when key_data was empty. Added Kubernetes cluster example.
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

keyData := ""
if key, ok := linuxKeys[0].(map[string]interface{}); ok {
keyData = key["key_data"].(string)
}
sshPublicKey := containerservice.SSHPublicKey{
KeyData: &keyData,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

minor this'd probably be simpler as:

sshPublicKey := containerservice.SSHPublicKey{}
if key, ok := linuxKeys[0].(map[string]interface{}); ok {
  keyData = key["key_data"].(string)
  sshPublicKey.KeyData = &keyData
}

@katbyte
Copy link
Collaborator Author

katbyte commented Feb 28, 2018

Tests pass:
screen shot 2018-02-28 at 12 00 53

@katbyte katbyte merged commit d329df7 into master Feb 28, 2018
@katbyte katbyte deleted the b-kubernetes_cluster-admin branch February 28, 2018 20:04
katbyte added a commit that referenced this pull request Feb 28, 2018
@ghost
Copy link

ghost commented Mar 31, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 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.

Leaving azurerm_kubernetes_cluster ssh_key key_data blank causes a terraform crash
2 participants