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

Add support for Context Aware Access UserAccessBinding resource #4368

Merged
merged 14 commits into from
Jan 11, 2021

Conversation

melinath
Copy link
Member

@melinath melinath commented Jan 5, 2021

Resolved hashicorp/terraform-provider-google#7501

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).
    ^ --- I'm not able to run acceptance tests (TestAccAccessContextManager) locally because they require a CUST_ID. However, you can see the results in the teamcity tests.
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

accesscontextmanager: Added support for `google_access_context_manager_gcp_user_access_binding`

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 17 files changed, 736 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 17 files changed, 736 insertions(+), 13 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165428"

@melinath
Copy link
Member Author

melinath commented Jan 5, 2021

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 17 files changed, 736 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 17 files changed, 736 insertions(+), 13 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165460"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock|TestAccDataprocJob_Spark You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165464"

@melinath
Copy link
Member Author

melinath commented Jan 6, 2021

Ran into some issues with this prior to break.

So, looking at the test output now, it turns out that a lot of the operations (Group, AccessPolicy, AccessLevel) come back done right away, and have similar structures to the GcpUserAccessBinding response. The difference is that they all have custom code for extracting the actual id from the response and setting it locally prior to read. I think that's what I probably need to do as well, rather than trying to find a bug in the core functionality.

@melinath
Copy link
Member Author

melinath commented Jan 6, 2021

Looking at this more, yes, I could handle it with custom code. But I think there is a bug in createAccessContextManagerWaiter - the operation returned apparently doesn't need to have a name.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 811 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 39 files changed, 842 insertions(+), 56 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165625"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 811 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 38 files changed, 841 insertions(+), 55 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165628"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock|TestAccDataprocJob_Spark You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165640"

@melinath
Copy link
Member Author

melinath commented Jan 6, 2021

It looks like the change to detect operations via metadata did the trick - name is now properly extracted. ... but it's still failing.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 807 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 38 files changed, 837 insertions(+), 55 deletions(-))

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 798 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 39 files changed, 829 insertions(+), 56 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165836"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_name|TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165838"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 798 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 38 files changed, 828 insertions(+), 55 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165839"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_name|TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock|TestAccDataprocJob_Spark You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165853"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 802 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 38 files changed, 832 insertions(+), 55 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165862"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock|TestAccDataprocJob_Spark You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=165872"

@melinath
Copy link
Member Author

melinath commented Jan 8, 2021

/gcbrun

Follows pattern of UptimeCheckConfig and others.
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 790 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 38 files changed, 820 insertions(+), 55 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166038"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock|TestAccDataprocJob_Spark You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166044"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 32 files changed, 795 insertions(+), 43 deletions(-))
Terraform Beta: Diff ( 38 files changed, 825 insertions(+), 55 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166060"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccDataSourceGoogleSubnetwork|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccAccessContextManager|TestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock|TestAccDataprocJob_Spark You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166065"

@melinath melinath requested review from a team and rileykarson and removed request for a team January 11, 2021 19:43
@melinath
Copy link
Member Author

At long last, the new tests are passing :-)

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

Successfully merging this pull request may close these issues.

AccessContextManager Context Aware Access UserAccessBinding resource
3 participants