Skip to content

Latest commit

 

History

History
159 lines (129 loc) · 3.2 KB

File metadata and controls

159 lines (129 loc) · 3.2 KB

azurerm_api_management_api_operation_policy

back

Index

Terraform

terraform {
  required_providers {
    azurerm = ">= 2.54.0"
  }
}

top

Example Usage

module "azurerm_api_management_api_operation_policy" {
  source = "./modules/azurerm/r/azurerm_api_management_api_operation_policy"

  # api_management_name - (required) is a type of string
  api_management_name = null
  # api_name - (required) is a type of string
  api_name = null
  # operation_id - (required) is a type of string
  operation_id = null
  # resource_group_name - (required) is a type of string
  resource_group_name = null
  # xml_content - (optional) is a type of string
  xml_content = null
  # xml_link - (optional) is a type of string
  xml_link = null

  timeouts = [{
    create = null
    delete = null
    read   = null
    update = null
  }]
}

top

Variables

variable "api_management_name" {
  description = "(required)"
  type        = string
}

variable "api_name" {
  description = "(required)"
  type        = string
}

variable "operation_id" {
  description = "(required)"
  type        = string
}

variable "resource_group_name" {
  description = "(required)"
  type        = string
}

variable "xml_content" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "xml_link" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      create = string
      delete = string
      read   = string
      update = string
    }
  ))
  default = []
}

top

Resource

resource "azurerm_api_management_api_operation_policy" "this" {
  # api_management_name - (required) is a type of string
  api_management_name = var.api_management_name
  # api_name - (required) is a type of string
  api_name = var.api_name
  # operation_id - (required) is a type of string
  operation_id = var.operation_id
  # resource_group_name - (required) is a type of string
  resource_group_name = var.resource_group_name
  # xml_content - (optional) is a type of string
  xml_content = var.xml_content
  # xml_link - (optional) is a type of string
  xml_link = var.xml_link

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
      # read - (optional) is a type of string
      read = timeouts.value["read"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}

top

Outputs

output "id" {
  description = "returns a string"
  value       = azurerm_api_management_api_operation_policy.this.id
}

output "xml_content" {
  description = "returns a string"
  value       = azurerm_api_management_api_operation_policy.this.xml_content
}

output "this" {
  value = azurerm_api_management_api_operation_policy.this
}

top