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

New Resource: 'azurerm_storage_account_customer_managed_key' to enable storage account encryption using key vault customer-managed keys #5668

Merged
merged 26 commits into from
Feb 24, 2020

Conversation

WodansSon
Copy link
Collaborator

@WodansSon WodansSon commented Feb 10, 2020

Port of PR #2046 to new code base.

Updated:

Since storage accounts are always encrypted by default and the API will now throw an error if you try to set the file or blob arguments to false. I have removed them from the resource, which is also why I changed the name of the resource, because encryption settings no longer made sense.

NOTE: Travis CI checks are failing due to #5344 has not been merged to master as of yet.

Fixes #658
Fixes #3820

@WodansSon WodansSon changed the title [WIP] New Resource: 'azurerm_storage_account_encryption_settings' to enable storage account encryption using key vault customer-managed keys [WIP] New Resource: 'azurerm_storage_account_customer_managed_key' to enable storage account encryption using key vault customer-managed keys Feb 13, 2020
@WodansSon WodansSon changed the title [WIP] New Resource: 'azurerm_storage_account_customer_managed_key' to enable storage account encryption using key vault customer-managed keys New Resource: 'azurerm_storage_account_customer_managed_key' to enable storage account encryption using key vault customer-managed keys Feb 14, 2020
@ghost ghost added size/XL and removed size/XXL labels Feb 21, 2020
@ghost ghost added size/XXL and removed size/XL labels Feb 22, 2020
@tombuildsstuff tombuildsstuff self-assigned this Feb 23, 2020
@tombuildsstuff tombuildsstuff removed the request for review from katbyte February 23, 2020 18:00
```
$ TF_ACC=1 go test -v ./azurerm/internal/services/storage/tests/ -timeout=60m -run=TestAccAzureRMStorageAccountCustomerManagedKey
=== RUN   TestAccAzureRMStorageAccountCustomerManagedKey_basic
=== PAUSE TestAccAzureRMStorageAccountCustomerManagedKey_basic
=== RUN   TestAccAzureRMStorageAccountCustomerManagedKey_requiresImport
=== PAUSE TestAccAzureRMStorageAccountCustomerManagedKey_requiresImport
=== RUN   TestAccAzureRMStorageAccountCustomerManagedKey_updateKey
=== PAUSE TestAccAzureRMStorageAccountCustomerManagedKey_updateKey
=== CONT  TestAccAzureRMStorageAccountCustomerManagedKey_basic
=== CONT  TestAccAzureRMStorageAccountCustomerManagedKey_updateKey
=== CONT  TestAccAzureRMStorageAccountCustomerManagedKey_requiresImport
--- PASS: TestAccAzureRMStorageAccountCustomerManagedKey_requiresImport (381.82s)
--- PASS: TestAccAzureRMStorageAccountCustomerManagedKey_updateKey (410.36s)
--- PASS: TestAccAzureRMStorageAccountCustomerManagedKey_basic (507.32s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/tests	507.376s
```
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @WodansSon

Thanks for this PR :)

Taking a look through this is looking good - I've left some comments inline which I'm going to push a few commits for to fix - but this otherwise LGTM 👍

Thanks!

@tombuildsstuff
Copy link
Contributor

Ignoring a couple of transitive issues in the API the tests pass:

Screenshot 2020-02-23 at 23 09 47

tombuildsstuff added a commit that referenced this pull request Feb 24, 2020
@tombuildsstuff tombuildsstuff merged commit 66378cc into master Feb 24, 2020
@tombuildsstuff tombuildsstuff deleted the nr_storage_account_cmk branch February 24, 2020 06:54
@ghost
Copy link

ghost commented Feb 24, 2020

This has been released in version 2.0.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.0.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants