2020-05-10 04:00:18 -07:00
/ * *
2022-01-01 06:52:31 -08:00
* Copyright 2022 Google LLC
2020-05-10 04:00:18 -07:00
*
* Licensed under the Apache License , Version 2 . 0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* http : //www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing , software
* distributed under the License is distributed on an " AS IS " BASIS ,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied .
* See the License for the specific language governing permissions and
* limitations under the License .
* /
variable " boot_commands " {
2022-01-31 01:45:34 -08:00
description = " List of cloud-init `bootcmd`s. "
2020-05-10 04:00:18 -07:00
type = list ( string )
default = [ ]
}
variable " cloud_config " {
description = " Cloud config template path. If provided, takes precedence over all other arguments. "
type = string
default = null
}
variable " config_variables " {
2022-01-31 01:45:34 -08:00
description = " Additional variables used to render the template passed via `cloud_config`. "
2020-05-10 04:00:18 -07:00
type = map ( any )
default = { }
}
variable " container_args " {
2022-01-31 01:45:34 -08:00
description = " Arguments for container. "
2020-05-10 04:00:18 -07:00
type = string
default = " "
}
variable " container_image " {
description = " Container image. "
type = string
}
variable " container_name " {
2022-01-31 01:45:34 -08:00
description = " Name of the container to be run. "
2020-05-10 04:00:18 -07:00
type = string
default = " container "
}
variable " container_volumes " {
2022-01-31 01:45:34 -08:00
description = " List of volumes. "
2020-05-10 04:00:18 -07:00
type = list ( object ( {
host = string ,
container = string
} ) )
default = [ ]
}
variable " docker_args " {
2022-01-31 01:45:34 -08:00
description = " Extra arguments to be passed for docker. "
2020-05-10 04:00:18 -07:00
type = string
default = null
}
variable " file_defaults " {
description = " Default owner and permissions for files. "
type = object ( {
owner = string
permissions = string
} )
default = {
owner = " root "
permissions = " 0644 "
}
}
variable " files " {
description = " Map of extra files to create on the instance, path as key. Owner and permissions will use defaults if null. "
type = map ( object ( {
content = string
owner = string
permissions = string
} ) )
default = { }
}
variable " gcp_logging " {
2022-01-31 01:45:34 -08:00
description = " Should container logs be sent to Google Cloud Logging. "
2020-05-10 04:00:18 -07:00
type = bool
default = true
}
variable " run_commands " {
2022-01-31 01:45:34 -08:00
description = " List of cloud-init `runcmd`s. "
2020-05-10 04:00:18 -07:00
type = list ( string )
default = [ ]
}
variable " users " {
description = " List of usernames to be created. If provided, first user will be used to run the container. "
type = list ( object ( {
username = string ,
uid = number ,
} ) )
default = [
]
}
2020-06-03 00:27:10 -07:00
variable " authenticate_gcr " {
description = " Setup docker to pull images from private GCR. Requires at least one user since the token is stored in the home of the first user defined. "
type = bool
default = false
}