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 fine-grained resource for service perimeter resource #1712

Conversation

modular-magician
Copy link
Collaborator

Fixes hashicorp/terraform-provider-google#4509.

In order to do this I had to make some changes to nested_query to allow it to add/remove an element of an array which is part of a nested object. I got it to work in this case by wrapping the object down the chain, so the patch request in this case would look like:

{
  "status": {
    "resources": [...]
  }
}

Notably, this doesn't merge the resources block into the status object that was returned from the API, but instead just wraps it. This works fine in this case because this API uses an update mask, so it can modify resources without changing anything else within status, but isn't future-proof if a similarly nested resource comes along that doesn't use an update mask.

Release Note Template for Downstream PRs (will be copied)

`google_access_context_manager_service_perimeter_resource`

Derived from GoogleCloudPlatform/magic-modules#3052

)

* add fine-grained resource for service perimeter resource

* exclude from inspec

* add sidebar entry and change acctest import

* comments, readability

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 5bae80d into hashicorp:master Feb 3, 2020
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.

Add granular VPC Service-Control resource
1 participant