mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-13 08:29:38 -05:00
ci: update aws asg resource selector (#1991)
* update resource selector * tidy * fix shellcheck * bazel tidy
This commit is contained in:
parent
d3ad46f727
commit
184530a80d
23
.github/actions/constellation_create/aws-logs.sh
vendored
23
.github/actions/constellation_create/aws-logs.sh
vendored
@ -7,18 +7,29 @@ shopt -s inherit_errexit
|
|||||||
|
|
||||||
echo "Using AWS region: ${1}"
|
echo "Using AWS region: ${1}"
|
||||||
|
|
||||||
|
# TODO(msanft): Remove once 2.9.0 is released
|
||||||
|
CP_SELECTOR="module.instance_group_control_plane"
|
||||||
|
W_SELECTOR="module.instance_group_worker_nodes"
|
||||||
|
if [[ $(./constellation version) != *"2.8.0"* ]]; then
|
||||||
|
echo "Constellation version is not 2.8.0, using updated ASG selectors"
|
||||||
|
CP_SELECTOR='module.instance_group["control_plane_default"]'
|
||||||
|
W_SELECTOR='module.instance_group["worker_default"]'
|
||||||
|
fi
|
||||||
|
|
||||||
pushd constellation-terraform
|
pushd constellation-terraform
|
||||||
controlAutoscalingGroup=$(
|
controlAutoscalingGroup=$(
|
||||||
terraform show -json |
|
terraform show -json |
|
||||||
jq -r .'values.root_module.child_modules[] |
|
jq --arg selector "$CP_SELECTOR" \
|
||||||
select(.address == "module.instance_group_control_plane") |
|
-r .'values.root_module.child_modules[] |
|
||||||
.resources[0].values.name'
|
select(.address == $selector) |
|
||||||
|
.resources[0].values.name'
|
||||||
)
|
)
|
||||||
workerAutoscalingGroup=$(
|
workerAutoscalingGroup=$(
|
||||||
terraform show -json |
|
terraform show -json |
|
||||||
jq -r .'values.root_module.child_modules[] |
|
jq --arg selector "$W_SELECTOR" \
|
||||||
select(.address == "module.instance_group_worker_nodes") |
|
-r .'values.root_module.child_modules[] |
|
||||||
.resources[0].values.name'
|
select(.address == $selector) |
|
||||||
|
.resources[0].values.name'
|
||||||
)
|
)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user