Skip to content

Do client-side blocking for group operations with an operation id in response#1260

Merged
ncabatoff merged 6 commits intomainfrom
nc/HCPIE-2561/group-client-blocking
Apr 23, 2025
Merged

Do client-side blocking for group operations with an operation id in response#1260
ncabatoff merged 6 commits intomainfrom
nc/HCPIE-2561/group-client-blocking

Conversation

@ncabatoff
Copy link
Copy Markdown
Contributor

@ncabatoff ncabatoff commented Apr 22, 2025

🛠️ Description

🏗️ Acceptance tests

I did not run the acceptance tests, but it seems that CI does now. Maybe this PR template is out of date?

I tested locally by first creating an hcp group, then changing its display_name so that an update was made, then defining group members, as in:

resource "hcp_group" "example" {
  display_name = "group17"
}

data "hcp_user_principal" "me" {
  email = "nick.cabatoff@gmail.com"
}

resource "hcp_group_members" "test" {
  group = hcp_group.example.resource_name
  members = [data.hcp_user_principal.me.user_id]
}

Finally I deleted the group. For each test I looked at DD to confirm that after the response from cloud-iam, Wait requests were issued to cloud-operation for the returned operationID.

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@ncabatoff ncabatoff marked this pull request as ready for review April 22, 2025 19:42
@ncabatoff ncabatoff requested review from a team as code owners April 22, 2025 19:42
Comment on lines +32 to +36
if loc.ProjectID == "" {
waitParams.LocationProjectID = "-"
} else {
waitParams.LocationProjectID = loc.ProjectID
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: save an else by defaulting to "-" and setting when non ""

@ncabatoff ncabatoff merged commit 3020425 into main Apr 23, 2025
8 checks passed
@ncabatoff ncabatoff deleted the nc/HCPIE-2561/group-client-blocking branch April 23, 2025 20:01
yuriikomarss pushed a commit to cargurus/terraform-provider-hcp that referenced this pull request Apr 29, 2025
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.

3 participants