azurermApiManagementGatewayHostNameConfiguration
Manages an API Management Gateway Host Name Configuration.
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.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermApiManagementExample = new azurerm.apiManagement.ApiManagement(
this,
"example_1",
{
location: azurermResourceGroupExample.location,
name: "example-apim",
publisher_email: "pub1@email.com",
publisher_name: "pub1",
resource_group_name: azurermResourceGroupExample.name,
sku_name: "Consumption_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.*/
azurermApiManagementExample.overrideLogicalId("example");
const azurermApiManagementCertificateExample =
new azurerm.apiManagementCertificate.ApiManagementCertificate(
this,
"example_2",
{
api_management_name: azurermApiManagementExample.name,
data: '${filebase64("example.pfx")}',
name: "example-cert",
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.*/
azurermApiManagementCertificateExample.overrideLogicalId("example");
const azurermApiManagementGatewayExample =
new azurerm.apiManagementGateway.ApiManagementGateway(this, "example_3", {
api_management_id: azurermApiManagementExample.id,
description: "Example API Management gateway",
location_data: [
{
city: "example city",
district: "example district",
name: "example name",
region: "example region",
},
],
name: "example-gateway",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementGatewayExample.overrideLogicalId("example");
const azurermApiManagementGatewayHostNameConfigurationExample =
new azurerm.apiManagementGatewayHostNameConfiguration.ApiManagementGatewayHostNameConfiguration(
this,
"example_4",
{
api_management_id: azurermApiManagementExample.id,
certificate_id: azurermApiManagementCertificateExample.id,
gateway_name: azurermApiManagementGatewayExample.name,
host_name: "example-host-name",
http2_enabled: true,
name: "example-host-name-configuration",
request_client_certificate_enabled: true,
tls10_enabled: true,
tls11_enabled: false,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementGatewayHostNameConfigurationExample.overrideLogicalId(
"example"
);
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created. -
apiManagementId
- (Required) The ID of the API Management Service. Changing this forces a new resource to be created. -
gatewayName
- (Required) The name of the API Management Gateway. Changing this forces a new resource to be created. -
certificateId
- (Required) The certificate ID to be used for TLS connection establishment. -
hostName
- (Required) The host name to use for the API Management Gateway Host Name Configuration. -
requestClientCertificateEnabled
- (Optional) Whether the API Management Gateway requests a client certificate. -
http2Enabled
- (Optional) Whether HTTP/2.0 is supported. Defaults totrue
. -
tls10Enabled
- (Optional) Whether TLS 1.0 is supported. -
tls11Enabled
- (Optional) Whether TLS 1.1 is supported.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the API Management Gateway Host Name Configuration.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the API Management Gateway Host Name Configuration.read
- (Defaults to 5 minutes) Used when retrieving the API Management Gateway Host Name Configuration.update
- (Defaults to 30 minutes) Used when updating the API Management Gateway Host Name Configuration.delete
- (Defaults to 30 minutes) Used when deleting the API Management Gateway Host Name Configuration.
Import
API Management Gateway Host Name Configuration can be imported using the resourceId
, e.g.