azurermSpringCloudCustomDomain
Manages an Azure Spring Cloud Custom Domain.
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: "rg-example",
}
);
const azurermSpringCloudServiceExample =
new azurerm.springCloudService.SpringCloudService(this, "example_2", {
location: azurermResourceGroupExample.location,
name: "example-springcloud",
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudServiceExample.overrideLogicalId("example");
const dataAzurermDnsZoneExample =
new azurerm.dataAzurermDnsZone.DataAzurermDnsZone(this, "example_3", {
name: "mydomain.com",
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzurermDnsZoneExample.overrideLogicalId("example");
const azurermSpringCloudAppExample = new azurerm.springCloudApp.SpringCloudApp(
this,
"example_4",
{
name: "example-springcloudapp",
resource_group_name: azurermResourceGroupExample.name,
service_name: azurermSpringCloudServiceExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudAppExample.overrideLogicalId("example");
const azurermDnsCnameRecordExample = new azurerm.dnsCnameRecord.DnsCnameRecord(
this,
"example_5",
{
name: "record1",
record: azurermSpringCloudAppExample.fqdn,
resource_group_name: dataAzurermDnsZoneExample.resourceGroupName,
ttl: 300,
zone_name: dataAzurermDnsZoneExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDnsCnameRecordExample.overrideLogicalId("example");
const azurermSpringCloudCustomDomainExample =
new azurerm.springCloudCustomDomain.SpringCloudCustomDomain(
this,
"example_6",
{
name: `\${join(".", [${azurermDnsCnameRecordExample.name}, ${azurermDnsCnameRecordExample.zoneName}])}`,
spring_cloud_app_id: azurermSpringCloudAppExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudCustomDomainExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created. -
springCloudAppId
- (Required) Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created. -
certificateName
- (Optional) Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required whenthumbprint
is specified -
thumbprint
- (Optional) Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required whencertificateName
is specified. Changing this forces a new resource to be created.
Attributes Reference
The following attributes are exported:
id
- The ID of the Spring Cloud Custom Domain.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Spring Cloud Custom Domain.read
- (Defaults to 5 minutes) Used when retrieving the Spring Cloud Custom Domain.update
- (Defaults to 30 minutes) Used when updating the Spring Cloud Custom Domain.delete
- (Defaults to 30 minutes) Used when deleting the Spring Cloud Custom Domain.
Import
Spring Cloud Custom Domain can be imported using the resourceId
, e.g.