-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Added new resource azurerm_mssql_managed_instance_transparent_data_encryption
, azurerm_mssql_managed_instance
changes.
#18918
Added new resource azurerm_mssql_managed_instance_transparent_data_encryption
, azurerm_mssql_managed_instance
changes.
#18918
Conversation
That is almost a copy-paste from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are getting a bunch of test failures for this resource:
Error: waiting for creation of Managed Instance: (Name "acctestsqlserver221102190109220892" / Resource Group "acctestRG1-sql-221102190109220892"): Code="Failed" Message="The async operation failed." AdditionalInfo=[{"id":"/subscriptions/*******/resourceGroups/acctestRG1-sql-221102190109220892/providers/Microsoft.Sql/managedInstances/acctestsqlserver221102190109220892","identity":{"type":"UserAssigned","userAssignedIdentities":{}},"location":"westeurope","name":"acctestsqlserver221102190109220892","properties":{"administratorLogin":"missadministrator","collation":"SQL_Latin1_General_CP1_CI_AS","licenseType":"BasePrice","maintenanceConfigurationId":"/subscriptions/*******/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default","minimalTlsVersion":"1.2","privateEndpointConnections":[],"provisioningState":"Failed","proxyOverride":"Default","publicDataEndpointEnabled":false,"state":"CreationFailed","storageAccountType":"GRS","storageSizeInGB":32,"subnetId":"/subscriptions/*******/resourceGroups/acctestRG1-sql-221102190109220892/providers/Microsoft.Network/virtualNetworks/acctest-vnet1-221102190109220892/subnets/subnet1-221102190109220892","timezoneId":"UTC","vCores":4,"zoneRedundant":false},"sku":{"capacity":4,"family":"Gen5","name":"GP_Gen5","tier":"GeneralPurpose"},"tags":{"database":"test","environment":"staging"},"type":"Microsoft.Sql/managedInstances"}]
however i'm not sure if its these changes or something on the service side :/
Should not be related to my changes. I was not touching server resource. But usually creation of the SQL MI takes 5 hours each (plus up to 2 hours for removing it). I will fix conflicts and also include latest changes for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @dkuzmenok! The test failures seem unrelated to these changes. I made some documentation tweaks but this otherwise LGTM 🧢
website/docs/r/mssql_managed_instance_transparent_data_encryption.html.markdown
Show resolved
Hide resolved
website/docs/r/mssql_managed_instance_transparent_data_encryption.html.markdown
Show resolved
Hide resolved
website/docs/r/mssql_managed_instance_transparent_data_encryption.html.markdown
Show resolved
Hide resolved
website/docs/r/mssql_managed_instance_transparent_data_encryption.html.markdown
Show resolved
Hide resolved
…ncryption` for managing TDE in SQL managed instance. Added `customer_managed_key` in `azurerm_mssql_managed_instance` data source. Added support for UserAssigned identities into `azurerm_mssql_managed_instance` resource and data source.
e174862
to
1039c32
Compare
@manicminer Thanks for your review! I want to include a smaller change to include |
@dkuzmenok Sounds good, if you want to go ahead and add that in then I'll re-run the acceptance tests. Thanks! |
@manicminer Coming late, sorry. I've pushed my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @dkuzmenok! Just waiting on the tests to finish before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkuzmenok Looks like we have a test failure if you can take a look?
------- Stdout: -------
=== RUN TestAccMsSqlManagedInstanceTransparentDataEncryption_autoRotate
=== PAUSE TestAccMsSqlManagedInstanceTransparentDataEncryption_autoRotate
=== CONT TestAccMsSqlManagedInstanceTransparentDataEncryption_autoRotate
testcase.go:110: Step 1/2 error: Check failed: Check 2/2 error: azurerm_mssql_managed_instance_transparent_data_encryption.test: Attribute 'key_vault_key_id' expected "", got "https://acctestsqlserver06746.vault.azure.net/keys/keyVault/331f19d5415e46839a960ea1594e009f
--- FAIL: TestAccMsSqlManagedInstanceTransparentDataEncryption_autoRotate (19673.48s)
FAIL
@manicminer I have pushed a change with a fix for the test. Was able to test in on new subscription:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkuzmenok Thanks for the changes, this LGTM, we are just having some trouble with test timeouts (instances taking >12hrs to create/destroy) but hopefully this will pass today and we can merge this 😬
@manicminer On my subscription I've had SQL MI hanged, so had to create a support request to remove them (was not able to remove for about a month)... |
@manicminer Are there any news with the testing progress? Are we good? |
@dkuzmenok We continue to have problems testing this resource. However, between the test runs, there has been enough coverage by passing tests (both before and after the addition of auto rotation) that I'm satisfied to merge this. |
This functionality has been released in v3.33.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! |
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. |
Description
There is no existing way to define Transparent Data Encryption for SQL Managed Instance.
UserAssigned
identities are not allowed inazurerm_mssql_managed_instance
resources.Issues:
Changes
azurerm_mssql_managed_instance_transparent_data_encryption
that controls usage of KeyVault Key over SQL Managed Instance.customer_managed_key
field toazurerm_mssql_managed_instance
data source to include KeyVault Key information.UserAssigned
identity intoazurerm_mssql_managed_instance
resource and data source.Tests