mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04: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}"
|
||||
|
||||
# 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
|
||||
controlAutoscalingGroup=$(
|
||||
terraform show -json |
|
||||
jq -r .'values.root_module.child_modules[] |
|
||||
select(.address == "module.instance_group_control_plane") |
|
||||
.resources[0].values.name'
|
||||
jq --arg selector "$CP_SELECTOR" \
|
||||
-r .'values.root_module.child_modules[] |
|
||||
select(.address == $selector) |
|
||||
.resources[0].values.name'
|
||||
)
|
||||
workerAutoscalingGroup=$(
|
||||
terraform show -json |
|
||||
jq -r .'values.root_module.child_modules[] |
|
||||
select(.address == "module.instance_group_worker_nodes") |
|
||||
.resources[0].values.name'
|
||||
jq --arg selector "$W_SELECTOR" \
|
||||
-r .'values.root_module.child_modules[] |
|
||||
select(.address == $selector) |
|
||||
.resources[0].values.name'
|
||||
)
|
||||
popd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user