test: add e2e tests (#21)

* 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.
This commit is contained in:
Elim Tsiagbey authored and GitHub committed 2024-11-25 11:17:01 -05:00
1 parent baa2c7a2e7
commit d3a155bd3f
11 files changed
+1274 -103

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
data "google_client_openid_userinfo" "current" {}
variable "labels" {
type = map(string)
default = {
repository = "boundary-plugin-gcp"
purpose = "testing"
}
}
variable "project_id" {
type = string
}
variable "region" {
type = string
}
variable "zone" {
type = string
}
variable "num_instances" {
type = number
default = 3
}
variable "service_account_email" {
type = string
default = null
}
variable "rolesList" {
type = list(string)
description = "List of roles to assign to the service account"
default = ["roles/compute.viewer","roles/iam.serviceAccountKeyAdmin"]
}
variable "user_prefix" {
type = string
default = "boundary-gcp-plugin"
}
variable "num_service_account_keys" {
type = number
default = 6
}