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

Add compute instance group data source #267

Merged
merged 2 commits into from
Aug 11, 2017

Conversation

aadidenko
Copy link
Contributor

No description provided.

Copy link
Contributor

@rosbo rosbo left a 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"
Copy link
Contributor

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

@aadidenko aadidenko changed the title Add instance group instances datasource Add compute instance group data source Jul 29, 2017
Copy link
Contributor

@rosbo rosbo left a 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,
Copy link
Contributor

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

@rosbo
Copy link
Contributor

rosbo commented Aug 11, 2017

Merging and will do the Computed change into a new PR.

@rosbo rosbo merged commit 99b43ac into hashicorp:master Aug 11, 2017
z1nkum pushed a commit to z1nkum/terraform-provider-google that referenced this pull request Aug 15, 2017
negz pushed a commit to negz/terraform-provider-google that referenced this pull request Oct 17, 2017
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
@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.

3 participants