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

Move RIGM/IGM updating to use versions and update_policy #2546

Merged

Conversation

chrisst
Copy link
Contributor

@chrisst chrisst commented Oct 25, 2019

Moving the beta functionality for multiple version control from beta to GA. Also deprecating the old way of specifying the instance template and update strategies to be removed in 3.0.0

I ended up marking some required fields as Optional/Computed in order to make sure that there is a seamless transition from using instance_template the old way to the new way. My intent is to mark version and some of those other fields as required again with the 3.0.0 upgrade when I remove the old way of specifying them.

Pre-work for: hashicorp/terraform-provider-google#4555

Release Note Template for Downstream PRs (will be copied)

`compute`: added support for multiple versions of `instance_template` and granular control of the update policies for `google_compute_instance_group_manager` and `google_compute_region_instance_group_manager`.
`compute`: deprecated `instance_template` for `google_compute_instance_group_manager` and `google_compute_region_instance_group_manager` . Use `version.instance_template` instead.
`compute`: deprecated `update_strategy` for `google_compute_instance_group_manager` . Use `update_policy` instead.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 87653c9.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#1309
depends: hashicorp/terraform-provider-google#4763

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 457daa8.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 81c0d09.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

@chrisst chrisst force-pushed the deprecate-IGM-fields branch from 81c0d09 to 6289795 Compare October 28, 2019 19:29
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 6289795.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

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 couple minor comments, but overall, looks awesome.

@@ -358,17 +361,16 @@ func resourceComputeRegionInstanceGroupManagerCreate(d *schema.ResourceData, met
Name: d.Get("name").(string),
Description: d.Get("description").(string),
BaseInstanceName: d.Get("base_instance_name").(string),
<% if version.nil? || version == 'ga' -%>
<% if version == 'ga' -%>
<% if version == 'ga' -%>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be duplicated here?

d.Set("version" , nil)

<% if version == 'ga' -%>
// rolling_update_policy
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment doesn't really tell me anything.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, 6444ada.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

chrisst and others added 8 commits November 4, 2019 17:22
For fields like instance_template there should be a clean path to move from the
old way of specifying to the new way of specifying without a broken config or
casuing an apply.
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants