Setup s3 access at ec2 level

This commit is contained in:
Ian Keane 2026-08-18 13:17:40 -04:00
parent 875e715ce9
commit 865831f1de
6 changed files with 47 additions and 58 deletions

View file

@ -1,4 +1,4 @@
.PHONY: init plan apply destroy clean kubeconfig talosconfig argocd-password bootstrap decrypt post-apply fluentbit-secret
.PHONY: init plan apply destroy clean kubeconfig talosconfig argocd-password bootstrap decrypt post-apply
SECRET ?= dumpnet
TF_DIR=terraform
@ -13,6 +13,8 @@ plan:
apply:
cd $(TF_DIR) && terraform apply -target=talos_cluster_kubeconfig.this
@echo "==> Waiting 60s for Kubernetes API to be ready..."
@sleep 60
cd $(TF_DIR) && terraform apply
destroy:
@ -75,20 +77,6 @@ decrypt:
done
@echo "Decrypted files are in /tmp/ - they will not persist after reboot"
# Create fluent-bit AWS credentials secret in cluster
fluentbit-secret:
@KEY_ID=$$(aws secretsmanager get-secret-value --secret-id $(SECRET) \
--query SecretString --output text | python3 -c \
"import sys,json; print(json.load(sys.stdin)['fluentbit']['aws_access_key_id'])") && \
SECRET_KEY=$$(aws secretsmanager get-secret-value --secret-id $(SECRET) \
--query SecretString --output text | python3 -c \
"import sys,json; print(json.load(sys.stdin)['fluentbit']['aws_secret_access_key'])") && \
kubectl create secret generic fluentbit-aws-credentials \
--namespace fluent-bit \
--from-literal=AWS_ACCESS_KEY_ID=$$KEY_ID \
--from-literal=AWS_SECRET_ACCESS_KEY=$$SECRET_KEY \
--dry-run=client -o yaml | kubectl apply -f -
# Run all post-apply steps (run once after fresh cluster creation)
post-apply:
scripts/post-apply.sh