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
1 change: 0 additions & 1 deletion infrastructure/modules/amp_branch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
| <a name="input_environment_variables"></a> [environment\_variables](#input\_environment\_variables) | Environment variables to be used for amplify branch | `map(string)` | `{}` | no |
| <a name="input_framework"></a> [framework](#input\_framework) | Set what framework to use | `string` | `null` | no |
| <a name="input_group"></a> [group](#input\_group) | The group variables are being inherited from (often synonmous with account short-name) | `string` | n/a | yes |
| <a name="input_module"></a> [module](#input\_module) | The name of this module. This is a special variable, it should be set only here and never overridden. | `string` | `"kms"` | no |
| <a name="input_name"></a> [name](#input\_name) | A unique name to distinguish this module invocation from others within the same CSI scope | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The name of the terraformscaffold project calling the module | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
Expand Down
22 changes: 4 additions & 18 deletions infrastructure/modules/amp_branch/locals.tf
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
locals {
module = "amp"

csi = format(
"%s-%s-%s-%s-%s",
"%s-%s-%s-%s",
var.project,
var.environment,
var.component,
var.module,
var.name,
)

# CSI for use in resources with an account namespace, eg IAM roles
csi_account = replace(
format(
"%s-%s-%s-%s-%s-%s",
var.project,
var.region,
var.environment,
var.component,
var.module,
var.name,
),
"_",
"",
)

default_tags = merge(
var.default_tags,
{
Module = var.module
Module = local.module
Name = local.csi
},
)
Expand Down
10 changes: 0 additions & 10 deletions infrastructure/modules/amp_branch/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ variable "description" {
description = "Description for the branch"
}

##
# Module self-identification
##

variable "module" {
type = string
description = "The name of this module. This is a special variable, it should be set only here and never overridden."
default = "kms"
}

##
# Variable specific to the module
##
Expand Down
1 change: 1 addition & 0 deletions infrastructure/modules/aws-backup-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ No requirements.
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | Default tag map for application to all taggable resources in the module | `map(string)` | `{}` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the environment where AWS Backup is configured. | `string` | n/a | yes |
| <a name="input_management_ci_role_arn"></a> [management\_ci\_role\_arn](#input\_management\_ci\_role\_arn) | ARN of Terraform role used to deploy to account | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | The variable encapsulating the name of this bucket | `string` | n/a | yes |
| <a name="input_notification_kms_key"></a> [notification\_kms\_key](#input\_notification\_kms\_key) | The ARN of the bootstrap KMS key used for encryption at rest of the SNS topic. | `string` | n/a | yes |
| <a name="input_notifications_target_email_address"></a> [notifications\_target\_email\_address](#input\_notifications\_target\_email\_address) | The email address to which backup notifications will be sent via SNS. | `string` | `""` | no |
| <a name="input_principal_org_id"></a> [principal\_org\_id](#input\_principal\_org\_id) | The AWS Org ID (numeric) | `string` | n/a | yes |
Expand Down
5 changes: 4 additions & 1 deletion infrastructure/modules/aws-backup-source/locals.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
locals {
module = "backup"

csi = format(
"%s-%s-%s-%s",
var.project,
var.environment,
var.component,
"backup"
var.name
)

csi_underscore = replace(local.csi,"-","_")
Expand All @@ -13,6 +15,7 @@ locals {
var.default_tags,
{
Name = local.csi
Module = local.module
},
)
}
5 changes: 5 additions & 0 deletions infrastructure/modules/aws-backup-source/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ variable "component" {
description = "The name of the tfscaffold component"
}

variable "name" {
type = string
description = "The variable encapsulating the name of this bucket"
}

variable "default_tags" {
type = map(string)
description = "Default tag map for application to all taggable resources in the module"
Expand Down
1 change: 0 additions & 1 deletion infrastructure/modules/eventpub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | KMS key arn to use for this function | `string` | n/a | yes |
| <a name="input_log_level"></a> [log\_level](#input\_log\_level) | The log level to be used in lambda functions within the component. Any log with a lower severity than the configured value will not be logged: https://docs.python.org/3/library/logging.html#levels | `string` | `"WARN"` | no |
| <a name="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The retention period in days for the Cloudwatch Logs events generated by the lambda function | `number` | n/a | yes |
| <a name="input_module"></a> [module](#input\_module) | The name of this module. This is a special variable, it should be set only here and never overridden. | `string` | `"eventpub"` | no |
| <a name="input_name"></a> [name](#input\_name) | A unique name to distinguish this module invocation from others within the same CSI scope | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The name of the terraformscaffold project calling the module | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/modules/eventpub/locals.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
locals {
module = "eventpub"

csi = replace(
format(
"%s-%s-%s-%s",
Expand All @@ -13,7 +15,7 @@ locals {
default_tags = merge(
var.default_tags,
{
Module = var.module
Module = local.module
Name = local.csi
},
)
Expand Down
10 changes: 0 additions & 10 deletions infrastructure/modules/eventpub/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ variable "group" {
default = null
}

##
# Module self-identification
##

variable "module" {
type = string
description = "The name of this module. This is a special variable, it should be set only here and never overridden."
default = "eventpub"
}

##
# Variable specific to the module
##
Expand Down
1 change: 0 additions & 1 deletion infrastructure/modules/kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the terraformscaffold environment the module is called for | `string` | n/a | yes |
| <a name="input_iam_delegation"></a> [iam\_delegation](#input\_iam\_delegation) | Whether to delegate administration of the key to the local account. Defaults to true | `bool` | `true` | no |
| <a name="input_key_policy_documents"></a> [key\_policy\_documents](#input\_key\_policy\_documents) | List of KMS key policy JSON documents | `list(string)` | `[]` | no |
| <a name="input_module"></a> [module](#input\_module) | The name of this module. This is a special variable, it should be set only here and never overridden. | `string` | `"kms"` | no |
| <a name="input_name"></a> [name](#input\_name) | A unique name to distinguish this module invocation from others within the same CSI scope | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The name of the terraformscaffold project calling the module | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
Expand Down
10 changes: 5 additions & 5 deletions infrastructure/modules/kms/locals.tf
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
locals {
module = "kms"

csi = format(
"%s-%s-%s-%s-%s",
"%s-%s-%s-%s",
var.project,
var.environment,
var.component,
var.module,
var.name,
)

# CSI for use in resources with an account namespace, eg IAM roles
csi_account = replace(
format(
"%s-%s-%s-%s-%s-%s",
"%s-%s-%s-%s-%s",
var.project,
var.region,
var.environment,
var.component,
var.module,
var.name,
),
"_",
Expand All @@ -26,7 +26,7 @@ locals {
default_tags = merge(
var.default_tags,
{
Module = var.module
Module = local.module
Name = local.csi
},
)
Expand Down
10 changes: 0 additions & 10 deletions infrastructure/modules/kms/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ variable "aws_account_id" {
description = "The AWS Account ID (numeric)"
}

##
# Module self-identification
##

variable "module" {
type = string
description = "The name of this module. This is a special variable, it should be set only here and never overridden."
default = "kms"
}

##
# Variable specific to the module
##
Expand Down
1 change: 0 additions & 1 deletion infrastructure/modules/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
| <a name="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The retention period in days for the Cloudwatch Logs events generated by the lambda function | `number` | n/a | yes |
| <a name="input_log_subscription_lambda_create_permission"></a> [log\_subscription\_lambda\_create\_permission](#input\_log\_subscription\_lambda\_create\_permission) | Whether to create a permission for the log forwarder. Set to false if using a generic one. | `bool` | `true` | no |
| <a name="input_memory"></a> [memory](#input\_memory) | The amount of memory to apply to the created Lambda | `number` | n/a | yes |
| <a name="input_module"></a> [module](#input\_module) | The variable encapsulating the name of this module | `string` | `"lambda"` | no |
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
| <a name="input_runtime"></a> [runtime](#input\_runtime) | The runtime to use for the lambda function | `string` | n/a | yes |
Expand Down
8 changes: 5 additions & 3 deletions infrastructure/modules/lambda/locals.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
locals {
module = "lambda"

# Compound Scope Identifier
csi = replace(
format(
"%s-%s-%s-%s-%s",
"%s-%s-%s-%s",
var.project,
var.environment,
var.component,
var.module,
var.function_name,
),
"_",
Expand All @@ -16,7 +17,8 @@ locals {
default_tags = merge(
var.default_tags,
{
"Module" = var.module
"Name" = local.csi
"Module" = local.module
},
)
}
6 changes: 0 additions & 6 deletions infrastructure/modules/lambda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ variable "kms_key_arn" {
# tfscaffold variables specific to this module
##

variable "module" {
type = string
description = "The variable encapsulating the name of this module"
default = "lambda"
}

variable "default_tags" {
type = map(string)
description = "A map of default tags to apply to all taggable resources within the component"
Expand Down
1 change: 0 additions & 1 deletion infrastructure/modules/s3bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | Boolean to toggle force destroy of bucket. Defaults to true; should be changed in exceptional circumstances | `bool` | `true` | no |
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | ARN of default encryption KMS key for this bucket. If omitted, will use AES256 | `string` | `null` | no |
| <a name="input_lifecycle_rules"></a> [lifecycle\_rules](#input\_lifecycle\_rules) | Object representing the lifecycle rules of the bucket | `any` | `[]` | no |
| <a name="input_module"></a> [module](#input\_module) | The variable encapsulating the name of this module | `string` | `"s3bucket"` | no |
| <a name="input_name"></a> [name](#input\_name) | The variable encapsulating the name of this bucket | `string` | n/a | yes |
| <a name="input_notification_events"></a> [notification\_events](#input\_notification\_events) | Object representing the notification events for the bucket | `any` | `{}` | no |
| <a name="input_object_ownership"></a> [object\_ownership](#input\_object\_ownership) | Ownership of objects written to the bucket | `string` | `"BucketOwnerEnforced"` | no |
Expand Down
19 changes: 4 additions & 15 deletions infrastructure/modules/s3bucket/locals.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
locals {
# Compound Scope Identifier
csi = replace(
format(
"%s-%s-%s-%s",
var.project,
var.environment,
var.component,
var.name,
),
"_",
"",
)
module = "s3bucket"

# CSI for use in resources with a global namespace, i.e. S3 Buckets
csi_global = replace(
Expand All @@ -24,14 +13,14 @@ locals {
var.name,
),
"_",
"",
"",s
)

default_tags = merge(
var.default_tags,
{
Module = var.module
Name = var.name
Module = local.module
Name = local.csi_global
},
)

Expand Down
6 changes: 0 additions & 6 deletions infrastructure/modules/s3bucket/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ variable "region" {
# tfscaffold variables specific to this module
##

variable "module" {
type = string
description = "The variable encapsulating the name of this module"
default = "s3bucket"
}

variable "default_tags" {
type = map(string)
description = "A map of default tags to apply to all taggable resources within the component"
Expand Down
1 change: 0 additions & 1 deletion infrastructure/modules/sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
| <a name="input_kms_data_key_reuse_period_seconds"></a> [kms\_data\_key\_reuse\_period\_seconds](#input\_kms\_data\_key\_reuse\_period\_seconds) | The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours) | `number` | `300` | no |
| <a name="input_max_message_size"></a> [max\_message\_size](#input\_max\_message\_size) | The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB) | `number` | `262144` | no |
| <a name="input_message_retention_seconds"></a> [message\_retention\_seconds](#input\_message\_retention\_seconds) | The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days) | `number` | `null` | no |
| <a name="input_module"></a> [module](#input\_module) | The variable encapsulating the name of this module | `string` | `"sqs"` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the SQS Queue | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
Expand Down
18 changes: 3 additions & 15 deletions infrastructure/modules/sqs/locals.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
locals {
module = "sqs"

# Compound Scope Identifier
csi = replace(
format(
Expand All @@ -12,24 +14,10 @@ locals {
"",
)

# CSI for use in resources with a global namespace, i.e. S3 Buckets
csi_global = replace(
format(
"%s-%s-%s-%s-%s",
var.project,
var.aws_account_id,
var.region,
var.environment,
var.component,
),
"_",
"",
)

default_tags = merge(
var.default_tags,
{
Module = var.module
Module = local.module
Name = local.csi
},
)
Expand Down
6 changes: 0 additions & 6 deletions infrastructure/modules/sqs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ variable "region" {
# tfscaffold variables specific to this module
##

variable "module" {
type = string
description = "The variable encapsulating the name of this module"
default = "sqs"
}

variable "default_tags" {
type = map(string)
description = "A map of default tags to apply to all taggable resources within the component"
Expand Down