Fix script paths and kubectl context matching#53
Merged
sdpoueme merged 1 commit intoaws-solutions-library-samples:mainfrom Mar 31, 2026
Merged
Conversation
Replace path.cwd with local.repo_root (path.module/../..) in all
Terraform null_resource provisioners. path.cwd resolves to the
terraform directory when running from within it, but scripts and
manifests live at the repo root. path.module is stable regardless
of invocation method.
Anchor all kubectl context grep patterns from grep ${CLUSTER_NAME}
to grep "/${CLUSTER_NAME}$" to prevent partial matches when multiple
EKS contexts share a name prefix.
sdpoueme
approved these changes
Mar 31, 2026
Contributor
sdpoueme
left a comment
There was a problem hiding this comment.
Reviewed changes and they are aligned with the intended flows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #52
Summary
path.cwdwithlocal.repo_root(path.module/../..) in all Terraformnull_resourceprovisioners. When deploying manually per README (cd terraform/intra-cluster && terraform apply),path.cwdresolves to the terraform directory, not the repo root wherescripts/andmanifests/live. This caused every post-install script (TLS config, ClusterIssuer, Open Match ingress, port mapping) to fail silently undernohup. Also fixes the missing ClusterIssuer on Cluster 2 (the manifest was never applied because the path was wrong).grep ${CLUSTER_NAME}togrep "/${CLUSTER_NAME}$"across 14 scripts and both buildspec files. Prevents failures when multiple EKS contexts share a name prefix.Files Changed
terraform/intra-cluster/main.tfrepo_rootlocal, replace 6xpath.cwdterraform/extra-cluster/main.tfrepo_rootlocal, replace 2xpath.cwdscripts/"/${VAR}$"buildspec.yml,cleanup-buildspec.ymlTest plan
terraform validatepasses for intra-cluster and extra-clusterpath.cwdreferences remaining in terraform/grep ${CLUSTERpatterns remaining in scripts/