Skip to content

Latest commit

 

History

History
153 lines (122 loc) · 3.33 KB

File metadata and controls

153 lines (122 loc) · 3.33 KB

google_folder_access_approval_settings

back

Index

Terraform

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

top

Example Usage

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

  # folder_id - (required) is a type of string
  folder_id = null
  # notification_emails - (optional) is a type of set of string
  notification_emails = []

  enrolled_services = [{
    cloud_product    = null
    enrollment_level = null
  }]

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

top

Variables

variable "folder_id" {
  description = "(required) - ID of the folder of the access approval settings."
  type        = string
}

variable "notification_emails" {
  description = "(optional) - A list of email addresses to which notifications relating to approval requests should be sent.\nNotifications relating to a resource will be sent to all emails in the settings of ancestor\nresources of that resource. A maximum of 50 email addresses are allowed."
  type        = set(string)
  default     = null
}

variable "enrolled_services" {
  description = "nested block: NestingSet, min items: 1, max items: 0"
  type = set(object(
    {
      cloud_product    = string
      enrollment_level = 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_folder_access_approval_settings" "this" {
  # folder_id - (required) is a type of string
  folder_id = var.folder_id
  # notification_emails - (optional) is a type of set of string
  notification_emails = var.notification_emails

  dynamic "enrolled_services" {
    for_each = var.enrolled_services
    content {
      # cloud_product - (required) is a type of string
      cloud_product = enrolled_services.value["cloud_product"]
      # enrollment_level - (optional) is a type of string
      enrollment_level = enrolled_services.value["enrollment_level"]
    }
  }

  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 "enrolled_ancestor" {
  description = "returns a bool"
  value       = google_folder_access_approval_settings.this.enrolled_ancestor
}

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

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

output "notification_emails" {
  description = "returns a set of string"
  value       = google_folder_access_approval_settings.this.notification_emails
}

output "this" {
  value = google_folder_access_approval_settings.this
}

top