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

implements region_instance_group_manager #10907

Closed
wants to merge 2 commits into from
Closed

implements region_instance_group_manager #10907

wants to merge 2 commits into from

Conversation

zachgersh
Copy link
Contributor

@zachgersh zachgersh commented Dec 22, 2016

This fixes #8866

Some items of note:

  • changed the instance size / count on the tests due to flakey deletes. It is super hard to get regional instance group managers to go away quickly.
  • delete code was slightly tweaked

@zachgersh zachgersh changed the title WIP: implements region_instance_group_manager implements region_instance_group_manager Jan 5, 2017
@zachgersh
Copy link
Contributor Author

This should be good to go now cc @evandbrown

@greysond
Copy link

Any timeline on merging this?

@baskaran-md
Copy link

Can this be merged?

FYI - @evandbrown

@zachgersh
Copy link
Contributor Author

I can also fix this merge conflict that it now has 💃

@zachgersh
Copy link
Contributor Author

@evandbrown any input here?

@farioas
Copy link

farioas commented Feb 27, 2017

any updates?

@zachgersh
Copy link
Contributor Author

hey @paddyforan would you be able to review this as well for me? I have a merge conflict to resolve which I can do. I am unsure of the approach on this.

@vorlock
Copy link

vorlock commented Mar 28, 2017

it'd be nice to have it merged

@paddycarver
Copy link
Contributor

Hey @zachgersh! Sorry for the delay on reviewing this. I'm queuing it up. I have a couple in line ahead of it (sorry) but I'm hoping to get to it shortly. It's been on my radar for a bit now, and just keeps slipping. I know you have a couple open that need some attention. :) Thanks for contributing to Terraform, and sorry for the lengthy review timelines. Trying to do better about that.

@zachgersh
Copy link
Contributor Author

@paddyforan not a problem - I am planning on putting more PRs in and am glad to be here helping out (we use terraform a bunch at Pivotal). We all have things come up and I know you all are super slammed so THANK YOU for all the work you do on terraform!

I am going to fix the conflict here and push again so it works.

Copy link
Contributor

@paddycarver paddycarver left a comment

Choose a reason for hiding this comment

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

A few comments. Overall, this looks great! I just have some questions about a few specific portions, shouldn't be anything drastic.

Thanks for your patience, and sorry for the lengthy wait on the review.

Delete: resourceComputeRegionInstanceGroupManagerDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd love to see an Exists function here, too, just for completeness. Though kudos on the Import support right out the gate!

d.Set("instance_group", service.InstanceGroup)
d.Set("target_size", service.TargetSize)
d.Set("self_link", service.SelfLink)
d.Set("update_strategy", "RESTART") //this field doesn't match the manager api, set to default value
Copy link
Contributor

Choose a reason for hiding this comment

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

This would cause a perpetual diff if the user set update_strategy to anything else, I imagine. Why not try to read it out of d and set it to the default only if d doesn't have a value for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great idea!


currentSize := int64(d.Get("target_size").(int))

for err != nil && currentSize > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we comment this to better describe what's going on? Why are we backing off on error? Is it possible to use a StateChangeConf to wait for this instead of custom backoff code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lets try it and see how it goes when I run the tests.

PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckRegionInstanceGroupManagerDestroy,
Steps: []resource.TestStep{
Copy link
Contributor

Choose a reason for hiding this comment

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

I may be reading this wrong, but with only one step, I'm not sure this is actually updating anything--I think it's just creating a new resource with the desired config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, don't remember what I was thinking here but I agree this test looks incorrect - let me make sure we get an update in here.

page_title: "Google: google_compute_instance_group_manager"
sidebar_current: "docs-google-compute-instance-group-manager"
page_title: "Google: google_compute_region_instance_group_manager"
sidebar_current: "docs-google-compute-region-instance-group-manager"
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like you just updated the compute_instance_group_manager docs instead of copying them and adding a new resource.

@benpollard
Copy link

@zachgersh I imagine you're really busy but any ideas when you are going to have time to action the review points on the PR?

@zachgersh
Copy link
Contributor Author

Hey @benpollard - targeting the end of the week :D I spoke to @paddycarver about this recently. Really appreciate you pinging me as well.

@bjaroszewski
Copy link

Hey @benpollard, @zachgersh,
Any chances to process this PR in any foreseeable future? :)

@danielcompton
Copy link
Contributor

@bjaroszewski this PR probably will need to move over to the new Google Terraform provider repository.

@matti
Copy link

matti commented Jul 6, 2017

@danielcompton how will that move happen? I couldn't find the issue there (https://github.com/terraform-providers/terraform-provider-google/issues)

@zachgersh
Copy link
Contributor Author

zachgersh commented Jul 6, 2017 via email

@apparentlymart
Copy link
Contributor

Hi @zachgersh,

In case it's helpful, I rebased your change into the separated provider repo here:
https://github.com/terraform-providers/terraform-provider-google/compare/zachgersh-region-instance-group-manager

I didn't open a PR for it since I think it'd be better for you to copy these changes into your own fork and open a PR from there, since that way you can make any further changes you want to make in a repository where you have write access.

This was an automatic rebase with some manual conflict resolution, so I apologize if I messed anything up along the way.

@mattes
Copy link

mattes commented Aug 31, 2017

It's really hard to track what the status of this is. There is a lot of duplicate tickets open. Maybe someone can close the dups.

@rosbo
Copy link

rosbo commented Sep 6, 2017

@paddycarver Can you close this one. I have a PR open in the new repo for the same thing:
hashicorp/terraform-provider-google#394

@paddycarver
Copy link
Contributor

Closing this one out in favour of hashicorp/terraform-provider-google#394. Thanks for all the hard work on this, @zachgersh!

@ghost
Copy link

ghost commented Apr 7, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
@zachgersh zachgersh deleted the region-instance-group-manager branch April 7, 2020 14:57
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.

Feature Request: support regional google instance group managers