azurermApiManagementGatewayCertificateAuthority
Manages an API Management Gateway Certificate Authority.
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 azurermApiManagementGatewayCertificateAuthorityExample =
new azurerm.apiManagementGatewayCertificateAuthority.ApiManagementGatewayCertificateAuthority(
this,
"example_4",
{
api_management_id: azurermApiManagementExample.id,
certificate_name: azurermApiManagementCertificateExample.name,
gateway_name: azurermApiManagementGatewayExample.name,
is_trusted: true,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementGatewayCertificateAuthorityExample.overrideLogicalId(
"example"
);
Arguments Reference
The following arguments are supported:
-
apiManagementId
- (Required) The ID of the API Management Service. Changing this forces a new resource to be created. -
certificateName
- (Required) The name of the API Management Certificate. 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. -
isTrusted
- (Optional) Whether the API Management Gateway Certificate Authority is trusted.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the API Management Gateway Certificate Authority.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the API Management Gateway Certificate Authority.read
- (Defaults to 5 minutes) Used when retrieving the API Management Gateway Certificate Authority.update
- (Defaults to 30 minutes) Used when updating the API Management Gateway Certificate Authority.delete
- (Defaults to 30 minutes) Used when deleting the API Management Gateway Certificate Authority.
Import
API Management Gateway Certificate Authority can be imported using the resourceId
, e.g.