Skip to content

Commit

Permalink
- add variable versioning_configuration, default to Disabled, but set…
Browse files Browse the repository at this point in the history
… to Suspended if existing bucket

  - s3-access-logs
  - s3-flow-logs
  - config
  • Loading branch information
badra001 committed Jul 12, 2022
1 parent 34c1dd6 commit 8ada8d4
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,9 @@
- cloudtrail
- add additional_sqs_names to create more SQS queues and assign to the same SNS
- output s3, sqs, and sns detail

* 2.1.1 -- 2022-07-12
- add variable versioning_configuration, default to Disabled, but set to Suspended if existing bucket
- s3-access-logs
- s3-flow-logs
- config
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "2.1.0"
_module_version = "2.1.1"
}
1 change: 1 addition & 0 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ No modules.
| <a name="input_name"></a> [name](#input\_name) | Config resource name prefix used for all resources | `string` | `""` | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component (efs, s3, ebs, kms, role, policy, security-group). This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources (S3, KMS). Do not include safeguard tags here, use the data\_safeguard field for such things. | `map(string)` | `{}` | no |
| <a name="input_versioning_configuration"></a> [versioning\_configuration](#input\_versioning\_configuration) | S3 Versioning Configuration (Enabled, Disabled, Suspended). To disable, use Suspended if existing bucket and Disabled if new | `string` | `"Disabled"` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion config/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "config" {
resource "aws_s3_bucket_versioning" "config" {
bucket = aws_s3_bucket.config.id
versioning_configuration {
status = "Disabled"
status = var.versioning_configuration
}
}
6 changes: 6 additions & 0 deletions config/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ variable "component_tags" {
type = map(map(string))
default = { "s3" = {}, "kms" = {}, }
}

variable "versioning_configuration" {
description = "S3 Versioning Configuration (Enabled, Disabled, Suspended). To disable, use Suspended if existing bucket and Disabled if new"
type = string
default = "Disabled"
}
1 change: 1 addition & 0 deletions s3-access-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ No modules.
| <a name="input_component_tags"></a> [component\_tags](#input\_component\_tags) | Additional tags for Components (s3, kms, ddb) | `map(map(string))` | <pre>{<br> "ddb": {},<br> "kms": {},<br> "s3": {}<br>}</pre> | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component (efs, s3, ebs, kms, role, policy, security-group). This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources (S3, KMS). Do not include safeguard tags here, use the data\_safeguard field for such things. | `map(string)` | `{}` | no |
| <a name="input_versioning_configuration"></a> [versioning\_configuration](#input\_versioning\_configuration) | S3 Versioning Configuration (Enabled, Disabled, Suspended). To disable, use Suspended if existing bucket and Disabled if new | `string` | `"Disabled"` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion s3-access-logs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ resource "aws_s3_bucket_public_access_block" "logs" {
resource "aws_s3_bucket_versioning" "logs" {
bucket = aws_s3_bucket.logs.id
versioning_configuration {
status = "Disabled"
status = var.versioning_configuration
}
}

Expand Down
6 changes: 6 additions & 0 deletions s3-access-logs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ variable "component_tags" {
type = map(map(string))
default = { "s3" = {}, "kms" = {}, "ddb" = {} }
}

variable "versioning_configuration" {
description = "S3 Versioning Configuration (Enabled, Disabled, Suspended). To disable, use Suspended if existing bucket and Disabled if new"
type = string
default = "Disabled"
}
1 change: 1 addition & 0 deletions s3-flow-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ No modules.
| <a name="input_component_tags"></a> [component\_tags](#input\_component\_tags) | Additional tags for Components (s3, kms, ddb) | `map(map(string))` | <pre>{<br> "ddb": {},<br> "kms": {},<br> "s3": {}<br>}</pre> | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component (efs, s3, ebs, kms, role, policy, security-group). This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources (S3, KMS). Do not include safeguard tags here, use the data\_safeguard field for such things. | `map(string)` | `{}` | no |
| <a name="input_versioning_configuration"></a> [versioning\_configuration](#input\_versioning\_configuration) | S3 Versioning Configuration (Enabled, Disabled, Suspended). To disable, use Suspended if existing bucket and Disabled if new | `string` | `"Disabled"` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion s3-flow-logs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "flowlogs" {
resource "aws_s3_bucket_versioning" "flowlogs" {
bucket = aws_s3_bucket.flowlogs.id
versioning_configuration {
status = "Disabled"
status = var.versioning_configuration
}
}
6 changes: 6 additions & 0 deletions s3-flow-logs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ variable "component_tags" {
type = map(map(string))
default = { "s3" = {}, "kms" = {}, "ddb" = {} }
}

variable "versioning_configuration" {
description = "S3 Versioning Configuration (Enabled, Disabled, Suspended). To disable, use Suspended if existing bucket and Disabled if new"
type = string
default = "Disabled"
}

0 comments on commit 8ada8d4

Please sign in to comment.