chore(e2e): Clean up enos variables (#6591)
* chore(e2e): No more required enos variables # Conflicts: # .github/workflows/enos-run.yml * CR
This commit is contained in:
1 parent
d4d40ecbb9
commit
843893c1c7
32 files changed
+467
-260
No files matched your search
@@ -87,16 +87,14 @@ jobs:
|
||||
ENOS_VAR_aws_ssh_keypair_name: ${{ github.event.repository.name }}-ci-ssh-key
|
||||
ENOS_VAR_aws_ssh_private_key_path: ./support/private_key.pem
|
||||
ENOS_VAR_local_boundary_dir: ./support/boundary
|
||||
ENOS_VAR_local_boundary_src_dir: ${{ github.workspace }}
|
||||
ENOS_VAR_local_boundary_ui_src_dir: ./support/src/boundary-ui
|
||||
ENOS_VAR_crt_bundle_path: ./support/boundary.zip
|
||||
ENOS_VAR_test_email: ${{ secrets.SERVICE_USER_EMAIL }}
|
||||
ENOS_VAR_boundary_edition: ${{ inputs.edition }}
|
||||
ENOS_VAR_boundary_docker_image_file: ./support/boundary_docker_image.tar
|
||||
ENOS_VAR_gcp_project_id: ${{ secrets.GCP_PROJECT_ID_CI }}
|
||||
ENOS_VAR_gcp_client_email: ${{ secrets.GCP_CLIENT_EMAIL_CI }}
|
||||
ENOS_VAR_gcp_private_key_id: ${{ secrets.GCP_PRIVATE_KEY_ID_CI }}
|
||||
ENOS_VAR_gcp_private_key: ${{ secrets.GCP_PRIVATE_KEY_CI }}
|
||||
ENOS_VAR_is_ci: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
@@ -261,12 +259,6 @@ jobs:
|
||||
|
||||
# redis
|
||||
sudo apt update && sudo apt install -y redis-tools mysql-client
|
||||
- name: Output Terraform version info
|
||||
run: |
|
||||
mkdir -p ./enos/terraform-plugin-cache
|
||||
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
|
||||
enos scenario check --chdir ./enos ${{ matrix.filter }} && \
|
||||
enos scenario exec --chdir ./enos ${{ matrix.filter }} --cmd "version"
|
||||
- name: Determine boundary version to test against previous worker version
|
||||
# Resolve the worker version from the previous release line.
|
||||
if: contains(matrix.filter, 'e2e_docker_base_with_worker_version')
|
||||
@@ -299,6 +291,12 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "ENOS_VAR_worker_version=$previous_version" >> "$GITHUB_ENV"
|
||||
- name: Output Terraform version info
|
||||
run: |
|
||||
mkdir -p ./enos/terraform-plugin-cache
|
||||
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
|
||||
enos scenario check --chdir ./enos ${{ matrix.filter }} && \
|
||||
enos scenario exec --chdir ./enos ${{ matrix.filter }} --cmd "version"
|
||||
- name: Run Enos scenario
|
||||
id: run
|
||||
# Continue once and retry
|
||||
|
||||
+10
-25
@@ -17,29 +17,23 @@ for further information regarding installation, execution, or composing Enos sce
|
||||
* Doormat
|
||||
```shell
|
||||
brew tap hashicorp/tap
|
||||
brew install hashicorp/tap/vault
|
||||
brew install hashicorp/tap/terraform
|
||||
brew install hashicorp/tap/enos
|
||||
brew install coreutils
|
||||
brew install hashicorp/tap/vault
|
||||
brew install enos coreutils jq
|
||||
|
||||
# Install doormat cli
|
||||
# (Optional)
|
||||
export ENOS_VAR_boundary_license=${license_key}
|
||||
|
||||
# Install doormat cli for AWS access
|
||||
brew tap hashicorp/security git@github.com:hashicorp/homebrew-security.git
|
||||
brew install hashicorp/security/doormat-cli
|
||||
|
||||
|
||||
#
|
||||
|
||||
```
|
||||
|
||||
* AWS access. HashiCorp Boundary developers should use Doormat.
|
||||
* An SSH keypair in the AWS region you wish to run the scenario. You can use
|
||||
doormat to login to the AWS console to create or upload an existing keypair.
|
||||
```shell
|
||||
# Create a SSH Key Pair
|
||||
ssh-keygen -t ed25519 -C "your_email@example.com"
|
||||
|
||||
# <https://doormat.hashicorp.services/>
|
||||
# Go to the console for the corresponding AWS account
|
||||
# Select the desired AWS region on the top-right
|
||||
# Go to EC2 -> Key Pairs -> Actions -> Import Key Pair -> Import public key file (.pub)
|
||||
# Note the name of the key pair
|
||||
```
|
||||
* Boundary CLI installed locally
|
||||
|
||||
### Enos Variables
|
||||
@@ -57,15 +51,6 @@ See [enos.vars.hcl](./enos.vars.hcl) for complete descriptions of each variable.
|
||||
You can either modify `enos.vars.hcl` directly or create your own copy at
|
||||
`enos-local.vars.hcl` which gets ignored by git.
|
||||
|
||||
### System File Modifications
|
||||
|
||||
For docker-based scenarios, you will need to modify `/etc/hosts` to include the
|
||||
following lines
|
||||
```
|
||||
127.0.0.1 localhost boundary
|
||||
127.0.0.1 localhost worker
|
||||
127.0.0.1 localhost vault
|
||||
```
|
||||
### AWS Credentials
|
||||
Copy the AWS Account credentials from doormat and set it in the terminal, where the enos commands are run.
|
||||
|
||||
|
||||
@@ -25,11 +25,13 @@ variable "boundary_license_path" {
|
||||
variable "aws_ssh_keypair_name" {
|
||||
description = "Name of the AWS EC2 keypair to use for SSH access"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "aws_ssh_private_key_path" {
|
||||
description = "Path to the private key file for the AWS EC2 keypair"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "worker_count" {
|
||||
|
||||
@@ -71,6 +71,10 @@ module "generate_aws_host_tag_vars" {
|
||||
source = "./modules/generate_aws_host_tag_vars"
|
||||
}
|
||||
|
||||
module "generate_docker_image_name" {
|
||||
source = "./modules/generate_docker_image_name"
|
||||
}
|
||||
|
||||
module "aws_iam_setup" {
|
||||
source = "./modules/aws_iam_setup"
|
||||
}
|
||||
@@ -221,3 +225,15 @@ module "gcp_target" {
|
||||
environment = var.environment
|
||||
enos_user = var.enos_user
|
||||
}
|
||||
|
||||
module "get_repo_root" {
|
||||
source = "./modules/get_repo_root"
|
||||
}
|
||||
|
||||
module "get_binary_path" {
|
||||
source = "./modules/get_binary_path"
|
||||
}
|
||||
|
||||
module "get_boundary_edition" {
|
||||
source = "./modules/get_boundary_edition"
|
||||
}
|
||||
@@ -28,6 +28,19 @@ scenario "e2e_aws_base_with_vault" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "find_azs" {
|
||||
module = module.aws_az_finder
|
||||
|
||||
@@ -42,12 +55,12 @@ scenario "e2e_aws_base_with_vault" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +73,7 @@ scenario "e2e_aws_base_with_vault" {
|
||||
|
||||
variables {
|
||||
path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +109,7 @@ scenario "e2e_aws_base_with_vault" {
|
||||
variables {
|
||||
boundary_binary_name = var.boundary_binary_name
|
||||
boundary_install_dir = local.boundary_install_dir
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : null
|
||||
boundary_license = step.read_license.license
|
||||
common_tags = local.tags
|
||||
controller_instance_type = var.controller_instance_type
|
||||
controller_count = var.controller_count
|
||||
@@ -164,13 +177,13 @@ scenario "e2e_aws_base_with_vault" {
|
||||
]
|
||||
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_vault"
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary_cluster.alb_boundary_api_addr
|
||||
auth_method_id = step.create_boundary_cluster.auth_method_id
|
||||
auth_login_name = step.create_boundary_cluster.auth_login_name
|
||||
auth_password = step.create_boundary_cluster.auth_password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_target.target_private_ips[0]
|
||||
target_user = "ubuntu"
|
||||
|
||||
@@ -28,6 +28,19 @@ scenario "e2e_aws_base" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "find_azs" {
|
||||
module = module.aws_az_finder
|
||||
|
||||
@@ -41,12 +54,12 @@ scenario "e2e_aws_base" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +72,7 @@ scenario "e2e_aws_base" {
|
||||
|
||||
variables {
|
||||
path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +109,7 @@ scenario "e2e_aws_base" {
|
||||
variables {
|
||||
boundary_binary_name = var.boundary_binary_name
|
||||
boundary_install_dir = local.boundary_install_dir
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : null
|
||||
boundary_license = step.read_license.license
|
||||
common_tags = local.tags
|
||||
controller_instance_type = var.controller_instance_type
|
||||
controller_count = var.controller_count
|
||||
@@ -142,13 +155,13 @@ scenario "e2e_aws_base" {
|
||||
]
|
||||
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base"
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary_cluster.alb_boundary_api_addr
|
||||
auth_method_id = step.create_boundary_cluster.auth_method_id
|
||||
auth_login_name = step.create_boundary_cluster.auth_login_name
|
||||
auth_password = step.create_boundary_cluster.auth_password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_target.target_private_ips[0]
|
||||
target_user = "ubuntu"
|
||||
|
||||
@@ -26,7 +26,6 @@ scenario "e2e_aws_rdp_base" {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
boundary_install_dir = abspath(var.boundary_install_dir)
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
ip_version = "4"
|
||||
|
||||
@@ -49,6 +48,23 @@ scenario "e2e_aws_rdp_base" {
|
||||
collocated_tag = "collocated"
|
||||
}
|
||||
|
||||
step "get_repo_root" {
|
||||
module = module.get_repo_root
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "find_azs" {
|
||||
module = module.aws_az_finder
|
||||
|
||||
@@ -87,7 +103,7 @@ scenario "e2e_aws_rdp_base" {
|
||||
|
||||
variables {
|
||||
path = local.build_path_linux[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +116,7 @@ scenario "e2e_aws_rdp_base" {
|
||||
|
||||
variables {
|
||||
path = local.build_path_windows[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
goos = "windows"
|
||||
build_target = "build"
|
||||
artifact_name = "boundary_windows"
|
||||
@@ -120,7 +136,7 @@ scenario "e2e_aws_rdp_base" {
|
||||
vpc_id = step.create_base_infra.vpc_id
|
||||
client_version = matrix.client
|
||||
boundary_cli_zip_path = step.build_boundary_windows.artifact_path
|
||||
boundary_src_path = local.local_boundary_src_dir
|
||||
boundary_src_path = step.get_repo_root.path
|
||||
github_token = var.github_token
|
||||
ip_version = local.ip_version
|
||||
vault_version = var.vault_version
|
||||
@@ -132,6 +148,8 @@ scenario "e2e_aws_rdp_base" {
|
||||
|
||||
variables {
|
||||
license_path = local.boundary_license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +211,7 @@ scenario "e2e_aws_rdp_base" {
|
||||
variables {
|
||||
boundary_binary_name = var.boundary_binary_name
|
||||
boundary_install_dir = local.boundary_install_dir
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_boundary_license.license : null
|
||||
boundary_license = step.read_boundary_license.license
|
||||
common_tags = local.tags
|
||||
controller_instance_type = var.controller_instance_type
|
||||
controller_count = var.controller_count
|
||||
@@ -310,12 +328,11 @@ scenario "e2e_aws_rdp_base" {
|
||||
|
||||
variables {
|
||||
test_package = ""
|
||||
debug_no_run = true
|
||||
alb_boundary_api_addr = step.create_boundary_cluster.alb_boundary_api_addr
|
||||
auth_method_id = step.create_boundary_cluster.auth_method_id
|
||||
auth_login_name = step.create_boundary_cluster.auth_login_name
|
||||
auth_password = step.create_boundary_cluster.auth_password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_user = "ubuntu"
|
||||
target_port = "22"
|
||||
|
||||
@@ -33,6 +33,19 @@ scenario "e2e_aws" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "find_azs" {
|
||||
module = module.aws_az_finder
|
||||
|
||||
@@ -46,12 +59,12 @@ scenario "e2e_aws" {
|
||||
}
|
||||
|
||||
step "read_boundary_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.boundary_license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +77,7 @@ scenario "e2e_aws" {
|
||||
|
||||
variables {
|
||||
path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +141,7 @@ scenario "e2e_aws" {
|
||||
variables {
|
||||
boundary_binary_name = var.boundary_binary_name
|
||||
boundary_install_dir = local.boundary_install_dir
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_boundary_license.license : null
|
||||
boundary_license = step.read_boundary_license.license
|
||||
common_tags = local.tags
|
||||
controller_instance_type = var.controller_instance_type
|
||||
controller_count = var.controller_count
|
||||
@@ -284,13 +297,13 @@ scenario "e2e_aws" {
|
||||
]
|
||||
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/aws"
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary_cluster.alb_boundary_api_addr
|
||||
auth_method_id = step.create_boundary_cluster.auth_method_id
|
||||
auth_login_name = step.create_boundary_cluster.auth_login_name
|
||||
auth_password = step.create_boundary_cluster.auth_password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
target_user = "ubuntu"
|
||||
target_port = "22"
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
|
||||
@@ -20,13 +20,26 @@ scenario "e2e_database" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,10 +140,10 @@ scenario "e2e_database" {
|
||||
]
|
||||
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/database"
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
boundary_license = step.read_license.license
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
target_user = "ubuntu"
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
aws_access_key_id = step.iam_setup.access_key_id
|
||||
|
||||
@@ -12,7 +12,6 @@ scenario "e2e_docker_base_connect" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -29,13 +28,26 @@ scenario "e2e_docker_base_connect" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +78,12 @@ scenario "e2e_docker_base_connect" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +99,7 @@ scenario "e2e_docker_base_connect" {
|
||||
network_name = [local.network_cluster]
|
||||
database_network = local.network_cluster
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,15 +122,14 @@ scenario "e2e_docker_base_connect" {
|
||||
step.create_host,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_connect"
|
||||
network_name = step.create_docker_network.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -13,7 +13,6 @@ scenario "e2e_docker_base_plus" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -30,13 +29,26 @@ scenario "e2e_docker_base_plus" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,12 +79,12 @@ scenario "e2e_docker_base_plus" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +100,7 @@ scenario "e2e_docker_base_plus" {
|
||||
network_name = [local.network_cluster]
|
||||
database_network = local.network_cluster
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "boundary-config-rate-limit.hcl"
|
||||
|
||||
}
|
||||
@@ -126,13 +138,11 @@ scenario "e2e_docker_base_plus" {
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_plus"
|
||||
controller_container_name = step.create_boundary.container_name
|
||||
network_name = step.create_docker_network.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -14,7 +14,6 @@ scenario "e2e_docker_base_with_gcp" {
|
||||
|
||||
locals {
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
gcp_private_key = var.gcp_private_key_path != null ? file(var.gcp_private_key_path) : var.gcp_private_key
|
||||
@@ -32,13 +31,26 @@ scenario "e2e_docker_base_with_gcp" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,12 +73,12 @@ scenario "e2e_docker_base_with_gcp" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +94,7 @@ scenario "e2e_docker_base_with_gcp" {
|
||||
network_name = [local.network_cluster]
|
||||
database_network = local.network_cluster
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,15 +123,14 @@ scenario "e2e_docker_base_with_gcp" {
|
||||
step.create_gcp_target
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/gcp"
|
||||
network_name = step.create_docker_network.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
gcp_host_set_filter1 = step.create_gcp_target.filter_label1
|
||||
gcp_host_set_filter2 = step.create_gcp_target.filter_label2
|
||||
gcp_private_key_id = var.gcp_private_key_id
|
||||
|
||||
@@ -12,7 +12,6 @@ scenario "e2e_docker_base_with_vault" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -29,13 +28,26 @@ scenario "e2e_docker_base_with_vault" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +78,12 @@ scenario "e2e_docker_base_with_vault" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +99,7 @@ scenario "e2e_docker_base_with_vault" {
|
||||
network_name = [local.network_cluster]
|
||||
database_network = local.network_cluster
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,15 +145,14 @@ scenario "e2e_docker_base_with_vault" {
|
||||
step.create_host,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_vault"
|
||||
network_name = step.create_docker_network.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -12,11 +12,8 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
image_base_name = var.boundary_edition == "oss" ? "hashicorp/boundary" : "hashicorp/boundary-enterprise"
|
||||
worker_version_tag = var.worker_version != null ? var.worker_version : "latest"
|
||||
|
||||
network_cluster = "e2e_cluster"
|
||||
network_host = "e2e_host"
|
||||
@@ -33,13 +30,26 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,12 +94,12 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +116,7 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
network_name = [local.network_cluster, local.network_database]
|
||||
database_network = local.network_database
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,10 +145,17 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
|
||||
locals {
|
||||
egress_tag = "egress"
|
||||
worker_tag = local.worker_version_tag != "latest" && var.boundary_edition != "oss" ? "${local.worker_version_tag}-ent" : local.worker_version_tag
|
||||
}
|
||||
|
||||
step "generate_docker_image_name" {
|
||||
module = module.generate_docker_image_name
|
||||
|
||||
variables {
|
||||
repository = "hashicorp/boundary"
|
||||
image_tag = var.worker_version
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
step "create_worker" {
|
||||
module = module.docker_worker
|
||||
@@ -149,8 +166,8 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
step.create_boundary
|
||||
]
|
||||
variables {
|
||||
image_name = "${local.image_base_name}:${local.worker_tag}"
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
image_name = step.generate_docker_image_name.image_name
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "worker-config.hcl"
|
||||
container_name = "worker"
|
||||
initial_upstream = step.create_boundary.upstream_address
|
||||
@@ -169,15 +186,14 @@ scenario "e2e_docker_base_with_worker_version" {
|
||||
step.create_worker,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
|
||||
network_name = step.create_docker_network_cluster.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -12,7 +12,6 @@ scenario "e2e_docker_base_with_worker" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -31,13 +30,27 @@ scenario "e2e_docker_base_with_worker" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,12 +95,12 @@ scenario "e2e_docker_base_with_worker" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +117,7 @@ scenario "e2e_docker_base_with_worker" {
|
||||
network_name = [local.network_cluster, local.network_database]
|
||||
database_network = local.network_database
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +158,7 @@ scenario "e2e_docker_base_with_worker" {
|
||||
]
|
||||
variables {
|
||||
image_name = step.build_boundary_docker_image.image_name
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "worker-config.hcl"
|
||||
container_name = "worker"
|
||||
initial_upstream = step.create_boundary.upstream_address
|
||||
@@ -164,15 +177,14 @@ scenario "e2e_docker_base_with_worker" {
|
||||
step.create_worker,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
|
||||
network_name = step.create_docker_network_cluster.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -12,7 +12,6 @@ scenario "e2e_docker_base" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -29,13 +28,26 @@ scenario "e2e_docker_base" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +78,12 @@ scenario "e2e_docker_base" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +99,7 @@ scenario "e2e_docker_base" {
|
||||
network_name = [local.network_cluster]
|
||||
database_network = local.network_cluster
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,15 +122,14 @@ scenario "e2e_docker_base" {
|
||||
step.create_host,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base"
|
||||
network_name = step.create_docker_network.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -12,7 +12,6 @@ scenario "e2e_docker_worker_registration_controller_led" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -31,13 +30,27 @@ scenario "e2e_docker_worker_registration_controller_led" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,12 +95,12 @@ scenario "e2e_docker_worker_registration_controller_led" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +117,7 @@ scenario "e2e_docker_worker_registration_controller_led" {
|
||||
network_name = [local.network_cluster, local.network_database]
|
||||
database_network = local.network_database
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "boundary-config.hcl"
|
||||
}
|
||||
}
|
||||
@@ -159,7 +172,7 @@ scenario "e2e_docker_worker_registration_controller_led" {
|
||||
]
|
||||
variables {
|
||||
image_name = step.build_boundary_docker_image.image_name
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "worker-config-controller-led.hcl"
|
||||
container_name = "worker"
|
||||
initial_upstream = step.create_boundary.upstream_address
|
||||
@@ -179,15 +192,14 @@ scenario "e2e_docker_worker_registration_controller_led" {
|
||||
step.create_worker,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
|
||||
network_name = step.create_docker_network_cluster.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -12,7 +12,6 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_src_dir = var.local_boundary_src_dir != null ? abspath(var.local_boundary_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -31,13 +30,27 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_binary" {
|
||||
skip_step = local.local_boundary_dir != null ? true : false
|
||||
module = module.get_binary_path
|
||||
|
||||
variables {
|
||||
name = "boundary"
|
||||
}
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +62,6 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
step "create_docker_network_database" {
|
||||
module = module.docker_network
|
||||
variables {
|
||||
@@ -83,12 +95,12 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +117,7 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
network_name = [local.network_cluster, local.network_database]
|
||||
database_network = local.network_database
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "boundary-config.hcl"
|
||||
}
|
||||
}
|
||||
@@ -147,7 +159,7 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
]
|
||||
variables {
|
||||
image_name = step.build_boundary_docker_image.image_name
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "worker-config-worker-led.hcl"
|
||||
container_name = "worker"
|
||||
initial_upstream = step.create_boundary.upstream_address
|
||||
@@ -195,15 +207,14 @@ scenario "e2e_docker_worker_registration_worker_led" {
|
||||
step.check_worker_health,
|
||||
]
|
||||
variables {
|
||||
is_ci = var.is_ci
|
||||
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
|
||||
network_name = step.create_docker_network_cluster.network_name
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_src_dir = local.local_boundary_src_dir
|
||||
local_boundary_dir = local.local_boundary_dir != null ? local.local_boundary_dir : step.get_boundary_binary.path
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
@@ -17,8 +17,6 @@ scenario "e2e_ui_aws" {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
boundary_install_dir = abspath(var.boundary_install_dir)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_ui_src_dir = var.local_boundary_ui_src_dir != null ? abspath(var.local_boundary_ui_src_dir) : null
|
||||
build_path = {
|
||||
"local" = "/tmp",
|
||||
"crt" = var.crt_bundle_path == null ? null : abspath(var.crt_bundle_path)
|
||||
@@ -30,6 +28,10 @@ scenario "e2e_ui_aws" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "find_azs" {
|
||||
module = module.aws_az_finder
|
||||
|
||||
@@ -43,12 +45,12 @@ scenario "e2e_ui_aws" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +63,7 @@ scenario "e2e_ui_aws" {
|
||||
|
||||
variables {
|
||||
path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +103,7 @@ scenario "e2e_ui_aws" {
|
||||
variables {
|
||||
boundary_binary_name = var.boundary_binary_name
|
||||
boundary_install_dir = local.boundary_install_dir
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : null
|
||||
boundary_license = step.read_license.license
|
||||
common_tags = local.tags
|
||||
controller_instance_type = var.controller_instance_type
|
||||
controller_count = var.controller_count
|
||||
@@ -207,13 +209,10 @@ scenario "e2e_ui_aws" {
|
||||
]
|
||||
|
||||
variables {
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary_cluster.alb_boundary_api_addr
|
||||
auth_method_id = step.create_boundary_cluster.auth_method_id
|
||||
auth_login_name = step.create_boundary_cluster.auth_login_name
|
||||
auth_password = step.create_boundary_cluster.auth_password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_ui_src_dir = local.local_boundary_ui_src_dir
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_targets_with_tag.target_private_ips[0]
|
||||
target_user = "ubuntu"
|
||||
|
||||
@@ -11,8 +11,6 @@ scenario "e2e_ui_docker" {
|
||||
|
||||
locals {
|
||||
aws_ssh_private_key_path = var.aws_ssh_private_key_path != null ? abspath(var.aws_ssh_private_key_path) : null
|
||||
local_boundary_dir = var.local_boundary_dir != null ? abspath(var.local_boundary_dir) : null
|
||||
local_boundary_ui_src_dir = var.local_boundary_ui_src_dir != null ? abspath(var.local_boundary_ui_src_dir) : null
|
||||
boundary_docker_image_file = abspath(var.boundary_docker_image_file)
|
||||
license_path = abspath(var.boundary_license_path != null ? var.boundary_license_path : joinpath(path.root, "./support/boundary.hclic"))
|
||||
|
||||
@@ -29,13 +27,17 @@ scenario "e2e_ui_docker" {
|
||||
}, var.tags)
|
||||
}
|
||||
|
||||
step "get_boundary_edition" {
|
||||
module = module.get_boundary_edition
|
||||
}
|
||||
|
||||
step "build_boundary_docker_image" {
|
||||
module = matrix.builder == "crt" ? module.build_boundary_docker_crt : module.build_boundary_docker_local
|
||||
|
||||
variables {
|
||||
path = matrix.builder == "crt" ? local.boundary_docker_image_file : ""
|
||||
cli_build_path = local.build_path[matrix.builder]
|
||||
edition = var.boundary_edition
|
||||
edition = step.get_boundary_edition.edition
|
||||
ui_build_override = var.ui_build_override
|
||||
}
|
||||
}
|
||||
@@ -67,12 +69,12 @@ scenario "e2e_ui_docker" {
|
||||
}
|
||||
|
||||
step "read_license" {
|
||||
skip_step = var.boundary_edition == "oss"
|
||||
module = module.read_license
|
||||
|
||||
variables {
|
||||
license_path = local.license_path
|
||||
license = var.boundary_license
|
||||
edition = step.get_boundary_edition.edition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +90,7 @@ scenario "e2e_ui_docker" {
|
||||
network_name = [local.network_cluster]
|
||||
database_network = local.network_cluster
|
||||
postgres_address = step.create_boundary_database.address
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +130,7 @@ scenario "e2e_ui_docker" {
|
||||
]
|
||||
variables {
|
||||
image_name = step.build_boundary_docker_image.image_name
|
||||
boundary_license = var.boundary_edition != "oss" ? step.read_license.license : ""
|
||||
boundary_license = step.read_license.license
|
||||
config_file = "worker-config.hcl"
|
||||
container_name = "worker"
|
||||
initial_upstream = step.create_boundary.upstream_address
|
||||
@@ -159,13 +161,10 @@ scenario "e2e_ui_docker" {
|
||||
step.create_ldap_server,
|
||||
]
|
||||
variables {
|
||||
debug_no_run = var.e2e_debug_no_run
|
||||
alb_boundary_api_addr = step.create_boundary.address
|
||||
auth_method_id = step.create_boundary.auth_method_id
|
||||
auth_login_name = step.create_boundary.login_name
|
||||
auth_password = step.create_boundary.password
|
||||
local_boundary_dir = local.local_boundary_dir
|
||||
local_boundary_ui_src_dir = local.local_boundary_ui_src_dir
|
||||
aws_ssh_private_key_path = step.generate_ssh_key.private_key_path
|
||||
target_address = step.create_host.address
|
||||
target_port = step.create_host.port
|
||||
|
||||
+6
-24
@@ -94,18 +94,6 @@ variable "local_boundary_dir" {
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "local_boundary_src_dir" {
|
||||
description = "Path to local boundary source code directory"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "local_boundary_ui_src_dir" {
|
||||
description = "Path to local boundary-ui source code directory"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "crt_bundle_path" {
|
||||
description = "Path to CRT generated boundary bundle"
|
||||
type = string
|
||||
@@ -148,12 +136,6 @@ variable "local_build_target" {
|
||||
default = "build-ui build"
|
||||
}
|
||||
|
||||
variable "e2e_debug_no_run" {
|
||||
description = "If set, this will prevent test suites from running"
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "docker_mirror" {
|
||||
description = "URL to the docker repository"
|
||||
type = string
|
||||
@@ -166,12 +148,6 @@ variable "boundary_binary_name" {
|
||||
default = "boundary"
|
||||
}
|
||||
|
||||
variable "boundary_edition" {
|
||||
description = "Edition of boundary build"
|
||||
type = string
|
||||
default = "oss"
|
||||
}
|
||||
|
||||
variable "boundary_license_path" {
|
||||
description = "Boundary license path"
|
||||
type = string
|
||||
@@ -286,3 +262,9 @@ variable "worker_version" {
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "is_ci" {
|
||||
description = "Whether the tests are running in CI"
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
+1
-26
@@ -7,18 +7,6 @@
|
||||
// Recommended to copy this file to enos-local.vars.hcl and modify the values
|
||||
// there to avoid accidentally committing sensitive information.
|
||||
|
||||
// ==============================================================================
|
||||
// REQUIRED VARIABLES
|
||||
// ==============================================================================
|
||||
// Build edition
|
||||
// If using community edition, set to "oss"
|
||||
// If using enterprise edition, set to "enterprise"
|
||||
// boundary_edition = "oss"
|
||||
|
||||
// Prevents the end-to-end test suites from running when starting scenarios.
|
||||
// Recommend setting this to true unless running in CI.
|
||||
// e2e_debug_no_run = true
|
||||
|
||||
// ==============================================================================
|
||||
// OPTIONAL VARIABLES
|
||||
// ==============================================================================
|
||||
@@ -59,19 +47,6 @@
|
||||
// The GCP client_email used to authenticate with GCP
|
||||
// gcp_client_email = "my-gcp-client-email"
|
||||
|
||||
// The directory that contains the copy of the boundary cli that the e2e tests
|
||||
// will use in CI. Only needed if e2e_debug_no_run = false.
|
||||
// local_boundary_dir = "/Users/<user>/.go/bin"
|
||||
|
||||
// The directory that contains the source code of boundary/boundary-enterprise.
|
||||
// This is used in docker scenarios in CI in order to mount the source code into
|
||||
// the container. Only needed if e2e_debug_no_run = false.
|
||||
// local_boundary_src_dir = "/Users/<user>/Developer/boundary"
|
||||
|
||||
// The directory that contains the source code of boundary-ui. This is used for
|
||||
// front-end e2e testing (UI scenarios) in CI. Only needed if e2e_debug_no_run = false.
|
||||
// local_boundary_ui_src_dir = "/Users/<user>/Developer/boundary-ui"
|
||||
|
||||
// Github token to load go modules on windows client
|
||||
// only required for running automation on RDP e2e test cases
|
||||
// Token requires read access to hashicorp repositories
|
||||
@@ -94,7 +69,7 @@
|
||||
|
||||
// Name of user. This is used to tag resources in AWS to more easily identify
|
||||
// your resources. Can be set to any string.
|
||||
/// Applies to AWS scenarios only.
|
||||
// Applies to AWS scenarios only.
|
||||
// enos_user = "enos"
|
||||
|
||||
// The AWS region you want to create the resources in. Make sure you choose a
|
||||
|
||||
@@ -337,7 +337,7 @@ variable "boundary_license" {
|
||||
description = "Boundary license (not needed for OSS, required for enterprise)"
|
||||
type = string
|
||||
sensitive = true
|
||||
default = null
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "controller_config_file_path" {
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Copyright IBM Corp. 2020, 2026
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
enos = {
|
||||
source = "registry.terraform.io/hashicorp-forge/enos"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
description = "the binary name"
|
||||
}
|
||||
|
||||
resource "enos_local_exec" "find_binary" {
|
||||
inline = ["type -P ${var.name} || (echo \"\n\nCould not find ${var.name} executable. Have you installed it?\n\n\" && exit 1)"]
|
||||
}
|
||||
|
||||
output "path" {
|
||||
value = enos_local_exec.find_binary.stdout
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# Copyright IBM Corp. 2020, 2026
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
variable "image_tag" {
|
||||
description = "the tag of the docker image (e.g. 1.2.3)"
|
||||
type = string
|
||||
default = "latest"
|
||||
}
|
||||
|
||||
variable "edition" {
|
||||
description = "the edition of the docker image, either 'oss' or 'ent'"
|
||||
type = string
|
||||
default = "oss"
|
||||
validation {
|
||||
condition = contains(["oss", "ent"], var.edition)
|
||||
error_message = "edition must be either 'oss' or 'ent'."
|
||||
}
|
||||
}
|
||||
|
||||
variable "repository" {
|
||||
description = "the repository of the docker image."
|
||||
type = string
|
||||
default = "hashicorp/boundary"
|
||||
}
|
||||
|
||||
output "image_name" {
|
||||
value = "${var.repository}${var.edition == "ent" ? "-enterprise" : ""}:${var.image_tag}${var.edition == "ent" ? "-ent" : ""}"
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Copyright IBM Corp. 2020, 2026
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
external = {
|
||||
source = "hashicorp/external"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
description = "the binary name"
|
||||
}
|
||||
|
||||
data "external" "find_binary" {
|
||||
program = ["bash", "-c", "printf '{\"path\":\"%s\"}' \"$(which ${var.name})\""]
|
||||
}
|
||||
|
||||
output "path" {
|
||||
value = dirname(abspath(data.external.find_binary.result.path))
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Copyright IBM Corp. 2020, 2026
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
external = {
|
||||
source = "hashicorp/external"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data "external" "repo_root" {
|
||||
program = ["bash", "-c", "printf '{\"path\":\"%s\"}' \"$(git rev-parse --show-toplevel)\""]
|
||||
}
|
||||
|
||||
data "external" "make_edition" {
|
||||
program = ["bash", "-c", "edition=$(make -s -C '${data.external.repo_root.result.path}' edition | tr -d '\\r\\n') && printf '{\"edition\":\"%s\"}' \"$edition\""]
|
||||
}
|
||||
|
||||
output "edition" {
|
||||
value = data.external.make_edition.result.edition
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright IBM Corp. 2024, 2026
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
external = {
|
||||
source = "hashicorp/external"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data "external" "repo_root" {
|
||||
program = ["bash", "-c", "printf '{\"path\":\"%s\"}' \"$(git rev-parse --show-toplevel)\""]
|
||||
}
|
||||
|
||||
output "path" {
|
||||
value = abspath(data.external.repo_root.result.path)
|
||||
}
|
||||
@@ -2,16 +2,40 @@
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
|
||||
# Loads boundary license from file or environment variable
|
||||
# Loads license from file or environment variable
|
||||
# If license is null or not provided, then the license is returned from the file at license_path
|
||||
variable "license_path" {
|
||||
description = "Path to the boundary license file"
|
||||
description = "Path to a boundary license file"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
variable "license" {
|
||||
description = "Boundary license"
|
||||
description = "License key"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
output "license" {
|
||||
value = var.license != null ? var.license : file(var.license_path)
|
||||
variable "edition" {
|
||||
description = "Edition to determine if license is needed"
|
||||
type = string
|
||||
default = "oss"
|
||||
validation {
|
||||
condition = contains(["oss", "ent"], var.edition)
|
||||
error_message = "edition must be either 'oss' or 'ent'."
|
||||
}
|
||||
}
|
||||
|
||||
check "license_or_license_path_required" {
|
||||
assert {
|
||||
condition = (
|
||||
var.edition == "oss" ||
|
||||
var.license != null ||
|
||||
var.license_path != null
|
||||
)
|
||||
error_message = "license_path must be provided when license is not set for non-oss editions."
|
||||
}
|
||||
}
|
||||
|
||||
output "license" {
|
||||
value = var.edition == "ent" ? (var.license != null ? var.license : file(var.license_path)) : ""
|
||||
}
|
||||
@@ -9,8 +9,8 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
variable "debug_no_run" {
|
||||
description = "If set, this module will not execute the tests so that you can still access environment variables"
|
||||
variable "is_ci" {
|
||||
description = "Run tests automatically if in CI"
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
@@ -45,6 +45,7 @@ variable "max_page_size" {
|
||||
variable "local_boundary_dir" {
|
||||
description = "Local Path to boundary executable"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
variable "target_user" {
|
||||
description = "SSH username for target"
|
||||
@@ -323,9 +324,9 @@ resource "enos_local_exec" "run_e2e_test" {
|
||||
E2E_CLIENT_SSH_KEY = var.client_ssh_key
|
||||
}
|
||||
|
||||
inline = var.debug_no_run ? [""] : [
|
||||
inline = var.is_ci ? [
|
||||
"set -o pipefail; PATH=\"${var.local_boundary_dir}:$PATH\" go test -v ${var.test_package} -count=1 -timeout ${var.test_timeout} | tee ${path.module}/../../test-e2e-${local.package_name}.log"
|
||||
]
|
||||
] : [""]
|
||||
}
|
||||
|
||||
output "test_results" {
|
||||
|
||||
@@ -14,6 +14,11 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
variable "is_ci" {
|
||||
description = "Run tests automatically if in CI"
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
variable "network_name" {
|
||||
description = "Name of Docker Network"
|
||||
type = string
|
||||
@@ -23,11 +28,6 @@ variable "controller_container_name" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "debug_no_run" {
|
||||
description = "If set, this module will not execute the tests so that you can still access environment variables"
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
variable "test_package" {
|
||||
description = "Name of Go test package to run"
|
||||
type = string
|
||||
@@ -55,10 +55,7 @@ variable "auth_password" {
|
||||
variable "local_boundary_dir" {
|
||||
description = "Local Path to boundary executable"
|
||||
type = string
|
||||
}
|
||||
variable "local_boundary_src_dir" {
|
||||
description = "Local Path to boundary src code directory"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "target_user" {
|
||||
description = "SSH username for target"
|
||||
@@ -352,12 +349,9 @@ resource "enos_local_exec" "run_e2e_test" {
|
||||
E2E_GCP_HOST_SET_IPS = jsonencode(var.gcp_host_set_ips)
|
||||
E2E_MAX_PAGE_SIZE = var.max_page_size
|
||||
E2E_CONTROLLER_CONTAINER_NAME = var.controller_container_name
|
||||
BOUNDARY_DIR = abspath(var.local_boundary_src_dir)
|
||||
BOUNDARY_CLI_DIR = abspath(var.local_boundary_dir)
|
||||
MODULE_DIR = abspath(path.module)
|
||||
}
|
||||
|
||||
inline = var.debug_no_run ? [""] : [
|
||||
inline = var.is_ci ? [
|
||||
"set -o pipefail; PATH=\"${var.local_boundary_dir}:$PATH\" go test -v ${var.test_package} -count=1 -timeout ${var.test_timeout} | tee ${path.module}/../../test-e2e-${local.package_name}.log"
|
||||
]
|
||||
] : [""]
|
||||
}
|
||||
@@ -9,11 +9,6 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
variable "debug_no_run" {
|
||||
description = "If set, this module will not execute the tests so that you can still access environment variables"
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
variable "alb_boundary_api_addr" {
|
||||
description = "URL of the Boundary instance"
|
||||
type = string
|
||||
@@ -34,15 +29,6 @@ variable "auth_password" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "local_boundary_dir" {
|
||||
description = "Local Path to boundary executable"
|
||||
type = string
|
||||
}
|
||||
variable "local_boundary_ui_src_dir" {
|
||||
description = "Local Path to boundary-ui directory"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "aws_ssh_private_key_path" {
|
||||
description = "Local Path to key used to SSH onto created hosts"
|
||||
type = string
|
||||
@@ -250,7 +236,7 @@ resource "enos_local_exec" "run_e2e_test" {
|
||||
E2E_ALB_CERT = var.alb_cert
|
||||
}
|
||||
|
||||
inline = var.debug_no_run ? [""] : ["set -o pipefail; PATH=\"${var.local_boundary_dir}:$PATH\" pnpm --cwd ${var.local_boundary_ui_src_dir}/ui/admin run e2e 2>&1 | tee ${path.module}/../../test-e2e-ui.log"]
|
||||
inline = [""]
|
||||
}
|
||||
|
||||
output "test_results" {
|
||||
|
||||
Reference in new issue
Block a user