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 ability to bulk edit access manager access levels and service perimeters #3852

Merged

Conversation

megan07
Copy link
Contributor

@megan07 megan07 commented Aug 11, 2020

Fixes hashicorp/terraform-provider-google#6751

I didn't test all the fields, just because these are just plural forms of already created resources. I can add full tests in if needed though.

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_access_context_manager_access_levels`
`google_access_context_manager_service_perimeters`

@google-cla google-cla bot added the cla: yes label Aug 11, 2020
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 9 files changed, 2884 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 2884 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 2 files changed, 755 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=139161"

@modular-magician
Copy link
Collaborator

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 9 files changed, 2884 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 2884 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 2 files changed, 755 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=139162"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGameServicesGameServerDeploymentRollout_basic|TestAccCloudBuildTrigger_cloudbuildTriggerBuildExample|TestAccCloudBuildTrigger_basic|TestAccComputeImage_sourceImage|TestAccComputeImage_sourceSnapshot|TestAccComputeInstanceTemplate_shieldedVmConfig1|TestAccComputeInstanceTemplate_shieldedVmConfig2|TestAccComputeInstance_shieldedVmConfig2|TestAccComputeInstance_shieldedVmConfig1|TestAccContainerCluster_withReleaseChannelEnabled|TestAccContainerCluster_withReleaseChannelEnabledDefaultVersion|TestAccContainerCluster_withInvalidReleaseChannel|TestAccContainerCluster_misc|TestAccGameServicesGameServerCluster_gameServiceClusterBasicExample|TestAccGameServicesGameServerConfig_gameServiceConfigBasicExample|TestAccGameServicesGameServerDeployment_gameServiceDeploymentBasicExample|TestAccGameServicesGameServerDeploymentRollout_gameServiceDeploymentRolloutBasicExample|TestAccGameServicesRealm_gameServiceRealmBasicExample|TestAccEndpointsService_basic|TestAccOSConfigPatchDeployment_osConfigPatchDeploymentFullExample|TestAccPubsubSubscription_basic|TestAccPubsubSubscription_update|TestAccRedisInstance_redisInstanceFullExample|TestAccRedisInstance_redisInstancePrivateServiceExample|TestAccSqlDatabaseInstance_dontDeleteDefaultUserOnReplica|TestAccSqlDatabaseInstance_replica|TestAccSqlDatabaseInstance_settings_basic|TestAccSqlDatabaseInstance_slave|TestAccSqlDatabaseInstance_highAvailability|TestAccSqlDatabaseInstance_settingsDowngrade|TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled|TestAccSqlDatabaseInstance_settings_upgrade|TestAccSqlDatabaseInstance_authNets|TestAccSqlDatabaseInstance_basic_with_user_labels You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=139163"

@megan07 megan07 requested a review from slevenick August 11, 2020 20:18
api: 'https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels'
description: |
Replace all existing Access Levels in an Access Policy with the Access Levels provided. This is done atomically.
The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this information matter to terraform users?

api: 'https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters'
description: |
Replace all existing Service Perimeters in an Access Policy with the Service Perimeters provided. This is done atomically.
The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

'Access Policy Quickstart': 'https://cloud.google.com/access-context-manager/docs/quickstart'
api: 'https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels'
description: |
Replace all existing Access Levels in an Access Policy with the Access Levels provided. This is done atomically.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a note here on this resource fighting with access_level, similar to the IAM member/binding/policy notes?

A list of GCP resources that are inside of the service perimeter.
Currently only projects are allowed.
Format: projects/{project_number}
# at_least_one_of:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these commented out because of nesting issues? I'd say either remove entirely or put a note on why

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 9 files changed, 2886 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 9 files changed, 2886 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 2 files changed, 755 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=139915"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDNSKeys_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccDataSourceGoogleComputeInstanceGroup_fromIGM|TestAccAccessApprovalFolderSettings_update|TestAccAccessApprovalProjectSettings_update|TestAccAccessApprovalOrganizationSettings_update|TestAccBigQueryJob_bigqueryJobQueryExample|TestAccBigQueryJob_bigqueryJobQueryTableReferenceExample|TestAccComputeAutoscaler_update|TestAccComputeAutoscaler_multicondition|TestAccComputeBackendService_internalLoadBalancing|TestAccComputeRegionAutoscaler_update|TestAccContainerCluster_withInvalidReleaseChannel|TestAccDNSManagedZone_update|TestAccDNSManagedZone_dnssec_update|TestAccDNSManagedZone_dnssec_empty|TestAccDNSManagedZone_importWithProject|TestAccDNSRecordSet_basic|TestAccDNSRecordSet_modify|TestAccDNSRecordSet_changeType|TestAccDNSRecordSet_ns|TestAccDNSRecordSet_nestedNS|TestAccDNSRecordSet_quotedTXT|TestAccDNSRecordSet_uppercaseMX|TestAccServiceAccountKey_fromCertificate You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=139916"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resources for access_levels and service_perimeters (plural)
4 participants