Add CloudFormation templates for first 10 tutorials#33
Merged
Conversation
- 10 tutorial templates (cfn-*.yaml) matching CLI scripts - 3 prerequisite templates (bucket, VPC public, VPC private) - Universal deploy.sh and cleanup.sh scripts - deploy.sh auto-detects prereqs and offers to create them - cleanup.sh --prereqs empties buckets before deletion - All templates validated with aws cloudformation validate-template
- test-cfn.py: parallel deploy/delete test runner with prereq management - 001-lightsail: nano_3_2 -> nano_3_0 (correct bundle ID) - 010-cloudmap: public DNS -> HTTP namespace (avoids DNS validation)
- setup-bucket.sh creates bucket via CLI, registers name in a CFN stack - cleanup-bucket.sh empties and deletes bucket, then deletes the stack - prereq-bucket.yaml is now a thin parameter-based template (no S3 resource) - test-cfn.py reverted to clean prereq detection (no inline fallback) - All 10 templates now pass deploy+delete including 003-s3
- *-cfn.sh scripts run interactive steps against CFN-created resources - Each command shown with $ prefix and resolved variables - READMEs now include SDK examples and CloudFormation sections
- deploy.sh: shows all stack resources and outputs after create/update - deploy.sh: --no-fail-on-empty-changeset so re-running shows info - cleanup.sh: when stack is gone, searches for orphaned resources by tag (uses resourcegroupstaggingapi to find by tutorial tag or cfn stack tag)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CloudFormation templates for the first 10 published tutorials, plus shared infrastructure and deployment scripts.
Test results (10/10 passing)
Bucket management
S3 buckets are managed by scripts, not CloudFormation (avoids org-level CFN hooks that block S3 bucket creation):
cfn/setup-bucket.sh— creates bucket via CLI, registers name in a thin CFN stack with exportscfn/cleanup-bucket.sh— empties bucket (including versions), deletes bucket, deletes stack!ImportValue tutorial-prereqs-bucket-BucketNameFiles
Test runner:
test-cfn.py— validates, deploys, and deletes all templates in parallel.Prerequisite templates (
cfn/):prereq-bucket.yaml— thin stack that exports a bucket name (bucket created by setup-bucket.sh)prereq-vpc-public.yaml— VPC with public + private subnets, NAT gatewayprereq-vpc-private.yaml— VPC with private subnets only, S3 endpointDeployment scripts:
deploy.sh/cleanup.sh— universal deploy/delete for tutorial stackscfn/setup-bucket.sh/cfn/cleanup-bucket.sh— bucket lifecycle