Conversation
| func TestAccMsSqlServer_writeOnlyAdminLoginPassword(t *testing.T) { | ||
| data := acceptance.BuildTestData(t, "azurerm_mssql_server", "test") | ||
| r := MsSqlServerResource{} | ||
|
|
||
| data.ResourceTest(t, r, []acceptance.TestStep{ | ||
| { | ||
| Config: r.writeOnlyAdminLoginPassword(data, "7h1515K4711-secret", 1), | ||
| Check: check.That(data.ResourceName).ExistsInAzure(r), | ||
| }, | ||
| data.ImportStep("administrator_login_password_wo_version"), | ||
| { | ||
| Config: r.writeOnlyAdminLoginPassword(data, "7h1515K4711-updated", 2), | ||
| Check: check.That(data.ResourceName).ExistsInAzure(r), | ||
| }, | ||
| data.ImportStep("administrator_login_password_wo_version"), | ||
| }) | ||
| } | ||
|
|
||
| func TestAccMsSqlServer_updateToWriteOnlyPassword(t *testing.T) { | ||
| data := acceptance.BuildTestData(t, "azurerm_mssql_server", "test") | ||
| r := MsSqlServerResource{} | ||
|
|
||
| data.ResourceTest(t, r, []acceptance.TestStep{ | ||
| { | ||
| Config: r.basic(data), | ||
| Check: check.That(data.ResourceName).ExistsInAzure(r), | ||
| }, | ||
| data.ImportStep("administrator_login_password"), | ||
| { | ||
| Config: r.writeOnlyAdminLoginPassword(data, "7h1515K4711-secret", 1), | ||
| Check: check.That(data.ResourceName).ExistsInAzure(r), | ||
| }, | ||
| data.ImportStep("administrator_login_password", "administrator_login_password_wo_version"), | ||
| { | ||
| Config: r.basic(data), | ||
| Check: check.That(data.ResourceName).ExistsInAzure(r), | ||
| }, | ||
| data.ImportStep("administrator_login_password"), | ||
| }) | ||
| } |
There was a problem hiding this comment.
These tests need to be skipped for Terraform versions < 1.11. There's an example in the preliminary guide I shared on how to do that, or you can take a look at the tests over in my PR.
There was a problem hiding this comment.
Oh shoot! Swapped! Thank you thank you
| * `administrator_login_password` - (Optional) The password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx). Either `administrator_login_password` or `administrator_login_password_wo` is required unless `azuread_authentication_only` in the `azuread_administrator` block is `true`. | ||
|
|
||
| * `administrator_login_password_wo` - (Optional, Write-Only) The Password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx). Either `administrator_login_password` or `administrator_login_password_wo` is required unless `azuread_authentication_only` in the `azuread_administrator` block is `true`. |
There was a problem hiding this comment.
Matt suggested adding a note instead of duplicating the either x or y is required information on the property descriptions on my PRs which I've updated. Can you make that change here as well so it's consistent?
| * `administrator_login_password` - (Optional) The password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx). Either `administrator_login_password` or `administrator_login_password_wo` is required unless `azuread_authentication_only` in the `azuread_administrator` block is `true`. | |
| * `administrator_login_password_wo` - (Optional, Write-Only) The Password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx). Either `administrator_login_password` or `administrator_login_password_wo` is required unless `azuread_authentication_only` in the `azuread_administrator` block is `true`. | |
| * `administrator_login_password` - (Optional) The password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx). | |
| * `administrator_login_password_wo` - (Optional, Write-Only) The Password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx). | |
| ~> **Note:** Either `administrator_login_password` or `administrator_login_password_wo` is required unless `azuread_authentication_only` in the `azuread_administrator` block is `true`. |
* Update CHANGELOG.md for #28840 * Update CHANGELOG.md #28808 * Update CHANGELOG.md #27962 * Update CHANGELOG.md for #28859 * Update for #28825 * Update CHANGELOG.md for #28864 * Update CHANGELOG.md #28539 * Update CHANGELOG.md #28685 * Update CHANGELOG.md for #28818 * Update for #28857 #28799 #28856 * Update for #28122 * Update for #28248 #27805 * Update for #28853 * Update for #28316 #28494 #28696 * Update for #28754 * Update CHANGELOG.md #28771 * Update CHANGELOG.md #28842 * Update for #28879 * Update for #28199 * Update CHANGELOG.md #28862 * prep for release v4.21.0 --------- Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: Wyatt Fry <wyattfry@gmail.com>
|
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. |
Community Note
Description
This PR adds support for the write only attribute
administrator_login_password_wo.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_mssql_server- add support foradministrator_login_password_woandadministrator_login_password_wo_version[GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #0000
Note
If this PR changes meaningfully during the course of review please update the title and description as required.