Skip to content

Add support for extra attributes oauth2 client #12721

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

Conversation

omkark-google
Copy link
Contributor

@omkark-google omkark-google commented Jan 9, 2025

Add support for extra attributes oauth2 client fields to create workforce pool operation for SAML protocol. This address the gap between newly added support in Gcloud command of iam create workforce pool provider and iam update workforce pool provider.

Fixes hashicorp/terraform-provider-google#20862

iam: added `extra_attributes_oauth2_client` field to `google_iam_workforce_pool_provider` resource

@github-actions github-actions bot requested a review from ScottSuarez January 9, 2025 19:29
Copy link

github-actions bot commented Jan 9, 2025

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@ScottSuarez, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 9, 2025
@ScottSuarez
Copy link
Contributor

hashicorp/terraform-provider-google#20862

Omkark, could you register internally so CI can run without manual approval.
go/terraform-contribution-guide#before-you-begin

Also, the release note seems incorrect as no new field is being added. It seems only tests are being added for existing behavior.

@omkark-google omkark-google force-pushed the extra-attributes-saml-support branch 2 times, most recently from a8ae85a to 718f926 Compare January 11, 2025 18:25
@modular-magician modular-magician added service/iam-workforce and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 11, 2025
@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 263 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 4 files changed, 263 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 11
Skipped tests: 0
Affected tests: 4

Click here to see the affected service packages
  • iamworkforcepool

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccIAMWorkforcePoolWorkforcePoolOidcProvider_extraAttributesOauth2Client
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccIAMWorkforcePoolWorkforcePoolOidcProvider_extraAttributesOauth2Client [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample [Error message] [Debug log]
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample [Error message] [Debug log]
TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@omkark-google omkark-google force-pushed the extra-attributes-saml-support branch from 718f926 to c8eea85 Compare January 11, 2025 18:58
@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 265 insertions(+), 13 deletions(-))
google-beta provider: Diff ( 4 files changed, 265 insertions(+), 13 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 12
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • iamworkforcepool

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample [Error message] [Debug log]
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample [Error message] [Debug log]
TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@omkark-google omkark-google force-pushed the extra-attributes-saml-support branch from c8eea85 to dae1ac4 Compare January 11, 2025 19:31
@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 266 insertions(+), 14 deletions(-))
google-beta provider: Diff ( 4 files changed, 266 insertions(+), 14 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 12
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • iamworkforcepool

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample [Error message] [Debug log]
TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@ScottSuarez This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

Looks like the tests are failing with

        Error: Error creating WorkforcePoolProvider: googleapi: Error 400: Invalid Extra Attributes OAuth2 Client Config. ExtraAttributesOAuth2Client field is only supported for OIDC provider.
        
          with google_iam_workforce_pool_provider.example,
          on terraform_plugin_test.tf line 8, in resource "google_iam_workforce_pool_provider" "example":
           8: resource "google_iam_workforce_pool_provider" "example" {

@omkark-google omkark-google force-pushed the extra-attributes-saml-support branch from dae1ac4 to 33b9d3d Compare January 23, 2025 00:48
@github-actions github-actions bot requested a review from ScottSuarez January 23, 2025 00:49
@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 266 insertions(+), 14 deletions(-))
google-beta provider: Diff ( 4 files changed, 266 insertions(+), 14 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 12
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • iamworkforcepool

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderSamlFullExample
  • TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccIAMWorkforcePoolWorkforcePoolProvider_iamWorkforcePoolProviderOidcFullExample [Debug log]
TestAccIAMWorkforcePoolWorkforcePoolSamlProvider_extraAttributesOauth2Client [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


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

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@omkark-google omkark-google force-pushed the extra-attributes-saml-support branch 2 times, most recently from fab3f83 to 27d3134 Compare January 23, 2025 01:23
@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 268 insertions(+), 16 deletions(-))
google-beta provider: Diff ( 4 files changed, 268 insertions(+), 16 deletions(-))

1 similar comment
@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 268 insertions(+), 16 deletions(-))
google-beta provider: Diff ( 4 files changed, 268 insertions(+), 16 deletions(-))

@omkark-google omkark-google marked this pull request as ready for review February 13, 2025 21:59
@omkark-google
Copy link
Contributor Author

Hi @ScottSuarez This CL is ready for submission

@ScottSuarez
Copy link
Contributor

could you pull latest changes from main? @omkark-google

@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 269 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 4 files changed, 269 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 15
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • iamworkforcepool

🟢 All tests passed!

View the build log

@omkark-google omkark-google force-pushed the extra-attributes-saml-support branch from afd7dd7 to ed4437f Compare February 14, 2025 18:26
@ScottSuarez
Copy link
Contributor

looks like there is a broken tgc test on main

@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 269 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 4 files changed, 269 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 15
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • iamworkforcepool

🟢 All tests passed!

View the build log

@modular-magician
Copy link
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.

google provider: Diff ( 4 files changed, 269 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 4 files changed, 269 insertions(+), 17 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 15
Passed tests: 15
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • iamworkforcepool

🟢 All tests passed!

View the build log

@omkark-google
Copy link
Contributor Author

@ScottSuarez

looks like there is a broken tgc test on main

Is there any work around to get this PR merged ?
We have a launch next week and this PR should go in the next weeks rollout

@ScottSuarez
Copy link
Contributor

yeah I can merge with the check failing for now. This won't be released until the following monday due to the release schedule of the provider. go/terraform-releases

@ScottSuarez ScottSuarez disabled auto-merge February 14, 2025 19:27
@ScottSuarez ScottSuarez added this pull request to the merge queue Feb 14, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 9d2cc39 Feb 14, 2025
20 of 22 checks passed
@omkark-google
Copy link
Contributor Author

Yeah release on 24th Feb should be fine

andre-sampaio pushed a commit to andre-sampaio/magic-modules that referenced this pull request Feb 14, 2025
…2721) (#21430)

[upstream:9d2cc39d0d68ac686996de0bc9a2f039ea62815e]

Signed-off-by: Modular Magician <[email protected]>
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Feb 17, 2025
JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 25, 2025
JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 30, 2025
Dawid212 pushed a commit to Dawid212/magic-modules that referenced this pull request Apr 9, 2025
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 ExtraAttributesOauthClient field for google_iam_workforce_pool_provider resource
3 participants