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

generate compute instance and subnetwork iam #2647

Merged
merged 4 commits into from
Nov 12, 2019

Conversation

danawillow
Copy link
Contributor

@danawillow danawillow commented Nov 12, 2019

Generates the two IAM types, and improves the docs around import a bit. Also adds conditions to instance IAM since that's just a one line change for generated resources (subnetworks don't support them upstream yet).

Part of hashicorp/terraform-provider-google#2909.

This change has a few resource ID changes. I'm not super concerned with these, since those are only breaking if people are interpolating on them, which would be a super weird thing to do in these cases.

Release Note Template for Downstream PRs (will be copied)

iap: added support for IAM Conditions to the `google_compute_instance_iam_*` resources (beta provider only)
`google_compute_instance_iam_*` resources now support IAM Conditions (beta provider only). If any conditions had been created out of band before this release, take extra care to ensure they are present in your Terraform config so the provider doesn't try to create new bindings with no conditions. Terraform will show a diff that it is adding the condition to the resource, which is safe to apply.

@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, f772f5b.

Pull request statuses

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#1360
depends: GoogleCloudPlatform/terraform-google-conversion#258
depends: hashicorp/terraform-provider-google#4866

@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, 606ed9e.

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

@emilymye emilymye left a comment

Choose a reason for hiding this comment

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

The autogenerated stuff looks reasonable to me, so as long as tests are good I am 👍just a couple of thoughts

templates/terraform/examples/instance_basic.tf.erb Outdated Show resolved Hide resolved
templates/terraform/iam_policy.go.erb Outdated Show resolved Hide resolved

<% import_id_formats(object).each do |id_format| -%>
* <%= id_format %>
Copy link
Contributor

Choose a reason for hiding this comment

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

So we don't support partial import ID formats with resource-type qualifiers anymore, right? i.e. regions/reg/instances/X vs projects/proj/regions/reg/instances/X?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We support whatever the parent resource supports, so if we wanted to we could add more into the default formats (or the resource-specific lists), but we don't right now.

@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, 9d04034.

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, f5bfa19.

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 modular-magician merged commit bf5e882 into GoogleCloudPlatform:master Nov 12, 2019
@danawillow danawillow deleted the iam-gen branch November 12, 2019 07:29
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