You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a module I use to create all of my projects and environments. My environments sub-module looks like this:
data "env0_template" "this" {
name = var.template
}
data "env0_project" "this" {
name = var.project
}
resource "env0_environment" "this" {
name = var.name
project_id = data.env0_project.this.id
template_id = data.env0_template.this.id
workspace = var.workspace == "---" ? var.name : var.workspace
approve_plan_automatically = var.approve_plan_automatically
deploy_on_push = var.deploy_on_push
force_destroy = var.force_destroy
run_plan_on_pull_requests = var.run_plan_on_pull_requests
dynamic "configuration" {
for_each = var.configuration
content {
name = configuration.key
value = configuration.value
type = "terraform"
}
}
}
I have recently create a template that has HCL formatted variables. When I create the environment by hand I can input a multi-line list and everything is good. How can I achieve the same thing with the terraform provider? So far I have tried to something like this:
But when env0 runs that deployment the format is switch to String and I think the formatting is getting in the way.
I have tried a few things including creating a second dynamic configuration block and setting format = "HCL" or schema_format= "HCL" but got an error about it not being appropriate or valid or something.
How can I achieve this? The documentation doesn't have an example.
The text was updated successfully, but these errors were encountered:
I have a module I use to create all of my projects and environments. My environments sub-module looks like this:
I have recently create a template that has HCL formatted variables. When I create the environment by hand I can input a multi-line list and everything is good. How can I achieve the same thing with the terraform provider? So far I have tried to something like this:
But when env0 runs that deployment the format is switch to String and I think the formatting is getting in the way.
I have tried a few things including creating a second dynamic configuration block and setting format = "HCL" or schema_format= "HCL" but got an error about it not being appropriate or valid or something.
How can I achieve this? The documentation doesn't have an example.
The text was updated successfully, but these errors were encountered: