Skip to content

Commit

Permalink
random folder names
Browse files Browse the repository at this point in the history
  • Loading branch information
imrannayer committed Apr 3, 2024
1 parent 2498965 commit 62407e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/hierarchical-firewall-policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ module "firewal_policy" {
}

module "firewal_policy_no_rule" {
source = "terraform-google-modules/network/google//modules/hierarchical-firewall-policy"
version = "~> 9.0"
source = "terraform-google-modules/network/google//modules/hierarchical-firewall-policy"
version = "~> 9.0"

parent_node = "folders/${var.folder1}"
policy_name = "${local.prefix}-firewall-policy-no-rules-${random_string.random_suffix.result}"
Expand Down
13 changes: 10 additions & 3 deletions test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@
* limitations under the License.
*/

resource "random_string" "random_suffix" {
length = 4
special = false
lower = true
upper = false
}

resource "google_folder" "folder1" {
display_name = "ci-network1"
display_name = "ci-network1-${random_string.random_suffix.result}"
parent = var.folder_id != null ? "folders/${var.folder_id}" : "organizations/${var.org_id}"
}

resource "google_folder" "folder2" {
display_name = "ci-network2"
display_name = "ci-network2-${random_string.random_suffix.result}"
parent = var.folder_id != null ? "folders/${var.folder_id}" : "organizations/${var.org_id}"
}

resource "google_folder" "folder3" {
display_name = "ci-network3"
display_name = "ci-network3-${random_string.random_suffix.result}"
parent = var.folder_id != null ? "folders/${var.folder_id}" : "organizations/${var.org_id}"
}

Expand Down

0 comments on commit 62407e4

Please sign in to comment.