Skip to content

chore(e2e): Clean up enos variables#6591

Merged
moduli merged 2 commits intomainfrom
moduli-e2e-enos-vars
Apr 23, 2026
Merged

chore(e2e): Clean up enos variables#6591
moduli merged 2 commits intomainfrom
moduli-e2e-enos-vars

Conversation

@moduli
Copy link
Copy Markdown
Collaborator

@moduli moduli commented Apr 16, 2026

Description

This PR makes all other currently required enos variables either optional or obsolete in order to reduce the amount of setup needed to use the tool.

A previous PR removed the need for aws_ssh_private_key_path and aws_ssh_keypair_name: #6583.

This PR removes the need for

  • local_boundary_dir
  • local_boundary_src_dir
  • local_boundary_ui_src_dir
  • boundary_edition
  • debug_no_run

This is achieved by doing the following

  • local_boundary_dir is now programmatically determined by running which boundary
  • local_boundary_src_dir is now programmatically determined by running git rev-parse --show-toplevel
  • local_boundary_ui_src_dir was removed (it wasn't needed)
  • boundary_edition is now programmatically determined by running make edition
  • debug_no_run has been replaced by is_ci, which will be set in github actions workflows. This will trigger the e2e tests to automatically run after creating infra.

Now, you can start enos scenarios without needing to configure anything in enos.vars.hcl (assuming you have the dependencies installed (e.g. enos cli, terraform, go).

cd ~/Developer/boundary
enos scenario launch e2e_docker_base builder:local

Enterprise-changes were tested in https://github.com/hashicorp/boundary-enterprise/pull/2354 and will be cherry-picked into the ce -> ent merge pr.

https://hashicorp.atlassian.net/browse/ICU-18941

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've documented the impact of any changes to security controls.
    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@moduli moduli added the pr/no-milestone Ignores the Milestone Check label Apr 16, 2026
@moduli moduli force-pushed the moduli-e2e-enos-vars branch 2 times, most recently from 9826373 to 2deb930 Compare April 16, 2026 13:55
@moduli moduli requested a review from Copilot April 16, 2026 17:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors Enos e2e scenarios/modules to reduce reliance on manually-supplied variables by deriving values (Boundary edition, repo root, binary path) and generating SSH keys, while also standardizing SSH transport inputs across AWS modules.

Changes:

  • Replace/clean up scenario variables by introducing helper modules (get_boundary_edition, get_repo_root, get_binary_path, SSH keypair modules).
  • Update AWS modules and scenarios to pass explicit SSH private_key_path/keypair inputs instead of relying on a global Enos provider transport block.
  • Adjust license handling to be edition-aware and simplify scenario wiring around license inputs.

Reviewed changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
enos/modules/test_e2e_ui/main.tf Removes debug/local path vars; currently leaves UI e2e exec as a no-op.
enos/modules/test_e2e_docker/main.tf Replaces debug_no_run with is_ci; adjusts env vars and execution gating.
enos/modules/test_e2e/main.tf Replaces debug_no_run with is_ci; updates some variable defaults/descriptions.
enos/modules/ssh_keypair/main.tf New module to generate (or reuse) a local SSH private key file.
enos/modules/read_license/main.tf Adds edition-based license validation and conditional license output.
enos/modules/get_repo_root/main.tf New module to resolve repo root via git rev-parse.
enos/modules/get_boundary_edition/main.tf New module to derive edition via make edition at repo root.
enos/modules/get_binary_path/main.tf New module to locate a binary via shell and expose its path.
enos/modules/generate_docker_image_name/main.tf New helper to build Docker image names/tags by edition.
enos/modules/check_boundary_edition/main.tf New module wrapper around a shell script to print edition.
enos/modules/check_boundary_edition/edition.sh New script to run make edition.
enos/modules/binary_finder/main.tf Removes legacy binary-finder implementation.
enos/modules/aws_worker/variables.tf Renames SSH keypair variable; adds SSH private key path input.
enos/modules/aws_worker/main.tf Wires SSH user/private key path into Enos SSH transport blocks.
enos/modules/aws_vault/vault-instances.tf Wires SSH user/private key path into Enos SSH transport blocks.
enos/modules/aws_vault/variables.tf Renames SSH keypair variable; adds SSH private key path input.
enos/modules/aws_target/main.tf Adds SSH private key path variable; uses it in SSH transport.
enos/modules/aws_ssh_keypair/main.tf New module to generate/upload an AWS keypair and write the private key locally.
enos/modules/aws_boundary/variables.tf Replaces ssh user/keypair inputs with keypair name + private key path.
enos/modules/aws_boundary/boundary-instances.tf Wires SSH user/private key path into Enos SSH transport blocks.
enos/enos.vars.hcl Updates example vars; reorganizes/rewrites guidance comments.
enos/enos.hcl Removes global provider "enos" transport config.
enos/enos-variables.hcl Removes legacy vars (e.g., boundary_edition/e2e_debug_no_run/src dirs); adds is_ci; adjusts defaults.
enos/enos-scenario-e2e-ui-docker.hcl Switches to derived edition + generated SSH key; simplifies license wiring.
enos/enos-scenario-e2e-ui-aws.hcl Switches to derived edition + generated SSH key; simplifies license wiring.
enos/enos-scenario-e2e-docker-worker-registration-worker-led.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-docker-worker-registration-controller-led.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-docker-base.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-docker-base-with-worker.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-docker-base-with-worker-version.hcl Uses derived edition + generated SSH key; uses docker image-name helper.
enos/enos-scenario-e2e-docker-base-with-vault.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-docker-base-with-gcp.hcl Uses derived edition and binary path helper; adds is_ci to test step.
enos/enos-scenario-e2e-docker-base-plus.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-docker-base-connect.hcl Uses derived edition, generated SSH key, and binary path helper.
enos/enos-scenario-e2e-database.hcl Uses derived edition, generated SSH key, and binary path helper; updates deps.
enos/enos-scenario-e2e-aws.hcl Uses derived edition + generated SSH key; updates module inputs/deps.
enos/enos-scenario-e2e-aws-rdp-target.hcl Removes explicit Enos provider from scenario providers list.
enos/enos-scenario-e2e-aws-rdp-base.hcl Uses repo-root helper and generated SSH key; updates module inputs/deps.
enos/enos-scenario-e2e-aws-base.hcl Uses derived edition + generated SSH key; updates module inputs/deps.
enos/enos-scenario-e2e-aws-base-with-vault.hcl Uses derived edition + generated SSH key; updates module inputs/deps.
enos/enos-modules.hcl Registers new helper/keypair modules; removes legacy wiring.
enos/ci/hcp-resources/main.tf Generates SSH keypair and wires it into Enos provider transport and modules.
enos/README.md Adds missing local dependencies; fixes code fence formatting.
.github/workflows/enos-run.yml Updates CI env vars and adds ENOS_VAR_is_ci; removes deprecated vars.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread enos/enos-scenario-e2e-docker-base-plus.hcl
Comment thread enos/modules/check_boundary_edition/edition.sh Outdated
Comment thread enos/enos.vars.hcl Outdated
Comment thread enos/modules/test_e2e_ui/main.tf
Comment thread enos/modules/test_e2e_docker/main.tf Outdated
Comment thread enos/enos-scenario-e2e-aws-base-with-vault.hcl
Comment thread .github/workflows/enos-run.yml Outdated
Comment thread enos/modules/test_e2e_docker/main.tf Outdated
Comment thread enos/modules/test_e2e/main.tf
Comment thread enos/modules/read_license/main.tf
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread enos/enos-scenario-e2e-aws-rdp-base.hcl
Comment thread enos/modules/check_boundary_edition/main.tf Outdated
@moduli moduli force-pushed the moduli-e2e-enos-vars branch 2 times, most recently from d0b7fde to 09e915b Compare April 17, 2026 14:00
# Conflicts:
#	.github/workflows/enos-run.yml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread enos/modules/get_boundary_edition/main.tf
Comment thread enos/modules/generate_docker_image_name/main.tf
Comment thread enos/enos-scenario-e2e-aws-base.hcl
Comment thread enos/enos-scenario-e2e-aws-rdp-base.hcl Outdated
@moduli moduli force-pushed the moduli-e2e-enos-vars branch from 5ee5ae9 to 8d99b49 Compare April 20, 2026 22:56
@moduli moduli marked this pull request as ready for review April 21, 2026 14:57
@moduli moduli requested a review from a team as a code owner April 21, 2026 14:57
@moduli moduli requested review from a team April 21, 2026 14:57
@moduli moduli merged commit 843893c into main Apr 23, 2026
64 of 66 checks passed
@moduli moduli deleted the moduli-e2e-enos-vars branch April 23, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-milestone Ignores the Milestone Check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants