-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added ability to configure resource labels on a GKE cluster #1663
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @garethjevans! Thanks for the PR! I have a couple minor suggestions on it. Let me know if you have any questions or concerns.
@@ -2229,3 +2250,18 @@ resource "google_container_cluster" "shared_vpc_cluster" { | |||
] | |||
}`, projectName, org, billingId, projectName, org, billingId, acctest.RandString(10), acctest.RandString(10), name) | |||
} | |||
|
|||
func testAccContainerCluster_withResourceLabels() string { | |||
testId := acctest.RandString(10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, usually we pass this kind of thing in as an argument, so we have control over whether configs are identical or different when we're referencing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return fmt.Sprintf(` | ||
resource "google_container_cluster" "with_resource_labels" { | ||
name = "tf-cluster-resourcelabel-test-%s" | ||
zone = "us-central1-a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: There's some weird indentation going on here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -172,6 +172,8 @@ output "cluster_ca_certificate" { | |||
|
|||
* `remove_default_node_pool` - (Optional) If true, deletes the default node pool upon cluster creation. | |||
|
|||
* `resource_labels` - (Optional) The GCE resource labels (key/value pairs) to be applied to the cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we specify this is a map, just so users know how to supply the information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find an example of this in the docs (where labels are set elsewhere), but have mentioned its a map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, sorry to not have a good example for you. Thank you for addressing it anyways!
@paddycarver the requested changes have been made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass, and I'm happy with the code changes. Looks good to me. Let me just confirm I shouldn't have someone more familiar with GKE double check this, and I'll get it merged in, likely within the next hour or two.
Hi, I was testing this change and found two issues:
|
Added ability to configure resource labels on a GKE cluster
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 👉 [email protected]. Thanks! |
No description provided.