Skip to content

Commit

Permalink
add harness test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber committed Oct 22, 2024
1 parent 71e23fe commit 8902a73
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/012_environment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,27 @@ resource "env0_environment" "environment-without-template" {
}
}

data "env0_template" "gitlab_template" {
name = "Gitlab Integrated Template"
}

resource "env0_environment" "environment-without-template-start-with-no-vcs" {
name = "start-with-non-vsc-${random_string.random.result}"

auto_deploy_on_path_changes_only = var.second_run ? true : false
deploy_on_push = var.second_run ? true : false
run_plan_on_pull_requests = var.second_run ? true : false

without_template_settings {
type = "opentofu"
is_gitlab = var.second_run ? true : false
repository = data.env0_template.gitlab_template.repository
token_id = data.env0_template.gitlab_template.token_id
token_name = data.env0_template.gitlab_template.token_name
opentofu_version = "latest"
}
}

resource "env0_environment" "inactive" {
depends_on = [env0_template_project_assignment.assignment]
force_destroy = true
Expand Down

0 comments on commit 8902a73

Please sign in to comment.