You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
AWSTemplateFormatVersion: 2010-09-09
|
|
Description: Terraform backend - versioned, encrypted state storage and locking table
|
|
Resources:
|
|
TerraformStateBucket:
|
|
Type: AWS::S3::Bucket
|
|
Properties:
|
|
AccessControl: Private
|
|
BucketEncryption:
|
|
ServerSideEncryptionConfiguration:
|
|
- ServerSideEncryptionByDefault:
|
|
SSEAlgorithm: AES256
|
|
BucketName: !Ref AWS::StackName
|
|
VersioningConfiguration:
|
|
Status: Enabled
|
|
TerraformStateTable:
|
|
Type: AWS::DynamoDB::Table
|
|
Properties:
|
|
AttributeDefinitions:
|
|
- AttributeName: LockID
|
|
AttributeType: S
|
|
KeySchema:
|
|
- AttributeName: LockID
|
|
KeyType: HASH
|
|
ProvisionedThroughput:
|
|
ReadCapacityUnits: 5
|
|
WriteCapacityUnits: 5
|
|
TableName: !Ref AWS::StackName
|
|
Outputs:
|
|
TerraformStateBucketOutput:
|
|
Description: Bucket used to store Terraform remote state file
|
|
Value: !Ref TerraformStateBucket
|
|
TerraformStateTableOutput:
|
|
Description: DynamoDB table used for Terraform state locking functionality
|
|
Value: !Ref TerraformStateTable
|