refactor(makefile): standardize bootstrap Makefiles across DynamoDB, IAM, and S3
This commit is contained in:
parent
bcb09baede
commit
ab64194aec
@ -10,23 +10,21 @@ BOOTSTRAP_IAM_DIR = bootstrap-iam
|
||||
# Bootstrap targets
|
||||
# --------------------------------------------
|
||||
|
||||
bootstrap: bootstrap-s3 bootstrap-dynamodb bootstrap-iam
|
||||
bootstrap-init:
|
||||
make -C $(BOOTSTRAP_S3_DIR) init
|
||||
make -C $(BOOTSTRAP_DYNAMODB_DIR) init
|
||||
make -C $(BOOTSTRAP_IAM_DIR) init
|
||||
|
||||
bootstrap-apply:
|
||||
make -C $(BOOTSTRAP_S3_DIR) apply
|
||||
make -C $(BOOTSTRAP_DYNAMODB_DIR) apply
|
||||
make -C $(BOOTSTRAP_IAM_DIR) apply
|
||||
@echo "🎉 All bootstrap modules completed."
|
||||
|
||||
bootstrap-s3:
|
||||
make -C $(BOOTSTRAP_S3_DIR) bootstrap
|
||||
|
||||
bootstrap-dynamodb:
|
||||
make -C $(BOOTSTRAP_DYNAMODB_DIR) bootstrap
|
||||
|
||||
bootstrap-iam:
|
||||
make -C $(BOOTSTRAP_IAM_DIR) bootstrap
|
||||
|
||||
# --------------------------------------------
|
||||
# Run all bootstraps in order
|
||||
# --------------------------------------------
|
||||
|
||||
|
||||
bootstrap-plan:
|
||||
make -C $(BOOTSTRAP_S3_DIR) plan
|
||||
make -C $(BOOTSTRAP_DYNAMODB_DIR) plan
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
bootstrap:
|
||||
init:
|
||||
terraform init --upgrade
|
||||
|
||||
apply: init
|
||||
terraform apply \
|
||||
-var="table_name=svc-plus-iac-state-dynamodb-lock" \
|
||||
-var="region=ap-northeast-1" \
|
||||
-auto-approve
|
||||
plan:
|
||||
plan: init
|
||||
terraform plan -var="table_name=svc-plus-iac-state-dynamodb-lock" -var="region=ap-northeast-1"
|
||||
output:
|
||||
output: init
|
||||
terraform output
|
||||
destroy:
|
||||
destroy: init
|
||||
terraform destroy
|
||||
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
bootstrap:
|
||||
init:
|
||||
terraform init --upgrade
|
||||
apply: init
|
||||
terraform apply \
|
||||
-var="region=ap-northeast-1" \
|
||||
-var="account_name=dev" \
|
||||
-var="role_name=TerraformDeployRole-Dev" \
|
||||
-auto-approve
|
||||
terraform output
|
||||
|
||||
plan:
|
||||
plan: init
|
||||
terraform plan -var="region=ap-northeast-1" -var="account_name=dev" -var="role_name=TerraformDeployRole-Dev"
|
||||
output:
|
||||
output: init
|
||||
terraform output
|
||||
destroy:
|
||||
destroy: init
|
||||
terraform destroy
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
bootstrap:
|
||||
init:
|
||||
terraform init --upgrade
|
||||
|
||||
apply: init
|
||||
terraform apply -var="bucket_name=svc-plus-iac-state" -var=region=ap-northeast-1 -auto-approve
|
||||
terraform output
|
||||
|
||||
plan:
|
||||
plan: init
|
||||
terraform plan -var="bucket_name=svc-plus-iac-state" -var=region=ap-northeast-1
|
||||
|
||||
output:
|
||||
output: init
|
||||
terraform output
|
||||
destroy:
|
||||
destroy: init
|
||||
terraform destroy
|
||||
|
||||
Loading…
Reference in New Issue
Block a user