Azure API Management Product Group
This page shows how to write Terraform and Azure Resource Manager for API Management Product Group and write them securely.
azurerm_api_management_product_group (Terraform)
The Product Group in API Management can be configured in Terraform with the resource name azurerm_api_management_product_group
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_api_management_product_group" "people_group_people_std_product" {
product_id = azurerm_api_management_product.apim_product_std.product_id
group_name = azurerm_api_management_group.people_group.name
api_management_name = data.azurerm_api_management.apim.name
resource_group_name = data.azurerm_resource_group.rg.name
}
resource "azurerm_api_management_product_group" "this" {
api_management_name = var.api_management_name
group_name = var.group_name
product_id = var.product_id
resource_group_name = var.resource_group_name
resource "azurerm_api_management_product_group" "product_group" {
for_each = var.create_product_group_and_relationships ? toset(var.products) : []
product_id = each.key
resource_group_name = var.resource_group_name
api_management_name = azurerm_api_management.apim.name
group_name = each.key
resource "azurerm_api_management_product_group" "product_group" {
for_each = { for apim_product_group in var.apim_product_group : apim_product_group.product_id => apim_product_group }
api_management_name = var.apim_name
resource_group_name = var.apim_resource_group
product_id = each.value.product_id
group_name = each.value.group_name
resource "azurerm_api_management_product_group" "access_control" {
product_id = azurerm_api_management_product.injestion.product_id
group_name = azurerm_api_management_group.create_group.name
api_management_name = var.apim_name
resource_group_name = var.rg_name
}
resource "azurerm_api_management_product_group" "this" {
api_management_name = var.api_management_name
group_name = var.group_name
product_id = var.product_id
resource_group_name = var.resource_group_name
resource "azurerm_api_management_product_group" "this" {
for_each = var.groups
product_id = azurerm_api_management_product.this.product_id
resource_group_name = var.resource_group_name
api_management_name = var.api_management_name
resource "azurerm_api_management_product_group" "access_control_groups" {
for_each = toset(var.product_access_control_groups)
product_id = azurerm_api_management_product.product.product_id
group_name = each.value
api_management_name = var.api_mgmt_name
resource_group_name = var.api_mgmt_rg
resource "azurerm_api_management_product_group" "mydevelopers" {
product_id = azurerm_api_management_product.mydevelopers.product_id
group_name = azurerm_api_management_group.mydevelopers.name
api_management_name = azurerm_api_management.base.name
resource_group_name = azurerm_resource_group.base.name
}
resource "azurerm_api_management_product_group" "mydevelopers" {
product_id = azurerm_api_management_product.mydevelopers.product_id
group_name = azurerm_api_management_group.mydevelopers.name
api_management_name = azurerm_api_management.base.name
resource_group_name = azurerm_resource_group.base.name
}
Parameters
-
api_management_name
required - string -
group_name
required - string -
id
optional computed - string -
product_id
required - string -
resource_group_name
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages an API Management Product Assignment to a Group.
Microsoft.ApiManagement/service/products/groups/groupId (Azure Resource Manager)
The service/products/groups/groupId in Microsoft.ApiManagement can be configured in Azure Resource Manager with the resource name Microsoft.ApiManagement/service/products/groups/groupId
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Frequently asked questions
What is Azure API Management Product Group?
Azure API Management Product Group is a resource for API Management of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure API Management Product Group?
For Terraform, the NewSignature/apim-training, kevinhead/azurerm and claranet/terraform-azurerm-api-management source code examples are useful. See the Terraform Example section for further details.