Skip to content

Google Cloud

Google Cloud Project

resource "google_project" "name" {
...
}
AttributeDescription

Regions regions

type: []string

The regions infrastructure can be provisioned into.

regions = [“westeurope”]

Services services

type: []string

The services to allow access to.

services = [“compute.googleapis.com”]

Labels labels

type: map[string]string

Labels to add to the project.

labels = {
key = “value”
}

Users user

type: []block User

Users that will be created within the project.

user “admin” {
roles = [
"roles/editor"

] } | |

ServiceAccounts service_account

type: []block ServiceAccount

|

Service Accounts that will be created within the project.

service_account “admin” {
roles = [
“roles/editor”
]
}
| |

ProjectID project_id

type: string

| Output parameters | |

ProjectName project_name

type: string

| |

These attributes are computed when the config is parsed and applied, and are
therefore only known at parsetime or runtime.

AttributeDescription

Meta ID meta.id

string

The full ID of the resource e.g. resource.type.name.
This is computed from the full resource path:

// given the following resource
resource “container” “ubuntu” {
}

// the resulting id will be resource.container.ubuntu | |

Meta Type meta.type

string

|

The type of the resource.
This taken from the type label of the resource definition.

// given the following resource
resource “container” “ubuntu” {
…
}

// the resulting type will be container

| |

Meta Name meta.name

string

|

The name of the resource.
This taken from the name label of the resource definition.

// given the following resource
resource “container” “ubuntu” {
…
}

// the resulting name will be ubuntu

|


\


Google Cloud User

resource "google_project" "name" {
user "name" {
...
}
}
AttributeDescription

Name name required


type: string

The username of the user.

user “username” {
}

Roles roles

type: []string

The roles that will be assigned to the user.

roles = [“roles/editor”]

Email email

type: string

Output parameters

Password password

type: string

These attributes are computed when the config is parsed and applied, and are
therefore only known at parsetime or runtime.


\


Google Cloud Service Account

resource "google_project" "name" {
service_account "name" {
...
}
}
AttributeDescription

Name name required


type: string

The name of the service account.

service_account “name” {
}

Roles roles

type: []string

The roles that will be assigned to the service account.

roles = [“Owner”]

Email email

type: string

Output parameters

Key key

type: string

These attributes are computed when the config is parsed and applied, and are
therefore only known at parsetime or runtime.