Created
July 23, 2022 20:35
-
-
Save exinmusic/0c0f956534c6e93675beb64916f2bd86 to your computer and use it in GitHub Desktop.
This file contains 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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Template to create terraform s3 bucket and ddb lock table | |
Parameters: | |
TFStateBucketName: | |
Description: 'Terraform State Bucket Name' | |
Type: String | |
Default: tf-state | |
TFStateLockTableName: | |
Description: 'Terraform DDB Lock Table Name' | |
Type: String | |
Default: tf-lock | |
Resources: | |
S3Bucket: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: !Ref TFStateBucketName | |
VersioningConfiguration: | |
Status: Enabled | |
BucketEncryption: | |
ServerSideEncryptionConfiguration: | |
- ServerSideEncryptionByDefault: | |
SSEAlgorithm: 'AES256' | |
DynamoDBTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
AttributeDefinitions: | |
- | |
AttributeName: "LockID" | |
AttributeType: "S" | |
BillingMode: PAY_PER_REQUEST | |
KeySchema: | |
- | |
AttributeName: "LockID" | |
KeyType: "HASH" | |
TableName: !Ref TFStateLockTableName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment