Skip to content

Commit d4f0141

Browse files
authored
Merge pull request #6 from accessd/fixes/add-region-to-civo-firewall-ls
Specifying region for civo commands
2 parents ad720a3 + f280ce9 commit d4f0141

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

03-installation-and-setup/Taskfile.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ tasks:
4747
--create-rules false \
4848
--region ${CIVO_REGION}
4949
- |
50-
ingress_rule_ids=$(civo firewall rule ls ${CLUSTER_NAME} -o json | jq -r '.[] | select(.direction == "ingress") | .id')
50+
ingress_rule_ids=$(civo firewall rule ls --region ${CIVO_REGION} ${CLUSTER_NAME} -o json | jq -r '.[] | select(.direction == "ingress") | .id')
5151
for rule_id in $ingress_rule_ids; do
5252
civo firewall rule remove ${CLUSTER_NAME} $rule_id -y --region ${CIVO_REGION}
5353
done
@@ -62,6 +62,7 @@ tasks:
6262
cmds:
6363
- |
6464
civo kubernetes create ${CLUSTER_NAME} \
65+
--region ${CIVO_REGION} \
6566
--network ${CLUSTER_NAME} \
6667
--existing-firewall ${CLUSTER_NAME} \
6768
--nodes 2 \
@@ -79,17 +80,17 @@ tasks:
7980

8081
civo:05-get-kubeconfig:
8182
cmds:
82-
- civo kubernetes config ${CLUSTER_NAME} --save --switch
83+
- civo kubernetes config ${CLUSTER_NAME} --region ${CIVO_REGION} --save --switch
8384
desc: Get kubeconfig for the cluster
8485

8586
civo:06-clean-up:
8687
cmds:
87-
- civo kubernetes delete ${CLUSTER_NAME} -y
88+
- civo kubernetes delete ${CLUSTER_NAME} --region ${CIVO_REGION} -y
8889
- cmd: gum style "There is some delay on the civo side from cluster being deleted to it being removed from the firewall rule usage"
8990
silent: true
9091
- sleep 10
91-
- civo firewall delete ${CLUSTER_NAME} -y
92-
- civo network delete ${CLUSTER_NAME} -y
92+
- civo firewall delete ${CLUSTER_NAME} --region ${CIVO_REGION} -y
93+
- civo network delete ${CLUSTER_NAME} --region ${CIVO_REGION} -y
9394
desc: Clean up the Civo Kubernetes cluster and associated resources
9495

9596
gcp:01-init-cli:

0 commit comments

Comments
 (0)