AWS Cloudformation contd
- linked templates or nested templates Refer Here
- For complex infrastructures Using nested stack is recommended Refer Here
- Terraform modules are much flexible compared to cf nested stacks
- count doesnot exist in cloud formation Refer Here
- Can the resources be imported => yes (refer classroom video)
Exercise:
- Create a dynamo db table with Partition key
LockID in cloud formation.
- Create an s3 bucket
- Call the template as
backend.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
},
"Resources": {
"dbtable": {
"Type": "AWS::DynamoDB::Table",
"Properties": {
"AttributeDefinitions": [
],
"GlobalSecondaryIndexes": [ ],
"KeySchema": [
{
"AttributeName": "LockID",
"KeyType": "HASH"
}
],
"TableName": "qtcfdec23"
}
},
"s3Bucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"AccessControl": "Private",
"BucketName": "qtcfdec23"
}
}
}
}
- Findout a way to call cloudformation template from terraform. Refer Here
Like this:
Like Loading...