Skip to content

Latest commit

 

History

History
152 lines (123 loc) · 2.94 KB

File metadata and controls

152 lines (123 loc) · 2.94 KB

azurerm_api_management_api_schema

back

Index

Terraform

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

top

Example Usage

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

  # api_management_name - (required) is a type of string
  api_management_name = null
  # api_name - (required) is a type of string
  api_name = null
  # content_type - (required) is a type of string
  content_type = null
  # resource_group_name - (required) is a type of string
  resource_group_name = null
  # schema_id - (required) is a type of string
  schema_id = null
  # value - (required) is a type of string
  value = 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 "content_type" {
  description = "(required)"
  type        = string
}

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

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

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

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_schema" "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
  # content_type - (required) is a type of string
  content_type = var.content_type
  # resource_group_name - (required) is a type of string
  resource_group_name = var.resource_group_name
  # schema_id - (required) is a type of string
  schema_id = var.schema_id
  # value - (required) is a type of string
  value = var.value

  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_schema.this.id
}

output "this" {
  value = azurerm_api_management_api_schema.this
}

top