Skip to content

Commit

Permalink
Chore: Add random string to gcp creds (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
elbaz committed May 11, 2022
1 parent 6db265e commit 8b35d86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tests/integration/015_gcp_credentials/expected_outputs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
{
"gcp_cred_name": "test gcp credentials 1",
"gcp_cred_name_with_project_id": "Test GCP credentials with project_id 2"
}
12 changes: 10 additions & 2 deletions tests/integration/015_gcp_credentials/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
provider "random" {}

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

resource "env0_gcp_credentials" "gcp_cred" {
name = "test gcp credentials 1"
name = "test gcp credentials 1-${random_string.random.result}"
service_account_key = "service account key example"
}

Expand All @@ -8,7 +16,7 @@ data "env0_gcp_credentials" "gcp_cred" {
}

resource "env0_gcp_credentials" "gcp_cred_with_project_id" {
name = "Test GCP credentials with project_id 2"
name = "Test GCP credentials with project_id 2-${random_string.random.result}"
service_account_key = "example service_account_key"
project_id = "example project id"
}
Expand Down

0 comments on commit 8b35d86

Please sign in to comment.