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

azurerm_mssql_managed_instance : support new property azure_active_directory_administrator #24801

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sinbai
Copy link
Contributor

@sinbai sinbai commented Feb 7, 2024

Test results:
https://hashicorp.teamcity.com/buildConfiguration/TF_AzureRM_AZURERM_SERVICE_PUBLIC_MSSQLMANAGEDINSTANCE/113037?buildTab=tests

Fix #17601.

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

@sinbai sinbai force-pushed the mssqlManagedInstance/support_azuread_administrator branch 2 times, most recently from 2ed8741 to 8019c64 Compare February 22, 2024 03:43
@sinbai sinbai force-pushed the mssqlManagedInstance/support_azuread_administrator branch from e90841b to d115c7e Compare March 1, 2024 07:12
@sinbai sinbai changed the title azurerm_mssql_managed_instance : support new property azuread_administrator azurerm_mssql_managed_instance : support new property microsoft_entra_administrator Mar 1, 2024
@sinbai sinbai force-pushed the mssqlManagedInstance/support_azuread_administrator branch 4 times, most recently from cde2ae0 to b612842 Compare March 5, 2024 10:30
@sinbai sinbai marked this pull request as ready for review March 6, 2024 02:09
ValidateFunc: validation.StringIsNotEmpty,
},

"microsoft_entra_administrator": {
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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

Comment on lines -28 to -30
{
Config: r.template(data),
},
Copy link
Member

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?

Copy link
Contributor Author

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.

image

Copy link
Member

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

Copy link
Contributor Author

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)

@sinbai sinbai force-pushed the mssqlManagedInstance/support_azuread_administrator branch from 92fbd12 to 08c3af2 Compare December 18, 2024 08:48
@sinbai sinbai force-pushed the mssqlManagedInstance/support_azuread_administrator branch from 08c3af2 to 0ed9f48 Compare December 18, 2024 08:54
@katbyte katbyte assigned catriona-m and unassigned sinbai Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for azurerm_mssql_managed_instance with AAD admin + azuread_authentication_only