Skip to content

Commit

Permalink
Update SQL Server docs for identity block
Browse files Browse the repository at this point in the history
  • Loading branch information
bgs113 committed Oct 30, 2019
1 parent 70221e2 commit da08b94
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions website/docs/d/sql_server.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,16 @@ output "sql_server_id" {

* `administrator_login` - The administrator username of the SQL Server.

* `identity` - An `identity` block as defined below.

* `tags` - A mapping of tags assigned to the resource.

---

An `identity` block exports the following:

* `principal_id` - The ID of the Principal (Client) in Azure Active Directory.

* `tenant_id` - The ID of the Azure Active Directory Tenant.

* `type` - The identity type of the SQL Server.
20 changes: 20 additions & 0 deletions website/docs/r/sql_server.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,35 @@ The following arguments are supported:

* `administrator_login_password` - (Required) The password associated with the `administrator_login` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx)

* `identity` - (Optional) An `identity` block as defined below.

* `tags` - (Optional) A mapping of tags to assign to the resource.

---

An `identity` block supports the following:

* `type` - (Required) Specifies the identity type of the SQL Server. At this time the only allowed value is `SystemAssigned`.

~> **NOTE:** The assigned `principal_id` and `tenant_id` can be retrieved after the identity `type` has been set to `SystemAssigned` and the SQL Server has been created. More details are available below.

## Attributes Reference

The following attributes are exported:

* `id` - The SQL Server ID.
* `fully_qualified_domain_name` - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)

---

`identity` exports the following:

* `principal_id` - The Principal ID for the Service Principal associated with the Identity of this SQL Server.

* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.

-> You can access the Principal ID via `${azurerm_sql_server.test.identity.0.principal_id}` and the Tenant ID via `${azurerm_sql_server.test.identity.0.tenant_id}`

## Import

SQL Servers can be imported using the `resource id`, e.g.
Expand Down

0 comments on commit da08b94

Please sign in to comment.