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

Remove project field from IAM documentation #4899

Closed

Conversation

muhammadpanji
Copy link
Contributor

Fix: hashicorp/terraform-provider-google#7170

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)


@google-cla google-cla bot added the cla: yes label Jun 21, 2021
@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@rileykarson, please review this PR or find an appropriate assignee.

@muhammadpanji
Copy link
Contributor Author

This is related to #4662

My understanding is the resource_iam.html.markdown.erb file will include the project parameter if object.base_url contain {{project}}, which is true in

base_url: b?project={{project}}

Looking at the following iam_policy.base_url:

I'm proposing changing the include comparison to use iam_policy.base_url value instead of base_url value

@rileykarson rileykarson requested review from slevenick and removed request for rileykarson June 23, 2021 16:49
@slevenick
Copy link
Contributor

/gcbrun

@@ -202,7 +202,7 @@ The following arguments are supported:
* `<%= param.name.underscore -%>` - (Required) <%= param.description -%> Used to find the parent resource to bind the IAM policy to
<% end -%>
<% end -%>
<% if object.base_url.include?("{{project}}")-%>
<% if object.iam_policy.base_url.include?("{{project}}")-%>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need a nil check on the iam policy's base_url. This is failing to build probably because the IAM policy does not always have its own base_url, and in most cases inherits from the parent object

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.

google_storage_bucket_iam* does not allow project per the docs
4 participants