-
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
Add compute instance group data source #267
Add compute instance group data source #267
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 Aleksandr,
Thank you for your contribution!
I would suggest renaming this data source google_compute_instance_group
and not only read the instances but also the other attributes of the google_compute_instance_group itself such as zone, description, named_ports, etc. This way, it will map 1-to-1 with the resource and offer more feature to the user.
You can probably reuse the resourceComputeInstanceGroupRead method in the data source to read all of these fields. You can look at PR #268 that I opened just a few minutes ago to see how to reuse the read method from the resource itself.
--- | ||
layout: "google" | ||
page_title: "Google: google_compute_instance_group_instances" | ||
sidebar_current: "docs-google-datasource-compute-instance-group-instances" |
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.
Don't forget to update this file to include your new docs page in the sidebar menu
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.
Looks very good. One small nit and we are ready to merge.
Schema: map[string]*schema.Schema{ | ||
"name": { | ||
Type: schema.TypeString, | ||
Required: true, |
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.
Since the parent is Computed, it probably doesn't make a difference but in the context of a data source, this should be Computed: true
not Required: true
Merging and will do the |
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! |
No description provided.