Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions modules-metadata/dynamodb-table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"attributes": {
"default": [],
"description": "List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties: name - (Required) The name of the attribute, type - (Required) Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data",
"type": "list(map(string))"
},
"billing_mode": {
"default": "PAY_PER_REQUEST",
"description": "Controls how you are billed for read/write throughput and how you manage capacity. The valid values are PROVISIONED or PAY_PER_REQUEST",
"type": "string"
},
"create_table": {
"default": true,
"description": "Controls if DynamoDB table and associated resources are created",
"type": "bool"
},
"global_secondary_indexes": {
"default": [],
"description": "Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.",
"type": "list(any)"
},
"hash_key": {
"default": "null",
"description": "The attribute to use as the hash (partition) key. Must also be defined as an attribute",
"type": "string"
},
"local_secondary_indexes": {
"default": [],
"description": "Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.",
"type": "list(any)"
},
"name": {
"default": "null",
"description": "Name of the DynamoDB table",
"type": "string"
},
"point_in_time_recovery_enabled": {
"default": false,
"description": "Whether to enable point-in-time recovery",
"type": "bool"
},
"range_key": {
"default": "null",
"description": "The attribute to use as the range (sort) key. Must also be defined as an attribute",
"type": "string"
},
"read_capacity": {
"default": "null",
"description": "The number of read units for this table. If the billing_mode is PROVISIONED, this field should be greater than 0",
"type": "number"
},
"server_side_encryption_enabled": {
"default": false,
"description": "Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK)",
"type": "bool"
},
"server_side_encryption_kms_key_arn": {
"default": "null",
"description": "The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.",
"type": "string"
},
"stream_enabled": {
"default": false,
"description": "Indicates whether Streams are to be enabled (true) or disabled (false).",
"type": "bool"
},
"stream_view_type": {
"default": "null",
"description": "When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.",
"type": "string"
},
"tags": {
"default": {},
"description": "A map of tags to add to all resources",
"type": "map(string)"
},
"timeouts": {
"default": {
"create": "10m",
"delete": "10m",
"update": "60m"
},
"description": "Updated Terraform resource management timeouts",
"type": "map(string)"
},
"ttl_attribute_name": {
"default": "",
"description": "The name of the table attribute to store the TTL timestamp in",
"type": "string"
},
"ttl_enabled": {
"default": false,
"description": "Indicates whether ttl is enabled",
"type": "bool"
},
"write_capacity": {
"default": "null",
"description": "The number of write units for this table. If the billing_mode is PROVISIONED, this field should be greater than 0",
"type": "number"
}
}
1 change: 1 addition & 0 deletions modules-metadata/dynamodb-table_cloudcraft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
101 changes: 101 additions & 0 deletions modules-metadata/dynamodb-table_variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"attributes": {
"default": [],
"description": "List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties: name - (Required) The name of the attribute, type - (Required) Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data",
"type": "list(map(string))"
},
"billing_mode": {
"default": "PAY_PER_REQUEST",
"description": "Controls how you are billed for read/write throughput and how you manage capacity. The valid values are PROVISIONED or PAY_PER_REQUEST",
"type": "string"
},
"create_table": {
"default": true,
"description": "Controls if DynamoDB table and associated resources are created",
"type": "bool"
},
"global_secondary_indexes": {
"default": [],
"description": "Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.",
"type": "list(any)"
},
"hash_key": {
"default": "null",
"description": "The attribute to use as the hash (partition) key. Must also be defined as an attribute",
"type": "string"
},
"local_secondary_indexes": {
"default": [],
"description": "Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.",
"type": "list(any)"
},
"name": {
"default": "null",
"description": "Name of the DynamoDB table",
"type": "string"
},
"point_in_time_recovery_enabled": {
"default": false,
"description": "Whether to enable point-in-time recovery",
"type": "bool"
},
"range_key": {
"default": "null",
"description": "The attribute to use as the range (sort) key. Must also be defined as an attribute",
"type": "string"
},
"read_capacity": {
"default": "null",
"description": "The number of read units for this table. If the billing_mode is PROVISIONED, this field should be greater than 0",
"type": "number"
},
"server_side_encryption_enabled": {
"default": false,
"description": "Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK)",
"type": "bool"
},
"server_side_encryption_kms_key_arn": {
"default": "null",
"description": "The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.",
"type": "string"
},
"stream_enabled": {
"default": false,
"description": "Indicates whether Streams are to be enabled (true) or disabled (false).",
"type": "bool"
},
"stream_view_type": {
"default": "null",
"description": "When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.",
"type": "string"
},
"tags": {
"default": {},
"description": "A map of tags to add to all resources",
"type": "map(string)"
},
"timeouts": {
"default": {
"create": "10m",
"delete": "10m",
"update": "60m"
},
"description": "Updated Terraform resource management timeouts",
"type": "map(string)"
},
"ttl_attribute_name": {
"default": "",
"description": "The name of the table attribute to store the TTL timestamp in",
"type": "string"
},
"ttl_enabled": {
"default": false,
"description": "Indicates whether ttl is enabled",
"type": "bool"
},
"write_capacity": {
"default": "null",
"description": "The number of write units for this table. If the billing_mode is PROVISIONED, this field should be greater than 0",
"type": "number"
}
}
1 change: 1 addition & 0 deletions modules-metadata/dynamodb-table_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.3.0
20 changes: 20 additions & 0 deletions modules-metadata/s3-bucket.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
"description": "Controls if S3 bucket should have bucket policy attached (set to `true` to use value of `policy` as bucket policy)",
"type": "bool"
},
"block_public_acls": {
"default": false,
"description": "Whether Amazon S3 should block public ACLs for this bucket.",
"type": "bool"
},
"block_public_policy": {
"default": false,
"description": "Whether Amazon S3 should block public bucket policies for this bucket.",
"type": "bool"
},
"bucket": {
"default": "null",
"description": "(Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name.",
Expand All @@ -44,6 +54,11 @@
"description": "(Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.",
"type": "bool"
},
"ignore_public_acls": {
"default": false,
"description": "Whether Amazon S3 should ignore public ACLs for this bucket.",
"type": "bool"
},
"lifecycle_rule": {
"default": [],
"description": "List of maps containing configuration of object lifecycle management.",
Expand Down Expand Up @@ -79,6 +94,11 @@
"description": "(Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information.",
"type": "string"
},
"restrict_public_buckets": {
"default": false,
"description": "Whether Amazon S3 should restrict public bucket policies for this bucket.",
"type": "bool"
},
"server_side_encryption_configuration": {
"default": {},
"description": "Map containing server-side encryption configuration.",
Expand Down
20 changes: 20 additions & 0 deletions modules-metadata/s3-bucket_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
"description": "Controls if S3 bucket should have bucket policy attached (set to `true` to use value of `policy` as bucket policy)",
"type": "bool"
},
"block_public_acls": {
"default": false,
"description": "Whether Amazon S3 should block public ACLs for this bucket.",
"type": "bool"
},
"block_public_policy": {
"default": false,
"description": "Whether Amazon S3 should block public bucket policies for this bucket.",
"type": "bool"
},
"bucket": {
"default": "null",
"description": "(Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name.",
Expand All @@ -44,6 +54,11 @@
"description": "(Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable.",
"type": "bool"
},
"ignore_public_acls": {
"default": false,
"description": "Whether Amazon S3 should ignore public ACLs for this bucket.",
"type": "bool"
},
"lifecycle_rule": {
"default": [],
"description": "List of maps containing configuration of object lifecycle management.",
Expand Down Expand Up @@ -79,6 +94,11 @@
"description": "(Optional) Specifies who should bear the cost of Amazon S3 data transfer. Can be either BucketOwner or Requester. By default, the owner of the S3 bucket would incur the costs of any data transfer. See Requester Pays Buckets developer guide for more information.",
"type": "string"
},
"restrict_public_buckets": {
"default": false,
"description": "Whether Amazon S3 should restrict public bucket policies for this bucket.",
"type": "bool"
},
"server_side_encryption_configuration": {
"default": {},
"description": "Map containing server-side encryption configuration.",
Expand Down
2 changes: 1 addition & 1 deletion modules-metadata/s3-bucket_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.5.0
v1.6.0
6 changes: 4 additions & 2 deletions modules-metadata/update_modules_metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ sns
sqs
vpc
redshift
s3-bucket)
s3-bucket
dynamodb-table)
#cloudfront

MODULES_DIR=/Users/Bob/Sites/terraform-aws-modules
MODULES_DIR=~/Sites/terraform-aws-modules

for module in "${MODULES[@]}"; do

Expand All @@ -34,6 +35,7 @@ for module in "${MODULES[@]}"; do
# hcltool comes from https://github.com/virtuald/pyhcl/blob/master/scripts/hcltool
hcltool "$tmp_file_tf" | jq -r '.variable' > ${module}_variables.json

test -f ${module}_cloudcraft.json || echo "{}" > ${module}_cloudcraft.json
jq -s '.[0] * .[1]' ${module}_variables.json ${module}_cloudcraft.json > ${module}.json

rm -f "$tmp_file_tf"
Expand Down
Loading