Skip to content

Commit

Permalink
add execution_environment as a tf variable
Browse files Browse the repository at this point in the history
Signed-off-by: James Rawlings <[email protected]>
  • Loading branch information
rawlingsj committed Jul 26, 2023
1 parent 8faf29f commit c4087d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ No modules.
|------|-------------|------|---------|:--------:|
| <a name="input_base_image"></a> [base\_image](#input\_base\_image) | The base image that will be used to build the container image. | `string` | `"cgr.dev/chainguard/static:latest-glibc"` | no |
| <a name="input_env"></a> [env](#input\_env) | A map of custom environment variables (e.g. key=value) | `map` | `{}` | no |
| <a name="input_execution_environment"></a> [execution\_environment](#input\_execution\_environment) | The execution environment to use for the job. | `string` | `""` | no |
| <a name="input_importpath"></a> [importpath](#input\_importpath) | The import path that contains the cron application. | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | Name to prefix to created resources. | `any` | n/a | yes |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The project that will host the cron job. | `string` | n/a | yes |
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ resource "google_cloud_run_v2_job" "job" {

template {
template {
service_account = var.service_account
execution_environment = var.execution_environment
service_account = var.service_account
containers {
image = ko_build.image.image_ref

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ variable "secret_env" {
default = {}
description = "A map of secrets to mount as environment variables from Google Secrets Manager (e.g. secret_key=secret_name)"
}

variable "execution_environment" {
default = ""
type = string
description = "The execution environment to use for the job."
}

0 comments on commit c4087d0

Please sign in to comment.