terraform-provider-mssql
terraform-provider-mssql copied to clipboard
added new resources and datasources
Hi, @magne
This PR introduces a new resources and datasources
the list of new datasources:
- user (docs/acctest)
- login (docs/acctest)
- database_schema (docs/acctest)
- database_role (docs/acctest)
- database_permission (docs/acctest)
- database_credential (docs/acctest)
- azure_external_datasource (docs/acctest) is limited to Azure SQL Database only
the list of new resources:
- database_schema (docs/acctest)
- database_role (docs/acctest)
- database_permission (docs/acctest)
- database_masterkey (docs/acctest)
- database_credential (docs/acctest)
- azure_external_datasource (docs/acctest) is limited to Azure SQL Database only
SQL user create functionality has been updated for authType = EXTERNAL
- the second plan show update in place changing role from to
SQL user delete functionality has been updated
- when you try to delete a user and it is the owner of the role/schema, it is not possible until you change the owner (SQL error)
Implemented validation for names/password
The full list of acctest
Apply complete! Resources: 15 added, 0 changed, 0 destroyed. [local: terraform-provider-mssql ]$ TESTARGS=-count=1 make testacc if [ -f .local.env ]; then source .local.env; fi && TF_ACC=1 TERRAFORM_VERSION="~> 1.5" go test github.com/betr-io/terraform-provider-mssql/mssql -v -count=1 -timeout 120m === RUN TestAccDataAzureExternalDatasource_Azure_Basic --- PASS: TestAccDataAzureExternalDatasource_Azure_Basic (19.85s) === RUN TestAccDataDatabaseCredential_Azure_Basic --- PASS: TestAccDataDatabaseCredential_Azure_Basic (14.03s) === RUN TestAccDataDatabasePermissions_Local_Basic --- PASS: TestAccDataDatabasePermissions_Local_Basic (4.26s) === RUN TestAccDataDatabasePermissions_Azure_Basic --- PASS: TestAccDataDatabasePermissions_Azure_Basic (20.67s) === RUN TestAccDataDatabaseRole_Local_Basic --- PASS: TestAccDataDatabaseRole_Local_Basic (3.41s) === RUN TestAccDataDatabaseRole_Azure_Basic --- PASS: TestAccDataDatabaseRole_Azure_Basic (12.46s) === RUN TestAccDataDatabaseSchema_Local_Basic --- PASS: TestAccDataDatabaseSchema_Local_Basic (3.34s) === RUN TestAccDataDatabaseSchema_Azure_Basic --- PASS: TestAccDataDatabaseSchema_Azure_Basic (12.00s) === RUN TestAccDataLogin_Local_Basic --- PASS: TestAccDataLogin_Local_Basic (3.57s) === RUN TestAccDataLogin_Azure_Basic --- PASS: TestAccDataLogin_Azure_Basic (13.48s) === RUN TestAccDataUser_Local_Basic --- PASS: TestAccDataUser_Local_Basic (3.90s) === RUN TestAccDataUser_Azure_Basic --- PASS: TestAccDataUser_Azure_Basic (21.10s) === RUN TestProvider --- PASS: TestProvider (0.00s) === RUN TestAccAzureExternalDatasource_Azure_BasicImport --- PASS: TestAccAzureExternalDatasource_Azure_BasicImport (19.54s) === RUN TestAccAzureExternalDatasource_Azure_Basic --- PASS: TestAccAzureExternalDatasource_Azure_Basic (20.90s) === RUN TestAccAzureExternalDatasource_Azure_Basic_update --- PASS: TestAccAzureExternalDatasource_Azure_Basic_update (25.96s) === RUN TestAccDatabaseCredential_Azure_BasicImport --- PASS: TestAccDatabaseCredential_Azure_BasicImport (14.32s) === RUN TestAccDatabaseCredential_Azure_Basic --- PASS: TestAccDatabaseCredential_Azure_Basic (11.33s) === RUN TestAccDatabaseCredential_Azure_Basic_update --- PASS: TestAccDatabaseCredential_Azure_Basic_update (19.98s) === RUN TestAccDatabaseMasterkey_Local_Basic --- PASS: TestAccDatabaseMasterkey_Local_Basic (2.18s) === RUN TestAccDatabaseMasterkey_Local_Basic_update --- PASS: TestAccDatabaseMasterkey_Local_Basic_update (4.02s) === RUN TestAccDatabasePermissions_Local_BasicImport --- PASS: TestAccDatabasePermissions_Local_BasicImport (4.27s) === RUN TestAccDatabasePermissions_Local_Basic --- PASS: TestAccDatabasePermissions_Local_Basic (3.37s) === RUN TestAccDatabasePermissions_Local_Basic_update_1 --- PASS: TestAccDatabasePermissions_Local_Basic_update_1 (5.88s) === RUN TestAccDatabasePermissions_Local_Basic_update_2 --- PASS: TestAccDatabasePermissions_Local_Basic_update_2 (5.97s) === RUN TestAccDatabasePermissions_Azure_Basic --- PASS: TestAccDatabasePermissions_Azure_Basic (14.50s) === RUN TestAccDatabaseRole_Local_BasicImport --- PASS: TestAccDatabaseRole_Local_BasicImport (2.92s) === RUN TestAccDatabaseRole_Local_Basic_Create --- PASS: TestAccDatabaseRole_Local_Basic_Create (2.16s) === RUN TestAccDatabaseRole_Local_Basic_Create_owner --- PASS: TestAccDatabaseRole_Local_Basic_Create_owner (3.60s) === RUN TestAccDatabaseRole_Azure_Basic_Create --- PASS: TestAccDatabaseRole_Azure_Basic_Create (8.75s) === RUN TestAccDatabaseRole_Azure_Basic_Create_owner --- PASS: TestAccDatabaseRole_Azure_Basic_Create_owner (17.74s) === RUN TestAccDatabaseRole_Local_Basic_Update --- PASS: TestAccDatabaseRole_Local_Basic_Update (4.06s) === RUN TestAccDatabaseRole_Local_Basic_Update_owner --- PASS: TestAccDatabaseRole_Local_Basic_Update_owner (7.33s) === RUN TestAccDatabaseRole_Local_Basic_Remove_owner --- PASS: TestAccDatabaseRole_Local_Basic_Remove_owner (6.25s) === RUN TestAccDatabaseRole_Azure_Basic_Update --- PASS: TestAccDatabaseRole_Azure_Basic_Update (13.65s) === RUN TestAccDatabaseRole_Azure_Basic_Update_owner --- PASS: TestAccDatabaseRole_Azure_Basic_Update_owner (21.31s) === RUN TestAccDatabaseSchema_Local_BasicImport --- PASS: TestAccDatabaseSchema_Local_BasicImport (2.95s) === RUN TestAccDatabaseSchema_Local_Basic_Create --- PASS: TestAccDatabaseSchema_Local_Basic_Create (2.20s) === RUN TestAccDatabaseSchema_Local_Basic_Create_owner --- PASS: TestAccDatabaseSchema_Local_Basic_Create_owner (3.67s) === RUN TestAccDatabaseSchema_Azure_Basic_Create --- PASS: TestAccDatabaseSchema_Azure_Basic_Create (7.15s) === RUN TestAccDatabaseSchema_Azure_Basic_Create_owner --- PASS: TestAccDatabaseSchema_Azure_Basic_Create_owner (15.35s) === RUN TestAccDatabaseSchema_Local_Basic_Update_owner --- PASS: TestAccDatabaseSchema_Local_Basic_Update_owner (7.39s) === RUN TestAccDatabaseSchema_Local_Basic_Update_remove_owner --- PASS: TestAccDatabaseSchema_Local_Basic_Update_remove_owner (6.02s) === RUN TestAccDatabaseSchema_Azure_Basic_Update_owner --- PASS: TestAccDatabaseSchema_Azure_Basic_Update_owner (21.26s) === RUN TestAccLogin_Local_BasicImport --- PASS: TestAccLogin_Local_BasicImport (3.14s) === RUN TestAccLogin_Local_Basic --- PASS: TestAccLogin_Local_Basic (2.73s) === RUN TestAccLogin_Local_Basic_SID --- PASS: TestAccLogin_Local_Basic_SID (2.70s) === RUN TestAccLogin_Azure_Basic --- PASS: TestAccLogin_Azure_Basic (8.45s) === RUN TestAccLogin_Azure_Basic_SID --- PASS: TestAccLogin_Azure_Basic_SID (8.89s) === RUN TestAccLogin_Local_UpdateLoginName --- PASS: TestAccLogin_Local_UpdateLoginName (5.37s) === RUN TestAccLogin_Local_UpdatePassword --- PASS: TestAccLogin_Local_UpdatePassword (4.89s) === RUN TestAccLogin_Local_UpdateDefaultDatabase --- PASS: TestAccLogin_Local_UpdateDefaultDatabase (4.83s) === RUN TestAccLogin_Local_UpdateDefaultLanguage --- PASS: TestAccLogin_Local_UpdateDefaultLanguage (4.84s) === RUN TestAccLogin_Azure_UpdateLoginName --- PASS: TestAccLogin_Azure_UpdateLoginName (16.78s) === RUN TestAccLogin_Azure_UpdatePassword --- PASS: TestAccLogin_Azure_UpdatePassword (14.28s) === RUN TestAccUser_Local_BasicImport --- PASS: TestAccUser_Local_BasicImport (3.58s) === RUN TestAccUser_Local_Instance --- PASS: TestAccUser_Local_Instance (3.10s) === RUN TestAccMultipleUsers_Local_Instance --- PASS: TestAccMultipleUsers_Local_Instance (5.53s) === RUN TestAccUser_Azure_Instance --- PASS: TestAccUser_Azure_Instance (14.86s) === RUN TestAccUser_Azure_Database --- PASS: TestAccUser_Azure_Database (12.21s) === RUN TestAccUser_AzureadChain_Database --- PASS: TestAccUser_AzureadChain_Database (13.90s) === RUN TestAccUser_AzureadMSI_Database --- PASS: TestAccUser_AzureadMSI_Database (13.30s) === RUN TestAccUser_Azure_External --- PASS: TestAccUser_Azure_External (9.32s) === RUN TestAccUser_AzureadChain_External --- PASS: TestAccUser_AzureadChain_External (11.68s) === RUN TestAccUser_AzureadMSI_External --- PASS: TestAccUser_AzureadMSI_External (11.66s) === RUN TestAccUser_Local_Update_DefaultSchema --- PASS: TestAccUser_Local_Update_DefaultSchema (5.30s) === RUN TestAccUser_Local_Update_DefaultLanguage --- PASS: TestAccUser_Local_Update_DefaultLanguage (4.52s) === RUN TestAccUser_Local_Update_Roles --- PASS: TestAccUser_Local_Update_Roles (8.98s) === RUN TestAccUser_Azure_Update_DefaultSchema --- PASS: TestAccUser_Azure_Update_DefaultSchema (27.33s) === RUN TestAccUser_Azure_Update_DefaultLanguage --- PASS: TestAccUser_Azure_Update_DefaultLanguage (23.65s) === RUN TestAccUser_Azure_Update_Roles --- PASS: TestAccUser_Azure_Update_Roles (41.88s) PASS ok github.com/betr-io/terraform-provider-mssql/mssql 725.730s
@magne Is this repo/provider still being maintained/will this PR be reviewed and or merged? I currently use the mssql_user resource on the parent provider and am interested in using the database_permission resource that this PR implements but would like to know if we should continue to use this provider or switch to using the fork from @ValeruS
I'm interested in that question too
@magne Can you merge this into your main git branch?
please for the love of peat can someone merge this in ;)
@magne I appreciate your provider is effectively in maintenance mode at the moment, but it's the de-facto one which is returned when people search for the capabilities covered (mostly) by the provider as it stands.
Given this PR (and full disclosure, I'm the one who asked @ValeruS to raise this so that we can keep the community consistently on one project) adds to the feature set, is is feasible that this will be approved/merged?