From 0861dd83bd06da915d326f0cbdedc238b012dc8c Mon Sep 17 00:00:00 2001 From: Mikhail Naletov <36846182+okgolove@users.noreply.github.com> Date: Fri, 13 Nov 2020 01:47:06 +0200 Subject: [PATCH] Use fresh null label and context (#76) * Use fresh null label and context * Updated README.md * Do not use extra label * Fix wrong label usage * Apply suggestions from code review Co-authored-by: Andriy Knysh * Change expected resources name in terratest Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com> Co-authored-by: Andriy Knysh --- README.md | 22 ++-- context.tf | 167 +++++++++++++++++++++++++++++ docs/terraform.md | 22 ++-- main.tf | 25 +---- replication.tf | 6 +- test/src/examples_complete_test.go | 4 +- variables.tf | 90 ---------------- 7 files changed, 201 insertions(+), 135 deletions(-) create mode 100644 context.tf diff --git a/README.md b/README.md index fce9f62..eac81f6 100644 --- a/README.md +++ b/README.md @@ -236,34 +236,36 @@ Available targets: | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | acl | The canned ACL to apply to the S3 bucket | `string` | `"private"` | no | -| additional\_tag\_map | Additional tags for appending to each tag map | `map(string)` | `{}` | no | +| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no | | arn\_format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | `string` | `"arn:aws"` | no | -| attributes | Additional attributes (e.g. `state`) | `list(string)` |
[
"state"
]
| no | +| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no | | billing\_mode | DynamoDB billing mode | `string` | `"PROVISIONED"` | no | | block\_public\_acls | Whether Amazon S3 should block public ACLs for this bucket | `bool` | `true` | no | | block\_public\_policy | Whether Amazon S3 should block public bucket policies for this bucket | `bool` | `true` | no | -| context | Default context to use for passing state between label invocations |
object({
namespace = string
environment = string
stage = string
name = string
enabled = bool
delimiter = string
attributes = list(string)
label_order = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
})
|
{
"additional_tag_map": {},
"attributes": [],
"delimiter": "",
"enabled": true,
"environment": "",
"label_order": [],
"name": "",
"namespace": "",
"regex_replace_chars": "",
"stage": "",
"tags": {}
}
| no | -| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | `string` | `"-"` | no | +| context | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. |
object({
enabled = bool
namespace = string
environment = string
stage = string
name = string
delimiter = string
attributes = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
label_order = list(string)
id_length_limit = number
})
|
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_order": [],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {}
}
| no | +| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | | enable\_point\_in\_time\_recovery | Enable DynamoDB point-in-time recovery | `bool` | `false` | no | | enable\_public\_access\_block | Enable Bucket Public Access Block | `bool` | `true` | no | | enable\_server\_side\_encryption | Enable DynamoDB server-side encryption | `bool` | `true` | no | -| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no | +| enabled | Set to false to prevent the module from creating any resources | `bool` | `null` | no | +| environment | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no | | force\_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable | `bool` | `false` | no | +| id\_length\_limit | Limit `id` to this many characters.
Set to `0` for unlimited length.
Set to `null` for default, which is `0`.
Does not affect `id_full`. | `number` | `null` | no | | ignore\_public\_acls | Whether Amazon S3 should ignore public ACLs for this bucket | `bool` | `true` | no | -| label\_order | The naming order of the id output and Name tag | `list(string)` | `[]` | no | +| label\_order | The naming order of the id output and Name tag.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no | | mfa\_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) | `bool` | `false` | no | -| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `"terraform"` | no | -| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `""` | no | +| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no | +| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no | | prevent\_unencrypted\_uploads | Prevent uploads of unencrypted objects to S3 | `bool` | `true` | no | | profile | AWS profile name as set in the shared credentials file | `string` | `""` | no | | read\_capacity | DynamoDB read capacity units | `number` | `5` | no | -| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed | `string` | `"/[^a-zA-Z0-9-]/"` | no | +| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no | | restrict\_public\_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket | `bool` | `true` | no | | role\_arn | The role to be assumed | `string` | `""` | no | | s3\_bucket\_name | S3 bucket name. If not provided, the name will be generated by the label module in the format namespace-stage-name | `string` | `""` | no | | s3\_replica\_bucket\_arn | The ARN of the S3 replica bucket (destination) | `string` | `""` | no | | s3\_replication\_enabled | Set this to true and specify `s3_replica_bucket_arn` to enable replication | `bool` | `false` | no | -| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `""` | no | +| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no | | tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no | | terraform\_backend\_config\_file\_name | Name of terraform backend config file | `string` | `"terraform.tf"` | no | | terraform\_backend\_config\_file\_path | Directory for the terraform backend config file, usually `.`. The default is to create no file. | `string` | `""` | no | diff --git a/context.tf b/context.tf new file mode 100644 index 0000000..648917d --- /dev/null +++ b/context.tf @@ -0,0 +1,167 @@ +# +# ONLY EDIT THIS FILE IN github.com/cloudposse/terraform-null-label +# All other instances of this file should be a copy of that one +# +# +# Copy this file from https://github.com/cloudposse/terraform-null-label/blob/master/exports/context.tf +# and then place it in your Terraform module to automatically get +# Cloud Posse's standard configuration inputs suitable for passing +# to Cloud Posse modules. +# +# Modules should access the whole context as `module.this.context` +# to get the input variables with nulls for defaults, +# for example `context = module.this.context`, +# and access individual variables as `module.this.`, +# with final values filled in. +# +# For example, when using defaults, `module.this.context.delimiter` +# will be null, and `module.this.delimiter` will be `-` (hyphen). +# + +module "this" { + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0" + + enabled = var.enabled + namespace = var.namespace + environment = var.environment + stage = var.stage + name = var.name + delimiter = var.delimiter + attributes = var.attributes + tags = var.tags + additional_tag_map = var.additional_tag_map + label_order = var.label_order + regex_replace_chars = var.regex_replace_chars + id_length_limit = var.id_length_limit + + context = var.context +} + +# Copy contents of cloudposse/terraform-null-label/variables.tf here + +variable "context" { + type = object({ + enabled = bool + namespace = string + environment = string + stage = string + name = string + delimiter = string + attributes = list(string) + tags = map(string) + additional_tag_map = map(string) + regex_replace_chars = string + label_order = list(string) + id_length_limit = number + }) + default = { + enabled = true + namespace = null + environment = null + stage = null + name = null + delimiter = null + attributes = [] + tags = {} + additional_tag_map = {} + regex_replace_chars = null + label_order = [] + id_length_limit = null + } + description = <<-EOT + Single object for setting entire context at once. + See description of individual variables for details. + Leave string and numeric variables as `null` to use default value. + Individual variable settings (non-null) override settings in context object, + except for attributes, tags, and additional_tag_map, which are merged. + EOT +} + +variable "enabled" { + type = bool + default = null + description = "Set to false to prevent the module from creating any resources" +} + +variable "namespace" { + type = string + default = null + description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'" +} + +variable "environment" { + type = string + default = null + description = "Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT'" +} + +variable "stage" { + type = string + default = null + description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'" +} + +variable "name" { + type = string + default = null + description = "Solution name, e.g. 'app' or 'jenkins'" +} + +variable "delimiter" { + type = string + default = null + description = <<-EOT + Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`. + Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. + EOT +} + +variable "attributes" { + type = list(string) + default = [] + description = "Additional attributes (e.g. `1`)" +} + +variable "tags" { + type = map(string) + default = {} + description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`" +} + +variable "additional_tag_map" { + type = map(string) + default = {} + description = "Additional tags for appending to tags_as_list_of_maps. Not added to `tags`." +} + +variable "label_order" { + type = list(string) + default = null + description = <<-EOT + The naming order of the id output and Name tag. + Defaults to ["namespace", "environment", "stage", "name", "attributes"]. + You can omit any of the 5 elements, but at least one must be present. + EOT +} + +variable "regex_replace_chars" { + type = string + default = null + description = <<-EOT + Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. + If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. + EOT +} + +variable "id_length_limit" { + type = number + default = null + description = <<-EOT + Limit `id` to this many characters. + Set to `0` for unlimited length. + Set to `null` for default, which is `0`. + Does not affect `id_full`. + EOT +} + +#### End of copy of cloudposse/terraform-null-label/variables.tf diff --git a/docs/terraform.md b/docs/terraform.md index 556d536..657aad2 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -22,34 +22,36 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | acl | The canned ACL to apply to the S3 bucket | `string` | `"private"` | no | -| additional\_tag\_map | Additional tags for appending to each tag map | `map(string)` | `{}` | no | +| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no | | arn\_format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | `string` | `"arn:aws"` | no | -| attributes | Additional attributes (e.g. `state`) | `list(string)` |
[
"state"
]
| no | +| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no | | billing\_mode | DynamoDB billing mode | `string` | `"PROVISIONED"` | no | | block\_public\_acls | Whether Amazon S3 should block public ACLs for this bucket | `bool` | `true` | no | | block\_public\_policy | Whether Amazon S3 should block public bucket policies for this bucket | `bool` | `true` | no | -| context | Default context to use for passing state between label invocations |
object({
namespace = string
environment = string
stage = string
name = string
enabled = bool
delimiter = string
attributes = list(string)
label_order = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
})
|
{
"additional_tag_map": {},
"attributes": [],
"delimiter": "",
"enabled": true,
"environment": "",
"label_order": [],
"name": "",
"namespace": "",
"regex_replace_chars": "",
"stage": "",
"tags": {}
}
| no | -| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | `string` | `"-"` | no | +| context | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. |
object({
enabled = bool
namespace = string
environment = string
stage = string
name = string
delimiter = string
attributes = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
label_order = list(string)
id_length_limit = number
})
|
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_order": [],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {}
}
| no | +| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | | enable\_point\_in\_time\_recovery | Enable DynamoDB point-in-time recovery | `bool` | `false` | no | | enable\_public\_access\_block | Enable Bucket Public Access Block | `bool` | `true` | no | | enable\_server\_side\_encryption | Enable DynamoDB server-side encryption | `bool` | `true` | no | -| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no | +| enabled | Set to false to prevent the module from creating any resources | `bool` | `null` | no | +| environment | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no | | force\_destroy | A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable | `bool` | `false` | no | +| id\_length\_limit | Limit `id` to this many characters.
Set to `0` for unlimited length.
Set to `null` for default, which is `0`.
Does not affect `id_full`. | `number` | `null` | no | | ignore\_public\_acls | Whether Amazon S3 should ignore public ACLs for this bucket | `bool` | `true` | no | -| label\_order | The naming order of the id output and Name tag | `list(string)` | `[]` | no | +| label\_order | The naming order of the id output and Name tag.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no | | mfa\_delete | A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 ) | `bool` | `false` | no | -| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `"terraform"` | no | -| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `""` | no | +| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no | +| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no | | prevent\_unencrypted\_uploads | Prevent uploads of unencrypted objects to S3 | `bool` | `true` | no | | profile | AWS profile name as set in the shared credentials file | `string` | `""` | no | | read\_capacity | DynamoDB read capacity units | `number` | `5` | no | -| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed | `string` | `"/[^a-zA-Z0-9-]/"` | no | +| regex\_replace\_chars | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no | | restrict\_public\_buckets | Whether Amazon S3 should restrict public bucket policies for this bucket | `bool` | `true` | no | | role\_arn | The role to be assumed | `string` | `""` | no | | s3\_bucket\_name | S3 bucket name. If not provided, the name will be generated by the label module in the format namespace-stage-name | `string` | `""` | no | | s3\_replica\_bucket\_arn | The ARN of the S3 replica bucket (destination) | `string` | `""` | no | | s3\_replication\_enabled | Set this to true and specify `s3_replica_bucket_arn` to enable replication | `bool` | `false` | no | -| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `""` | no | +| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no | | tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no | | terraform\_backend\_config\_file\_name | Name of terraform backend config file | `string` | `"terraform.tf"` | no | | terraform\_backend\_config\_file\_path | Directory for the terraform backend config file, usually `.`. The default is to create no file. | `string` | `""` | no | diff --git a/main.tf b/main.tf index 40ff0fd..a70d13e 100644 --- a/main.tf +++ b/main.tf @@ -17,24 +17,9 @@ locals { bucket_name = var.s3_bucket_name != "" ? var.s3_bucket_name : module.s3_bucket_label.id } -module "base_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.17.0" - namespace = var.namespace - environment = var.environment - stage = var.stage - name = var.name - delimiter = var.delimiter - attributes = var.attributes - tags = var.tags - additional_tag_map = var.additional_tag_map - context = var.context - label_order = var.label_order - regex_replace_chars = var.regex_replace_chars -} - module "s3_bucket_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.17.0" - context = module.base_label.context + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0" + context = module.this.context } data "aws_iam_policy_document" "prevent_unencrypted_uploads" { @@ -147,7 +132,7 @@ resource "aws_s3_bucket" "default" { role = aws_iam_role.replication[0].arn rules { - id = module.base_label.id + id = module.this.id prefix = "" status = "Enabled" @@ -172,8 +157,8 @@ resource "aws_s3_bucket_public_access_block" "default" { } module "dynamodb_table_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.17.0" - context = module.base_label.context + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0" + context = module.this.context attributes = compact(concat(var.attributes, ["lock"])) } diff --git a/replication.tf b/replication.tf index 784c1f6..51feac7 100644 --- a/replication.tf +++ b/replication.tf @@ -1,7 +1,7 @@ resource "aws_iam_role" "replication" { count = var.s3_replication_enabled ? 1 : 0 - name = format("%s-replication", module.base_label.id) + name = format("%s-replication", module.this.id) assume_role_policy = data.aws_iam_policy_document.replication_sts[0].json } @@ -25,7 +25,7 @@ data "aws_iam_policy_document" "replication_sts" { resource "aws_iam_policy" "replication" { count = var.s3_replication_enabled ? 1 : 0 - name = format("%s-replication", module.base_label.id) + name = format("%s-replication", module.this.id) policy = data.aws_iam_policy_document.replication[0].json } @@ -63,4 +63,4 @@ resource "aws_iam_role_policy_attachment" "replication" { count = var.s3_replication_enabled ? 1 : 0 role = aws_iam_role.replication[0].name policy_arn = aws_iam_policy.replication[0].arn -} \ No newline at end of file +} diff --git a/test/src/examples_complete_test.go b/test/src/examples_complete_test.go index 3b9ace4..bb6542d 100644 --- a/test/src/examples_complete_test.go +++ b/test/src/examples_complete_test.go @@ -28,14 +28,14 @@ func TestExamplesComplete(t *testing.T) { // Run `terraform output` to get the value of an output variable s3BucketId := terraform.Output(t, terraformOptions, "s3_bucket_id") - expectedS3BucketId := "eg-test-terraform-tfstate-backend-state" + expectedS3BucketId := "eg-test-terraform-tfstate-backend" // Verify we're getting back the outputs we expect assert.Equal(t, expectedS3BucketId, s3BucketId) // Run `terraform output` to get the value of an output variable dynamodbTableName := terraform.Output(t, terraformOptions, "dynamodb_table_name") - expectedDynamodbTableName := "eg-test-terraform-tfstate-backend-state-lock" + expectedDynamodbTableName := "eg-test-terraform-tfstate-backend-lock" // Verify we're getting back the outputs we expect assert.Equal(t, expectedDynamodbTableName, dynamodbTableName) } diff --git a/variables.tf b/variables.tf index ffee766..53561a0 100644 --- a/variables.tf +++ b/variables.tf @@ -1,87 +1,3 @@ -variable "namespace" { - type = string - default = "" - description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'" -} - -variable "environment" { - type = string - default = "" - description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'" -} - -variable "stage" { - type = string - default = "" - description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'" -} - -variable "name" { - type = string - default = "terraform" - description = "Solution name, e.g. 'app' or 'jenkins'" -} - -variable "delimiter" { - type = string - default = "-" - description = "Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`" -} - -variable "attributes" { - type = list(string) - default = ["state"] - description = "Additional attributes (e.g. `state`)" -} - -variable "tags" { - type = map(string) - default = {} - description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`" -} - -variable "additional_tag_map" { - type = map(string) - default = {} - description = "Additional tags for appending to each tag map" -} - -variable "context" { - type = object({ - namespace = string - environment = string - stage = string - name = string - enabled = bool - delimiter = string - attributes = list(string) - label_order = list(string) - tags = map(string) - additional_tag_map = map(string) - regex_replace_chars = string - }) - default = { - namespace = "" - environment = "" - stage = "" - name = "" - enabled = true - delimiter = "" - attributes = [] - label_order = [] - tags = {} - additional_tag_map = {} - regex_replace_chars = "" - } - description = "Default context to use for passing state between label invocations" -} - -variable "label_order" { - type = list(string) - default = [] - description = "The naming order of the id output and Name tag" -} - variable "arn_format" { type = string default = "arn:aws" @@ -162,12 +78,6 @@ variable "restrict_public_buckets" { default = true } -variable "regex_replace_chars" { - type = string - default = "/[^a-zA-Z0-9-]/" - description = "Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed" -} - variable "prevent_unencrypted_uploads" { type = bool default = true