gcp_zone
variable has no type36 default = "debian-cloud/debian-11"
37}
38
39variable "gcp_zone" {40 description = "GCP zone"
41 default = "us-west1-b"
42}
image
variable has no type31 default = "gcp_instance"
32}
33
34variable "image" {35 description = "Image to build instance from"
36 default = "debian-cloud/debian-11"
37}
instance_name
variable has no type26 default = "n1-standard-1"
27}
28
29variable "instance_name" {30 description = "GCP instance name"
31 default = "gcp_instance"
32}
machine_type
variable has no type21 region = "${var.gcp_region}"
22}
23
24variable "machine_type" {25 description = "GCP machine type"
26 default = "n1-standard-1"
27}
gcp_credentials
variable has no type11 default = "us-west1"
12}
13
14variable "gcp_credentials" {15 description = "GCP credentials needed by Google provider"
16}
17
gcp_region
variable has no type 6 description = "GCP project name"
7}
8
9variable "gcp_region" {10 description = "GCP region"
11 default = "us-west1"
12}
gcp_project
variable has no type 2 required_version = ">= 0.15.1"
3}
4
5variable "gcp_project" { 6 description = "GCP project name"
7}
8
name
variable has no type13 default = "t2.micro"
14}
15
16variable "name" {17 description = "Name Tag"
18 default = "Provisioned by Terraform"
19}
instance_type
variable has no type 8 default = "ami-2e1ef954"
9}
10
11variable "instance_type" {12 description = "EC2 instance type to provision"
13 default = "t2.micro"
14}
ami_id
variable has no type 3 default = "eu-west-1"
4}
5
6variable "ami_id" { 7 description = "AMI's ID to provision"
8 default = "ami-2e1ef954"
9}
aws_region
variable has no type 1variable "aws_region" { 2 description = "AWS region"
3 default = "eu-west-1"
4}
Description
Since type is optional value, it is not always necessary to declare it. This issue is useful if you want to force declaration of a type. See https://www.terraform.io/docs/configuration/variables.html#type-constraints for more details about types.
Example:
variable "no_type" {
default = "value"
}
variable "enabled" {
default = false
description = "This is description"
type = bool
}