Skip to content

Latest commit

 

History

History
147 lines (118 loc) · 3.19 KB

File metadata and controls

147 lines (118 loc) · 3.19 KB

google_app_engine_firewall_rule

back

Index

Terraform

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

top

Example Usage

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

  # action - (required) is a type of string
  action = null
  # description - (optional) is a type of string
  description = null
  # priority - (optional) is a type of number
  priority = null
  # project - (optional) is a type of string
  project = null
  # source_range - (required) is a type of string
  source_range = null

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

top

Variables

variable "action" {
  description = "(required) - The action to take if this rule matches. Possible values: [\"UNSPECIFIED_ACTION\", \"ALLOW\", \"DENY\"]"
  type        = string
}

variable "description" {
  description = "(optional) - An optional string description of this rule."
  type        = string
  default     = null
}

variable "priority" {
  description = "(optional) - A positive integer that defines the order of rule evaluation.\nRules with the lowest priority are evaluated first.\n\nA default rule at priority Int32.MaxValue matches all IPv4 and\nIPv6 traffic when no previous rule matches. Only the action of\nthis rule can be modified by the user."
  type        = number
  default     = null
}

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

variable "source_range" {
  description = "(required) - IP address or range, defined using CIDR notation, of requests that this rule applies to."
  type        = string
}

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_app_engine_firewall_rule" "this" {
  # action - (required) is a type of string
  action = var.action
  # description - (optional) is a type of string
  description = var.description
  # priority - (optional) is a type of number
  priority = var.priority
  # project - (optional) is a type of string
  project = var.project
  # source_range - (required) is a type of string
  source_range = var.source_range

  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 "id" {
  description = "returns a string"
  value       = google_app_engine_firewall_rule.this.id
}

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

output "this" {
  value = google_app_engine_firewall_rule.this
}

top