You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module"google_compute_reservation" {
source="./modules/google-beta/r/google_compute_reservation"# description - (optional) is a type of stringdescription=null# name - (required) is a type of stringname=null# project - (optional) is a type of stringproject=null# specific_reservation_required - (optional) is a type of boolspecific_reservation_required=null# zone - (required) is a type of stringzone=nullspecific_reservation=[{
count =null
in_use_count =null
instance_properties = [{
guest_accelerators = [{
accelerator_count =null
accelerator_type =null
}]
local_ssds = [{
disk_size_gb =null
interface =null
}]
machine_type =null
min_cpu_platform =null
}]
}]
timeouts=[{
create =null
delete =null
update =null
}]
}
variable"description" {
description="(optional) - An optional description of this resource."type=stringdefault=null
}
variable"name" {
description="(required) - Name of the resource. Provided by the client when the resource is\ncreated. The name must be 1-63 characters long, and comply with\nRFC1035. Specifically, the name must be 1-63 characters long and match\nthe regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the\nfirst character must be a lowercase letter, and all following\ncharacters must be a dash, lowercase letter, or digit, except the last\ncharacter, which cannot be a dash."type=string
}
variable"project" {
description="(optional)"type=stringdefault=null
}
variable"specific_reservation_required" {
description="(optional) - When set to true, only VMs that target this reservation by name can\nconsume this reservation. Otherwise, it can be consumed by VMs with\naffinity for any reservation. Defaults to false."type=booldefault=null
}
variable"zone" {
description="(required) - The zone where the reservation is made."type=string
}
variable"specific_reservation" {
description="nested block: NestingList, min items: 1, max items: 1"type=set(object(
{
count =number
in_use_count =number
instance_properties =list(object(
{
guest_accelerators =list(object(
{
accelerator_count =number
accelerator_type =string
}
))
local_ssds =list(object(
{
disk_size_gb =number
interface =string
}
))
machine_type =string
min_cpu_platform =string
}
))
}
))
}
variable"timeouts" {
description="nested block: NestingSingle, min items: 0, max items: 0"type=set(object(
{
create =string
delete =string
update =string
}
))
default=[]
}
resource"google_compute_reservation""this" {
# description - (optional) is a type of stringdescription=var.description# name - (required) is a type of stringname=var.name# project - (optional) is a type of stringproject=var.project# specific_reservation_required - (optional) is a type of boolspecific_reservation_required=var.specific_reservation_required# zone - (required) is a type of stringzone=var.zonedynamic"specific_reservation" {
for_each=var.specific_reservationcontent {
# count - (required) is a type of numbercount=specific_reservation.value["count"]
dynamic"instance_properties" {
for_each=specific_reservation.value.instance_propertiescontent {
# machine_type - (required) is a type of stringmachine_type=instance_properties.value["machine_type"]
# min_cpu_platform - (optional) is a type of stringmin_cpu_platform=instance_properties.value["min_cpu_platform"]
dynamic"guest_accelerators" {
for_each=instance_properties.value.guest_acceleratorscontent {
# accelerator_count - (required) is a type of numberaccelerator_count=guest_accelerators.value["accelerator_count"]
# accelerator_type - (required) is a type of stringaccelerator_type=guest_accelerators.value["accelerator_type"]
}
}
dynamic"local_ssds" {
for_each=instance_properties.value.local_ssdscontent {
# disk_size_gb - (required) is a type of numberdisk_size_gb=local_ssds.value["disk_size_gb"]
# interface - (optional) is a type of stringinterface=local_ssds.value["interface"]
}
}
}
}
}
}
dynamic"timeouts" {
for_each=var.timeoutscontent {
# create - (optional) is a type of stringcreate=timeouts.value["create"]
# delete - (optional) is a type of stringdelete=timeouts.value["delete"]
# update - (optional) is a type of stringupdate=timeouts.value["update"]
}
}
}