* test: add e2e tests Spin up GCP resources for testing dynamic host catalogs. The resources are tested with tests that focus on credential changes and rotation for host catalog and host set creation and updates using labels. - The tests all depend on each other so they need to run in order. - The test can also only be executed locally for now. - The resources are cleaned up after the test as part of the test.
32 lines
834 B
Terraform
32 lines
834 B
Terraform
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
output "client_email" {
|
|
value = google_service_account.test_service_account.email
|
|
}
|
|
|
|
output "private_keys" {
|
|
value = [for key in google_service_account_key.test_service_account_keys : jsondecode(base64decode(key.private_key)).private_key]
|
|
sensitive = true
|
|
}
|
|
|
|
output "private_key_ids" {
|
|
value = [for key in google_service_account_key.test_service_account_keys : chomp(reverse(split("/", key.id))[0])]
|
|
sensitive = true
|
|
}
|
|
|
|
output "instance_ids" {
|
|
value = google_compute_instance.instances.*.id
|
|
}
|
|
|
|
output "instance_tags" {
|
|
value = {
|
|
for instance in google_compute_instance.instances : instance.id => instance.tags
|
|
}
|
|
}
|
|
|
|
output "instance_labels" {
|
|
value = {
|
|
for instance in google_compute_instance.instances : instance.id => instance.labels
|
|
}
|
|
} |