Skip to content

Latest commit

 

History

History
177 lines (143 loc) · 3.69 KB

File metadata and controls

177 lines (143 loc) · 3.69 KB

google_api_gateway_gateway

back

Index

Terraform

terraform {
  required_providers {
    google-beta = ">= 3.63.0"
  }
}

top

Example Usage

module "google_api_gateway_gateway" {
  source = "./modules/google-beta/r/google_api_gateway_gateway"

  # api_config - (required) is a type of string
  api_config = null
  # display_name - (optional) is a type of string
  display_name = null
  # gateway_id - (required) is a type of string
  gateway_id = null
  # labels - (optional) is a type of map of string
  labels = {}
  # project - (optional) is a type of string
  project = null
  # region - (optional) is a type of string
  region = null

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

top

Variables

variable "api_config" {
  description = "(required) - Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}"
  type        = string
}

variable "display_name" {
  description = "(optional) - A user-visible name for the API."
  type        = string
  default     = null
}

variable "gateway_id" {
  description = "(required) - Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project)."
  type        = string
}

variable "labels" {
  description = "(optional) - Resource labels to represent user-provided metadata."
  type        = map(string)
  default     = null
}

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

variable "region" {
  description = "(optional) - The region of the gateway for the API."
  type        = string
  default     = null
}

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

top

Resource

resource "google_api_gateway_gateway" "this" {
  # api_config - (required) is a type of string
  api_config = var.api_config
  # display_name - (optional) is a type of string
  display_name = var.display_name
  # gateway_id - (required) is a type of string
  gateway_id = var.gateway_id
  # labels - (optional) is a type of map of string
  labels = var.labels
  # project - (optional) is a type of string
  project = var.project
  # region - (optional) is a type of string
  region = var.region

  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"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}

top

Outputs

output "default_hostname" {
  description = "returns a string"
  value       = google_api_gateway_gateway.this.default_hostname
}

output "display_name" {
  description = "returns a string"
  value       = google_api_gateway_gateway.this.display_name
}

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

output "name" {
  description = "returns a string"
  value       = google_api_gateway_gateway.this.name
}

output "project" {
  description = "returns a string"
  value       = google_api_gateway_gateway.this.project
}

output "region" {
  description = "returns a string"
  value       = google_api_gateway_gateway.this.region
}

output "this" {
  value = google_api_gateway_gateway.this
}

top