Skip to content

Commit

Permalink
add random names to integration test 012
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber committed May 24, 2022
1 parent 0327279 commit 0cd459a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tests/integration/012_environment/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
provider "random" {}

resource "random_string" "random" {
length = 8
special = false
min_lower = 8
}

resource "env0_project" "test_project" {
name = "Test-Project-for-environment"
name = "Test-Project-for-environment-${random_string.random.result}"
force_destroy = true
}

resource "env0_template" "template" {
name = "Template for environment resource"
name = "Template for environment resource-${random_string.random.result}"
type = "terraform"
repository = "https://github.com/env0/templates"
path = "misc/null-resource"
Expand All @@ -13,7 +21,7 @@ resource "env0_template" "template" {

resource "env0_environment" "example" {
force_destroy = true
name = "environment"
name = "environment-${random_string.random.result}"
project_id = env0_project.test_project.id
template_id = env0_template.template.id
wait_for = "FULLY_DEPLOYED"
Expand All @@ -31,7 +39,7 @@ data "env0_configuration_variable" "env_config_variable" {
}

resource "env0_template" "terragrunt_template" {
name = "Terragrunt template for environment resource"
name = "Terragrunt template for environment resource-${random_string.random.result}"
type = "terragrunt"
repository = "https://github.com/env0/templates"
path = "misc/null-resource"
Expand All @@ -41,7 +49,7 @@ resource "env0_template" "terragrunt_template" {

resource "env0_environment" "terragrunt_environment" {
force_destroy = true
name = "environment"
name = "environment-${random_string.random.result}"
project_id = env0_project.test_project.id
template_id = env0_template.terragrunt_template.id
approve_plan_automatically = true
Expand Down

0 comments on commit 0cd459a

Please sign in to comment.