Open away168 opened 1 month ago
Describe the bug A variable defined in the env0_template is being overwritten | specified in env0_environment that uses the template.
the plan shows drift of parameters that are not meant to be re-configured (e.g. regex, is_required, description
regex
is_required
description
~ resource "env0_environment" "default_projects" { id = "f29bfdca-1a77-49dd-b197-f2f0c4913a99" name = "Skunkworks Project" ~ variable_sets = [ - "69cfcac0-5135-4967-a9d5-c6166f216f4c", ] # (13 unchanged attributes hidden) ~ configuration { - description = "main project name for team" -> null ~ is_required = true -> false name = "team_name" - regex = "[a-zA-Z0-9-_]*" -> null # (6 unchanged attributes hidden) } }
To Reproduce
configuration
Expected behavior the env0_environment should not show drift.
Provider Version v1.19.1
Screenshots
Additional context Sample code:
resource "env0_template" "projects" { name = "Team Projects" type = "opentofu" description = "Project Factory for onboarding new teams" opentofu_version = "latest" repository = data.env0_template.this.repository path = "env0/projects" github_installation_id = data.env0_template.this.github_installation_id } resource "env0_template_project_assignment" "projects" { template_id = env0_template.projects.id project_id = data.env0_environment.this.project_id } resource "env0_configuration_variable" "team_name" { template_id = env0_template.projects.id name = "team_name" description = "main project name for team" is_required = true regex = "[a-zA-Z0-9-_]*" type = "terraform" } resource "env0_environment" "default_projects" { count = var.create_projects ? 1 : 0 name = "${var.default_team_name} Project" project_id = data.env0_environment.this.project_id template_id = env0_template.projects.id approve_plan_automatically = true is_remote_backend = true removal_strategy = "mark_as_archived" workspace = "${var.default_team_name}_project" configuration { name = "team_name" value = var.default_team_name type = "terraform" } depends_on = [env0_configuration_variable.team_name] }
re-opened. This is a different issue than the variable set issue. Will reviewe.
Describe the bug A variable defined in the env0_template is being overwritten | specified in env0_environment that uses the template.
the plan shows drift of parameters that are not meant to be re-configured (e.g.
regex
,is_required
,description
To Reproduce
configuration
variable that overrides the template variable.Expected behavior the env0_environment should not show drift.
Provider Version v1.19.1
Screenshots
Additional context Sample code: