Skip to content

Latest commit

 

History

History
108 lines (83 loc) · 1.96 KB

File metadata and controls

108 lines (83 loc) · 1.96 KB

google_compute_shared_vpc_service_project

back

Index

Terraform

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

top

Example Usage

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

  # host_project - (required) is a type of string
  host_project = null
  # service_project - (required) is a type of string
  service_project = null

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

top

Variables

variable "host_project" {
  description = "(required) - The ID of a host project to associate."
  type        = string
}

variable "service_project" {
  description = "(required) - The ID of the project that will serve as a Shared VPC service project."
  type        = string
}

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

top

Resource

resource "google_compute_shared_vpc_service_project" "this" {
  # host_project - (required) is a type of string
  host_project = var.host_project
  # service_project - (required) is a type of string
  service_project = var.service_project

  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"]
    }
  }

}

top

Outputs

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

output "this" {
  value = google_compute_shared_vpc_service_project.this
}

top