-
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
azurerm_mssql_managed_instance
: support new property azure_active_directory_administrator
#24801
base: main
Are you sure you want to change the base?
azurerm_mssql_managed_instance
: support new property azure_active_directory_administrator
#24801
Conversation
2ed8741
to
8019c64
Compare
e90841b
to
d115c7e
Compare
azurerm_mssql_managed_instance
: support new property azuread_administrator
azurerm_mssql_managed_instance
: support new property microsoft_entra_administrator
cde2ae0
to
b612842
Compare
ValidateFunc: validation.StringIsNotEmpty, | ||
}, | ||
|
||
"microsoft_entra_administrator": { |
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.
Since the rest of the provider calls this azure_active_directory_administrator
, whilst this has been rebranded, for consistency with the rest of the provider for the moment we should continue calling this azure_active_directory_administrator
- we'll handle renaming all of these to microsoft_entra_administrator
at the same time (presumably in 4.0) - as such can we update this?
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.
Yes, the code has been updated. Could you please take another look?
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.
ty azure active directory also matches the API/SDK names
{ | ||
Config: r.template(data), | ||
}, |
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.
just want to check what the reason is for removing/changing this?
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.
Hi @catriona-m , thanks for your time. This is because TestAccMsSqlManagedInstanceActiveDirectoryAdministrator_basic
fails with the following error.
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 @sinbai. I notice we are getting a similar failure on another test, would it be within the scope of this PR to fix it too?
------- Stdout: -------
=== RUN TestAccMsSqlManagedInstanceFailoverGroup_update
=== PAUSE TestAccMsSqlManagedInstanceFailoverGroup_update
=== CONT TestAccMsSqlManagedInstanceFailoverGroup_update
testcase.go:173: Step 1/9 error: Pre-apply plan check(s) failed:
azurerm_mssql_managed_instance_failover_group.test - Resource not found in plan ResourceChanges
--- FAIL: TestAccMsSqlManagedInstanceFailoverGroup_update (21.08s)
FAIL
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 @sinbai. I notice we are getting a similar failure on another test, would it be within the scope of this PR to fix it too?
------- Stdout: ------- === RUN TestAccMsSqlManagedInstanceFailoverGroup_update === PAUSE TestAccMsSqlManagedInstanceFailoverGroup_update === CONT TestAccMsSqlManagedInstanceFailoverGroup_update testcase.go:173: Step 1/9 error: Pre-apply plan check(s) failed: azurerm_mssql_managed_instance_failover_group.test - Resource not found in plan ResourceChanges --- FAIL: TestAccMsSqlManagedInstanceFailoverGroup_update (21.08s) FAIL
Hi @catriona-m I have fixed the test. It passed on locally by setting env.ARM_TEST_LOCATION= Westeurope
and env.ARM_TEST_LOCATION_ALT = NorthEurope
. This means that ARM_TEST_LOCATION
and ARM_TEST_LOCATION_ALT
need to be paired regions. See the following Configuration requirements
from this document for more information.
Managed instances should be deployed to [paired regions](https://docs.azure.cn/en-us/availability-zones/cross-region-replication-azure) for performance reasons. Managed instances that reside in geo-paired regions benefit from a significantly higher geo-replication speed compared to unpaired regions.
Test result:
PASS: TestAccMsSqlManagedInstanceFailoverGroup_update (8437.15s)
92fbd12
to
08c3af2
Compare
08c3af2
to
0ed9f48
Compare
Support
azure_active_directory_administrator
property. Swagger: https://github.com/Azure/azure-rest-api-specs/blob/5e060c76edd4fab38e9202055062154006463018/specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/ManagedInstances.json#L669Corrected documentation issue that
zone_redundant_enabled
should be a property ofazurerm_mssql_managed_instance
instead ofazurerm_sql_managed_instance
.Test results:
https://hashicorp.teamcity.com/buildConfiguration/TF_AzureRM_AZURERM_SERVICE_PUBLIC_MSSQLMANAGEDINSTANCE/113037?buildTab=tests
Fix #17601.