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_synapse_workspace - remove sql password requirement for synapse #18850

Merged
merged 3 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/services/synapse/synapse_workspace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ func resourceSynapseWorkspace() *pluginsdk.Resource {

"sql_administrator_login": {
Type: pluginsdk.TypeString,
Required: true,
Optional: true,
ForceNew: true,
ValidateFunc: validate.SqlAdministratorLoginName,
},

"sql_administrator_login_password": {
Type: pluginsdk.TypeString,
Required: true,
Optional: true,
Sensitive: true,
},

Expand Down
37 changes: 37 additions & 0 deletions internal/services/synapse/synapse_workspace_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,43 @@ resource "azurerm_synapse_workspace" "test" {
`, template, data.RandomInteger)
}

func (r SynapseWorkspaceResource) withAadAdminsOnly(data acceptance.TestData) string {
template := r.template(data)
return fmt.Sprintf(`
%s

data "azurerm_client_config" "current" {
}

resource "azurerm_synapse_workspace" "test" {
name = "acctestsw%d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
storage_data_lake_gen2_filesystem_id = azurerm_storage_data_lake_gen2_filesystem.test.id
sql_identity_control_enabled = true
aad_admin {
login = "AzureAD Admin"
object_id = data.azurerm_client_config.current.object_id
tenant_id = data.azurerm_client_config.current.tenant_id
}

sql_aad_admin {
login = "AzureAD Admin"
object_id = data.azurerm_client_config.current.object_id
tenant_id = data.azurerm_client_config.current.tenant_id
}

identity {
type = "SystemAssigned"
}

tags = {
ENV = "Test2"
}
}
`, template, data.RandomInteger)
}

func (r SynapseWorkspaceResource) azureDevOps(data acceptance.TestData) string {
template := r.template(data)
return fmt.Sprintf(`
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/synapse_workspace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ The following arguments are supported:

* `storage_data_lake_gen2_filesystem_id` - (Required) Specifies the ID of storage data lake gen2 filesystem resource. Changing this forces a new resource to be created.

* `sql_administrator_login` - (Required) Specifies The login name of the SQL administrator. Changing this forces a new resource to be created.
* `sql_administrator_login` - (Optional) Specifies The login name of the SQL administrator. Changing this forces a new resource to be created. If this is not provided `aad_admin` or `customer_managed_key` must be provided.

* `sql_administrator_login_password` - (Required) The Password associated with the `sql_administrator_login` for the SQL administrator.
* `sql_administrator_login_password` - (Optional) The Password associated with the `sql_administrator_login` for the SQL administrator. If this is not provided `aad_admin` or `customer_managed_key` must be provided.

---

Expand Down