[TF-27661] Add support for HYOK related attributes#1192
[TF-27661] Add support for HYOK related attributes#1192iuri-slywitch-hashicorp merged 30 commits intofeature/hyokfrom
Conversation
a74d35e to
444b4b4
Compare
Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com>
Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com>
Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com>
Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com>
Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com>
Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com>
SwiftEngineer
left a comment
There was a problem hiding this comment.
I only had one nit, other than that this looks great to me 👍
That being said, I would recommend waiting to merge this branch until we've implemented the terraform provider HYOK support, just to make sure it's got everything we need and to reduce the chances of us releasing a version of go-tfe with "broken" support for HYOK.
|
EDIT: Nevermind I see this was already added in a different PR! |
|
Setting up staging environment for testing: hyok-testing.sh |
c006283 to
eaf7215
Compare
Maed223
left a comment
There was a problem hiding this comment.
Code changes are looking good. We could probably better encapsulate the use skipHYOKIntegrationTests into a helper similar to skipUnlessBeta or skipUnlessEnterprise for example, but that's non-blocking.
|
Unsure what's the Lint error, would appreciate if anyone knows the reason? |
|
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
* initial attribute changes, wip * Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Update workspace.go Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Add support for Customer Key Version and Encrypted Data Keys (#1203) Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * Updating attributes. * Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Add support for Customer Key Version and Encrypted Data Keys (#1203) Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * Updating agent_pool. Added test case. * Updated agent pool integration test file. * Revert commented section. * Updating organization. WIP organization_integration_test. * Updated organization integration test. * Updating attributes. Updating test cases. * Added workspace integration test cases * Updated test cases. * Updated state_version. Updated Read test cases. * Updated hyok tests. Added environment variables. * Updated errors.go * WIP StateVersion * Updated skipHYOKIntegrationTests if-statement. * Added hyok-testing.sh to scripts folder. Finished state_version testing and new functions. * Updated uploading test. * Added comments to UploadSanitizedState. * Updated hyok test cases. * Updating state_version_mocks.go. --------- Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> Co-authored-by: Helen Jiang <50344290+helenjw@users.noreply.github.com>
* Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Add support for Customer Key Version and Encrypted Data Keys (#1203) Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * [TF-27661] Add support for HYOK related attributes (#1192) * initial attribute changes, wip * Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Update workspace.go Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Add support for Customer Key Version and Encrypted Data Keys (#1203) Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * Updating attributes. * Add support for HYOK Configurations and OIDC Configurations (#1162) Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> * Add support for Customer Key Version and Encrypted Data Keys (#1203) Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> * Updating agent_pool. Added test case. * Updated agent pool integration test file. * Revert commented section. * Updating organization. WIP organization_integration_test. * Updated organization integration test. * Updating attributes. Updating test cases. * Added workspace integration test cases * Updated test cases. * Updated state_version. Updated Read test cases. * Updated hyok tests. Added environment variables. * Updated errors.go * WIP StateVersion * Updated skipHYOKIntegrationTests if-statement. * Added hyok-testing.sh to scripts folder. Finished state_version testing and new functions. * Updated uploading test. * Added comments to UploadSanitizedState. * Updated hyok test cases. * Updating state_version_mocks.go. --------- Co-authored-by: Helen Jiang <helen.jiang@hashicorp.com> Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> Co-authored-by: Helen Jiang <50344290+helenjw@users.noreply.github.com> * Update CHANGELOG.md * Remove UpdatedAt and RevokedAt fields from hyok_customer_key_version * added workplaces secured * renamed workplaces to workspaces... oops * Update agent_pool.go Co-authored-by: Sebastian Rivera <sebastian.rivera@hashicorp.com> * Moved valid function in aws_oidc_configuration.go * Removing "omitempty" from HYOKEncryptedDataKey relationships * Changed from "string" to "*string" in state_version.go and added url.PathEscape in request calls for hyok stuff. * Moving HYOK organization validation to helper_test.go * Updating mock file. --------- Co-authored-by: iuri-slywitch-hashicorp <170475063+iuri-slywitch-hashicorp@users.noreply.github.com> Co-authored-by: Jarrett Spiker <jarrett.spiker@hashicorp.com> Co-authored-by: Dominic Retli <dominic.retli@hashicorp.com> Co-authored-by: Sebastian Rivera <sebastian.rivera@hashicorp.com> Co-authored-by: Iuri Slywitch <iuri.slywitch@hashicorp.com>





Description
Add support for HYOK related attributes in existing go-tfe objects:
agent_poolrelated attributes:HYOKConfigurations: read only.organizationrelated attributes:EnforceHYOK: create, read, update.PrimaryHYOKConfiguration: read only.CanUpdateHYOKConfigurationadded in OrganizationPermissions.CanViewHYOKFeatureInfoadded in OrganizationPermissions.planrelated attributes:HYOKEncryptedDataKey: read only.SanitizedPlan: read only.state_versionrelated attributes:EncryptedStateDownloadURL: read only.SanitizedStateDownloadURL: read only.SanitizedStateUploadURL: read only.UploadSanitizedState(): function to upload sanitized state.HYOKEncryptedDataKey: read only.workspacerelated attributes:HYOKEnabled: create, read, update.HYOKEncryptedDataKey: read only.Testing plan
Test files ensure the attributes are populated when using the go-tfe objects.
External links
Output from tests
agent_pooltest cases:organizationtest cases:plantest cases:state_versiontest cases:workspacetest cases:Output hyok-testing.sh