56 lines
1.1 KiB
Terraform
56 lines
1.1 KiB
Terraform
variable "project_id" {
|
|
description = "The ID of the project."
|
|
type = string
|
|
}
|
|
|
|
variable "region" {
|
|
description = "The region for the resources."
|
|
type = string
|
|
default = "us-west1"
|
|
}
|
|
|
|
variable "zone" {
|
|
description = "The zone for the resources."
|
|
type = string
|
|
default = "us-west1-a"
|
|
}
|
|
|
|
variable "network_name" {
|
|
description = "The name of the network."
|
|
type = string
|
|
default = "dom-lab-network"
|
|
}
|
|
|
|
variable "subnets" {
|
|
description = "A list of subnets to create."
|
|
|
|
type = list(object({
|
|
name = string
|
|
cidr = string
|
|
region = string
|
|
}))
|
|
|
|
default = [{
|
|
name = "waw-default"
|
|
cidr = "192.168.16.0/24"
|
|
region = "us-west1"
|
|
}]
|
|
|
|
validation {
|
|
condition = var.subnets[0].region != null
|
|
error_message = "The region for the first subnet must be specified."
|
|
}
|
|
}
|
|
|
|
variable "ssh" {
|
|
description = "SSH Key(s) definition"
|
|
type = list(object({
|
|
public_key = string
|
|
ssh_user = string
|
|
}))
|
|
default = [{
|
|
public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1Z96CGdoNnbazs89cdnDLDdju6UtuKAZctEAmnEaAC"
|
|
ssh_user = "slawek@1password"
|
|
}]
|
|
}
|