Skip to content

Commit

Permalink
Fix backend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wawrzek committed Jan 22, 2025
1 parent 786261a commit 7ab4656
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
11 changes: 11 additions & 0 deletions backend/tests/main.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,14 @@ run "apply" {
network-proxy-cidr = run.setup.proxy-cidr
}
}

run "apply_sa" {
command = apply
variables {
name = "test51"
network-id = run.setup.net
network-subnet-id = run.setup.back-id
network-proxy-cidr = run.setup.proxy-cidr
sa-email = run.setup.sa-email
}
}
18 changes: 16 additions & 2 deletions backend/tests/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@ module "network" {
name = "test44"
}

output "net" {
value = module.network.network-id
module "sa" {
source = "../../../service_account"
name = "test44"
display_name = "SA for tofu backend test"
roles = [
"roles/logging.logWriter",
"roles/monitoring.metricWriter"
]
}

output "back-id" {
value = module.network.subnet-id-backend
}

output "net" {
value = module.network.network-id
}

output "proxy-cidr" {
value = module.network.subnet-cidr-proxy
}

output "sa-email" {
value = module.sa.email
}

0 comments on commit 7ab4656

Please sign in to comment.