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

Fix identity type comparison for service perimeters #12267

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

coder-221
Copy link
Member

@coder-221 coder-221 commented Nov 6, 2024

Fixes hashicorp/terraform-provider-google/issues/17023. The API does not return the IDENTITY_TYPE_UNSPECIFIED enum value when it is set so we can treat that as an empty value.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

accesscontextmanager: fixed comparison of `identity_type` in `ingress_from` and `egress_from` when the `IDENTITY_TYPE_UNSPECIFIED` is set

@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 ( 6 files changed, 176 insertions(+), 28 deletions(-))
google-beta provider: Diff ( 6 files changed, 176 insertions(+), 28 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 53 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_access_context_manager_service_perimeter_dry_run_egress_policy (0 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_access_context_manager_service_perimeter_dry_run_egress_policy" "primary" {
  egress_from {
    identity_type = # value needed
  }
}

Resource: google_access_context_manager_service_perimeter_dry_run_ingress_policy (0 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_access_context_manager_service_perimeter_dry_run_ingress_policy" "primary" {
  ingress_from {
    identity_type = # value needed
  }
}

Resource: google_access_context_manager_service_perimeter_egress_policy (0 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_access_context_manager_service_perimeter_egress_policy" "primary" {
  egress_from {
    identity_type = # value needed
  }
}

Resource: google_access_context_manager_service_perimeter_ingress_policy (0 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_access_context_manager_service_perimeter_ingress_policy" "primary" {
  ingress_from {
    identity_type = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4
Passed tests: 1
Skipped tests: 3
Affected tests: 0

Click here to see the affected service packages
  • accesscontextmanager

🟢 All tests passed!

View the build log

@coder-221 coder-221 marked this pull request as ready for review November 6, 2024 23:24
@github-actions github-actions bot requested a review from slevenick November 6, 2024 23:25
Copy link

github-actions bot commented Nov 6, 2024

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

@slevenick, 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.

Copy link
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.

This is a good demonstration on why we shouldn't allow the _UNSPECIFIED enum value to be specified in Terraform!

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