AWS QLDB Ledger
This page shows how to write Terraform and CloudFormation for QLDB Ledger and write them securely.
aws_qldb_ledger (Terraform)
The Ledger in QLDB can be configured in Terraform with the resource name aws_qldb_ledger
. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_qldb_ledger" "accounted_ledger" {
name = var.name
tags = var.tags
}
resource "aws_qldb_ledger" "default" {
name = "ledger"
permissions_mode = "STANDARD"
}
resource "aws_qldb_ledger" "enabled" {
resource "aws_qldb_ledger" "standard" {
name = "ledger"
permissions_mode = "STANDARD"
}
# failure
Parameters
-
arn
optional computed - string -
deletion_protection
optional - bool -
id
optional computed - string -
name
optional computed - string -
tags
optional - map from string to string
Explanation in Terraform Registry
Provides an AWS Quantum Ledger Database (QLDB) resource
NOTE: Deletion protection is enabled by default. To successfully delete this resource via Terraform,
deletion_protection = false
must be applied before attempting deletion.
AWS::QLDB::Ledger (CloudFormation)
The Ledger in QLDB can be configured in CloudFormation with the resource name AWS::QLDB::Ledger
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::QLDB::Ledger
Properties:
DeletionProtection: True
Name: ${env:LEDGER_NAME}
PermissionsMode: ALLOW_ALL
Type: AWS::QLDB::Ledger
Properties:
Name: node-test-${self:provider.stage}
DeletionProtection: false
PermissionsMode: ALLOW_ALL
Tags:
Type: AWS::QLDB::Ledger
Properties:
Name: CarbonEconomy
DeletionProtection: false
PermissionsMode: ALLOW_ALL
Tags:
Type: AWS::QLDB::Ledger
Properties:
Name: qldb-simple-demo-${self:provider.stage}
DeletionProtection: false
PermissionsMode: ALLOW_ALL
Tags:
Type: AWS::QLDB::Ledger
Properties:
Name: ${self:custom.ledgerNames.SampleLedger.${opt:stage, self:provider.stage}}
DeletionProtection: false
PermissionsMode: STANDARD
"Type": "AWS::QLDB::Ledger",
"Properties": {
"Name": {
"Fn::Join": [
"",
[
"AWS::QLDB::Ledger": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qldb-ledger.html",
"Properties": {
"PermissionsMode": {
"Required": true,
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-qldb-ledger.html#cfn-qldb-ledger-permissionsmode",
"Type": "AWS::QLDB::Ledger",
"Properties": {
"Name": { "Fn::Join": ["", [{ "Ref": "ledgerName" }, "-", { "Ref": "env" }]] },
"PermissionsMode": "ALLOW_ALL"
}
}
"resourceType": "AWS::QLDB::Ledger",
"filePath": null
}
]
},
{
"AWS::QLDB::Ledger": {
"Type": "AWS::QLDB::Ledger",
"Properties": {}
},
"AWS::LicenseManager::License": {
"Type": "AWS::LicenseManager::License",
Parameters
-
PermissionsMode
required - String -
DeletionProtection
optional - Boolean -
KmsKey
optional - String -
Tags
optional - List of Tag -
Name
optional - String
Explanation in CloudFormation Registry
The
AWS::QLDB::Ledger
resource specifies a new Amazon Quantum Ledger Database (Amazon QLDB) ledger in your AWS account. Amazon QLDB is a fully managed ledger database that provides a transparent, immutable, and cryptographically verifiable transaction log owned by a central trusted authority. You can use QLDB to track all application data changes, and maintain a complete and verifiable history of changes over time.For more information, see CreateLedger in the Amazon QLDB API Reference.
Frequently asked questions
What is AWS QLDB Ledger?
AWS QLDB Ledger is a resource for QLDB of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS QLDB Ledger?
For Terraform, the codeclout/AccountEd, bridgecrewio/checkov and bridgecrewio/checkov source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the whiteprompt/r-d-qldb-audits, mlewis7127/qldb-node-test and CarbonEconomy/CarbonEconomy source code examples are useful. See the CloudFormation Example section for further details.