Skip to content

Support policy version 3 in google_spanner_database_iam_member and google_spanner_instance_iam_member#6915

Merged
slevenick merged 5 commits intoGoogleCloudPlatform:mainfrom
rahul2393:support-policy-version-3
Jan 24, 2023
Merged

Support policy version 3 in google_spanner_database_iam_member and google_spanner_instance_iam_member#6915
slevenick merged 5 commits intoGoogleCloudPlatform:mainfrom
rahul2393:support-policy-version-3

Conversation

@rahul2393
Copy link
Copy Markdown
Contributor

@rahul2393 rahul2393 commented Dec 6, 2022

Fixes hashicorp/terraform-provider-google#13060

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)

spanner: added support for IAM conditions with `google_spanner_database_iam_member` and `google_spanner_instance_iam_member`

@modular-magician
Copy link
Copy Markdown
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Copy Markdown
Collaborator

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

I've detected that you're a community contributor. @slevenick, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@rahul2393
Copy link
Copy Markdown
Contributor Author

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 8 insertions(+))
Terraform Beta: Diff ( 2 files changed, 8 insertions(+))
TF Validator: Diff ( 4 files changed, 11 insertions(+), 3 deletions(-))

1 similar comment
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 8 insertions(+))
Terraform Beta: Diff ( 2 files changed, 8 insertions(+))
TF Validator: Diff ( 4 files changed, 11 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2325
Passed tests 2075
Skipped tests: 244
Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerNodePool_withUpgradeSettings|TestAccLoggingBucketConfigProject_cmekSettings|TestAccSpannerDatabaseIamMember|TestAccSpannerDatabaseIamBinding|TestAccSpannerInstanceIamMember|TestAccSpannerInstanceIamBinding

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccContainerNodePool_withUpgradeSettings[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]
TestAccSpannerDatabaseIamMember[Debug log]
TestAccSpannerDatabaseIamBinding[Debug log]
TestAccSpannerInstanceIamMember[Debug log]
TestAccSpannerInstanceIamBinding[Debug log]

All tests passed
View the build log or the debug log for each test

Copy link
Copy Markdown
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Can you add a test that uses IAM conditions for spanner_instance & spanner_database tests?

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 8 insertions(+))
Terraform Beta: Diff ( 2 files changed, 8 insertions(+))
TF Validator: Diff ( 4 files changed, 11 insertions(+), 3 deletions(-))

@rahul2393
Copy link
Copy Markdown
Contributor Author

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 16 insertions(+))
Terraform Beta: Diff ( 4 files changed, 16 insertions(+))
TF Validator: Diff ( 4 files changed, 11 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2419
Passed tests 2164
Skipped tests: 252
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccLoggingBucketConfigProject_cmekSettings|TestAccSpannerInstanceIamMember|TestAccSpannerDatabaseIamMember

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]

Tests failed during RECORDING mode:
TestAccSpannerInstanceIamMember[Error message] [Debug log]
TestAccSpannerDatabaseIamMember[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 22 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 4 files changed, 22 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 17 insertions(+), 5 deletions(-))

@rahul2393
Copy link
Copy Markdown
Contributor Author

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2419
Passed tests 2159
Skipped tests: 252
Failed tests: 8

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccSpannerInstanceIamPolicy|TestAccSpannerInstanceIamMember|TestAccSpannerInstanceIamBinding|TestAccSpannerDatabaseIamPolicy|TestAccSpannerDatabaseIamMember|TestAccSpannerDatabaseIamBinding|TestAccRegionInstanceGroupManager_stateful

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccSpannerInstanceIamPolicy[Debug log]
TestAccSpannerInstanceIamBinding[Debug log]
TestAccSpannerDatabaseIamPolicy[Debug log]
TestAccSpannerDatabaseIamBinding[Debug log]

Tests failed during RECORDING mode:
TestAccSpannerInstanceIamMember[Error message] [Debug log]
TestAccSpannerDatabaseIamMember[Error message] [Debug log]
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@slevenick
Copy link
Copy Markdown
Contributor

Looks like the tests are failing due to these changes. Are you able to run them locally?

@rahul2393
Copy link
Copy Markdown
Contributor Author

rahul2393 commented Jan 17, 2023

I tested on local by building provider and running it, its working fine, but I am not able to figure out why tests are failing

@rahul2393
Copy link
Copy Markdown
Contributor Author

@slevenick please help if you are able to figure out issue

@slevenick
Copy link
Copy Markdown
Contributor

=== CONT TestAccSpannerInstanceIamMember
provider_test.go:315: Step 2/2 error running import: exit status 1

    Error: Cannot find binding for "Spanner Instance: project/tf-test-t0goukwv8s" with role "roles/spanner.databaseAdmin", member "serviceAccount:tf-test-5491200468017463976@project.iam.gserviceaccount.com", and condition title ""

--- FAIL: TestAccSpannerInstanceIamMember (29.40s)
FAIL

@slevenick
Copy link
Copy Markdown
Contributor

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 22 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 4 files changed, 22 insertions(+), 2 deletions(-))
TF Validator: Diff ( 4 files changed, 17 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2420
Passed tests 2165
Skipped tests: 252
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSpannerInstanceIamMember|TestAccSpannerDatabaseIamMember|TestAccFirebaserulesRelease_BasicRelease

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccSpannerInstanceIamMember[Error message] [Debug log]
TestAccSpannerDatabaseIamMember[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@rahul2393
Copy link
Copy Markdown
Contributor Author

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 28 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 4 files changed, 28 insertions(+), 6 deletions(-))
TF Validator: Diff ( 4 files changed, 17 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2423
Passed tests 2164
Skipped tests: 252
Failed tests: 7

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComposerEnvironment_UpdateComposerV2|TestAccComposerEnvironment_UpdateComposerV2WithTriggerer|TestAccComposerEnvironment_ComposerV2|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccSpannerDatabaseIamMember|TestAccSpannerInstanceIamMember

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComposerEnvironment_ComposerV2[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccSpannerDatabaseIamMember[Debug log]
TestAccSpannerInstanceIamMember[Debug log]

Tests failed during RECORDING mode:
TestAccComposerEnvironment_UpdateComposerV2[Error message] [Debug log]
TestAccComposerEnvironment_UpdateComposerV2WithTriggerer[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@rahul2393
Copy link
Copy Markdown
Contributor Author

/gcbrun

@rahul2393
Copy link
Copy Markdown
Contributor Author

@slevenick I have fixed the tests modified in this PR, unrelated tests failed in the last run I suspect they are flacky, can you help re-trigger tests?

@rahul2393
Copy link
Copy Markdown
Contributor Author

/gcbrun

1 similar comment
@melinath
Copy link
Copy Markdown
Member

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 28 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 4 files changed, 28 insertions(+), 6 deletions(-))
TF Validator: Diff ( 4 files changed, 17 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2423
Passed tests 2168
Skipped tests: 253
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComposerEnvironment_ComposerV2|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccComposerEnvironment_ComposerV2[Debug log]

Tests failed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Copy Markdown
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Thanks! Just updated the changelog note to refer to adding conditions which is the actual change a user would see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spanner IAM Conditions on Instance / Database

4 participants