-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/google: Add google_compute_zones data source #11954
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.
1 small question but LGTM!
if r, ok := d.GetOk("region"); ok { | ||
region = r.(string) | ||
} | ||
projectBaseUrl := "https://www.googleapis.com/compute/v1/projects/" + config.Project |
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.
should this be done using fmt.Sprintf rather than concatenation? I am not sure which is the right way to do it TBH
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.
Yeah, sure, why not... I will change it
5a3e68f
to
c40b0de
Compare
c40b0de
to
76c40ac
Compare
@stack72 Updated |
LGTM! |
provider/google: Add google_compute_zones data source
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. |
I wanted to build a GKE cluster and I saw hard-coded zones in the example which is what prompted me to write this data source in the 1st place.
There are some HCL changes that would help making this more elegant/useful though, specifically slicing lists via colon, e.g.
Test plan