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

Synapse Workspace Activation with CMK #13179

Merged
merged 4 commits into from
Sep 16, 2021

Conversation

MoAhuja
Copy link
Contributor

@MoAhuja MoAhuja commented Aug 30, 2021

Fixes: #12348

  • Added new synapse_workspace_key resource type to support activation of a workspace encryption key
  • Updated synapse_workspace to support naming of the CMK. Currently implementation defaults to "cmk" which makes it challenging to rotate encryption keys.

@MoAhuja MoAhuja force-pushed the feature/synapse_activate_workspace branch from 729710d to 72c2e93 Compare August 30, 2021 18:59
@MoAhuja MoAhuja marked this pull request as ready for review August 30, 2021 19:17
@MoAhuja MoAhuja changed the title Feature/synapse activate workspace Synapse Workspace Activation with CMK Aug 31, 2021
@katbyte katbyte added this to the v2.75.0 milestone Aug 31, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks for the pr @MoAhuja - looks like we have some test failures to fix:

------- Stdout: -------
=== RUN   TestAccSynapseWorkspace_azdo
=== PAUSE TestAccSynapseWorkspace_azdo
=== CONT  TestAccSynapseWorkspace_azdo
    testcase.go:88: Step 1/1 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # azurerm_synapse_workspace.test will be updated in-place
          ~ resource "azurerm_synapse_workspace" "test" {
              + customer_managed_key_name            = "cmk"
                id                                   = "/subscriptions/*******/resourceGroups/acctestRG-synapse-210831222712997048/providers/Microsoft.Synapse/workspaces/acctestsw210831222712997048"
                name                                 = "acctestsw210831222712997048"
                # (11 unchanged attributes hidden)
        
                # (1 unchanged block hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccSynapseWorkspace_azdo (741.82s)
FAIL

@MoAhuja
Copy link
Contributor Author

MoAhuja commented Sep 10, 2021

@katbyte Thanks for the review. I've modified the synapse_workspace resource's property structure to bundle up key_name and key_versionless_id into a new type. This seemed like the only way to support a model where key_name could be optional and defaulted to "cmk" while making sure it's only ever used if key_versionless_id is set.

Called this out here because this is breaking change from the previous version of the synapse workspace resource type and I'm not sure how those typically get handled as part of provider releases.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @MoAhuja - LGTM 🏗️

@MoAhuja MoAhuja force-pushed the feature/synapse_activate_workspace branch from 54ddc77 to 83ea742 Compare September 16, 2021 14:38
@katbyte katbyte merged commit 816d97b into hashicorp:main Sep 16, 2021
@github-actions
Copy link

This functionality has been released in v2.77.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error received while trying to create a synapse workspace using customer_managed_key_versionless_id property.
2 participants