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

feat(vertexai): Add IAM resources for Vertex AI Endpoint #9454

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

shotarok
Copy link
Contributor

@shotarok shotarok commented Nov 11, 2023

fixes hashicorp/terraform-provider-google#14630
relates to #7965
relates to hashicorp/terraform-provider-google#16478

Release Note Template for Downstream PRs (will be copied)

vertexai: Added IAM resources for google_vertex_ai_endpoint (beta)

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will require approval to run.

@c2thorn, 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 awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Nov 11, 2023
@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.

Terraform GA: Diff ( 4 files changed, 221 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 828 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 374 insertions(+))

Missing test report

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

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

resource "google_vertex_ai_endpoint_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_vertex_ai_endpoint_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3227
Passed tests 2894
Skipped tests: 329
Affected tests: 4

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
TestAccSpannerDatabaseIamPolicy|TestAccVertexAIEndpointIamMemberGenerated|TestAccVertexAIEndpointIamBindingGenerated|TestAccVertexAIEndpointIamPolicyGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccSpannerDatabaseIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccVertexAIEndpointIamMemberGenerated[Error message] [Debug log]
TestAccVertexAIEndpointIamBindingGenerated[Error message] [Debug log]
TestAccVertexAIEndpointIamPolicyGenerated[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@c2thorn
Copy link
Member

c2thorn commented Nov 13, 2023

    Error: Import id "tf-test-endpoint-namerj9acusjjt" doesn't match any of the accepted formats: [projects/(?P<project>[^/]+)/locations/(?P<location>[^/]+)/endpoints/(?P<endpoint>[^/]+) (?P<project>[^/]+)/(?P<location>[^/]+)/(?P<endpoint>[^/]+) (?P<location>[^/]+)/(?P<endpoint>[^/]+)]

@shotarok
Copy link
Contributor Author

Thanks for putting the error message as a comment. I saw a similar error when I ran a test locally, and I thought defining ImportStateId would have solved the error. Will check.

@c2thorn c2thorn requested review from a team and trodge and removed request for c2thorn and a team November 15, 2023 13:23
@c2thorn
Copy link
Member

c2thorn commented Nov 15, 2023

Will be OOO for a while, reassigning a random reviewer to carry this forward once ready.

@shotarok
Copy link
Contributor Author

shotarok commented Nov 15, 2023

I overlooked a change I made locally. I added the update in 41ef139.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 15, 2023
@shotarok
Copy link
Contributor Author

@trodge If this PR looks good, could you approve the cloud builder job?

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 16, 2023
@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.

Terraform GA: Diff ( 4 files changed, 222 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 829 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 374 insertions(+))

Missing test report

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

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

resource "google_vertex_ai_endpoint_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_vertex_ai_endpoint_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3235
Passed tests 2901
Skipped tests: 330
Affected tests: 4

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
TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccVertexAIEndpointIamPolicyGenerated|TestAccVertexAIEndpointIamMemberGenerated|TestAccVertexAIEndpointIamBindingGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataSourceGoogleServiceAccountIdToken_impersonation[Debug log]
TestAccVertexAIEndpointIamPolicyGenerated[Debug log]
TestAccVertexAIEndpointIamMemberGenerated[Debug log]
TestAccVertexAIEndpointIamBindingGenerated[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

Copy link
Contributor

@trodge trodge left a comment

Choose a reason for hiding this comment

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

Found a couple nits after approving.

@@ -0,0 +1,3 @@
project = google_vertex_ai_endpoint.endpoint.project
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: these lines should be indented with two spaces so that they fit in the documentation and generated test.

"github.com/hashicorp/terraform-provider-google/google/envvar"
)

func TestAccVertexAIEndpointIamBindingGenerated(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func TestAccVertexAIEndpointIamBindingGenerated(t *testing.T) {
func TestAccVertexAIEndpointIamBinding(t *testing.T) {

This test can be renamed since it is not being generated by building mmv1.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 16, 2023
@shotarok
Copy link
Contributor Author

@trodge Hello 👋 Thank you for your reviews! I pushed the updates. Could you approve the cloud builder job again?

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 16, 2023
@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.

Terraform GA: Diff ( 4 files changed, 222 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 829 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 374 insertions(+))

Missing test report

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

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

resource "google_vertex_ai_endpoint_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_vertex_ai_endpoint_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3235
Passed tests 2902
Skipped tests: 330
Affected tests: 3

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
TestAccVertexAIEndpointIamPolicy|TestAccVertexAIEndpointIamMember|TestAccVertexAIEndpointIamBinding

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccVertexAIEndpointIamPolicy[Debug log]
TestAccVertexAIEndpointIamMember[Debug log]
TestAccVertexAIEndpointIamBinding[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@trodge trodge merged commit 6b15a46 into GoogleCloudPlatform:main Nov 17, 2023
6 checks passed
davcen pushed a commit to davcen/gcp-magic-modules that referenced this pull request Nov 17, 2023
…Platform#9454)

* feat(vertexai): iam resources for vertex ai prediction

* fix: update the import format

* refactor: add two spaces for docs

* refactor: remove the suffix 'generated' from the hand-written tests
@shotarok shotarok deleted the vertex-ai-index-iam branch November 20, 2023 21:27
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 28, 2023
…Platform#9454)

* feat(vertexai): iam resources for vertex ai prediction

* fix: update the import format

* refactor: add two spaces for docs

* refactor: remove the suffix 'generated' from the hand-written tests
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this pull request Nov 29, 2023
…Platform#9454)

* feat(vertexai): iam resources for vertex ai prediction

* fix: update the import format

* refactor: add two spaces for docs

* refactor: remove the suffix 'generated' from the hand-written tests
trodge pushed a commit to trodge/magic-modules that referenced this pull request Dec 8, 2023
…Platform#9454)

* feat(vertexai): iam resources for vertex ai prediction

* fix: update the import format

* refactor: add two spaces for docs

* refactor: remove the suffix 'generated' from the hand-written tests
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.

Add IAM resources for Vertex AI Endpoints
4 participants