Skip to content

azurermApiManagementTag

Manages a API Management Tag.

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 azurermApiManagementExample = new azurerm.apiManagement.ApiManagement(
  this,
  "example_2",
  {
    location: azurermResourceGroupExample.location,
    name: "example-apim",
    publisher_email: "company@terraform.io",
    publisher_name: "My Company",
    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 azurermApiManagementTagExample =
  new azurerm.apiManagementTag.ApiManagementTag(this, "example_3", {
    api_management_id: azurermApiManagementExample.id,
    name: "example-Tag",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementTagExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • apiManagementId - (Required) The ID of the API Management. Changing this forces a new API Management Tag to be created.

  • name - (Required) The name which should be used for this API Management Tag. Changing this forces a new API Management Tag to be created. The name must be unique in the API Management Service.

  • displayName - (Optional) The display name of the API Management Tag. Defaults to the name.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the API Management Tag.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the API Management Tag.
  • read - (Defaults to 5 minutes) Used when retrieving the API Management Tag.
  • update - (Defaults to 30 minutes) Used when updating the API Management Tag.
  • delete - (Defaults to 30 minutes) Used when deleting the API Management Tag.

Import

API Management Tags can be imported using the resourceId, e.g.

terraform import azurerm_api_management_tag.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/tags/tag1