azurermMssqlServerDnsAlias
Manages a MS SQL Server DNS Alias.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermMssqlServerExample = new azurerm.mssqlServer.MssqlServer(
this,
"example_2",
{
administrator_login: "missadministrator",
administrator_login_password: "AdminPassword123!",
location: azurermResourceGroupExample.location,
name: "example-sqlserver",
resource_group_name: azurermResourceGroupExample.name,
version: "12.0",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMssqlServerExample.overrideLogicalId("example");
const azurermMssqlServerDnsAliasExample =
new azurerm.mssqlServerDnsAlias.MssqlServerDnsAlias(this, "example_3", {
mssql_server_id: azurermMssqlServerExample.id,
name: "example-dns-alias",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMssqlServerDnsAliasExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
mssqlServerId
- (Required) The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. -
name
- (Required) The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
-
id
- The ID of the MSSQL Server DNS Alias. -
dnsRecord
- The fully qualified DNS record for alias.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the MSSQL Server DNS Alias.read
- (Defaults to 5 minutes) Used when retrieving the MSSQL Server DNS Alias.delete
- (Defaults to 10 minutes) Used when deleting the MSSQL Server DNS Alias.
Import
MSSQL Server DNS Aliass can be imported using the resourceId
, e.g.