Skip to content

Commit

Permalink
add s3_notification_name
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 7, 2024
1 parent 2101cb5 commit 7f8e7d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion s3-config-org/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ No modules.
| <a name="input_access_log_bucket_prefix"></a> [access\_log\_bucket\_prefix](#input\_access\_log\_bucket\_prefix) | Server Access Log bucket prefix, to which the Object Logging bucket name will be appended to make the target\_prefix | `string` | `"s3"` | no |
| <a name="input_account_alias"></a> [account\_alias](#input\_account\_alias) | AWS Account Alias | `string` | `""` | no |
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | AWS Account ID (default will pull from current user) | `string` | `""` | no |
| <a name="input_additional_s3_sqs_names"></a> [additional\_s3\_sqs\_names](#input\_additional\_s3\_sqs\_names) | List of additional SQS queues to create and subscribe to the S3 SNS topic (if enabled) | `list(string)` | `[]` | no |
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | Organization Config S3 bucket name | `string` | `null` | no |
| <a name="input_bucket_name_prefix"></a> [bucket\_name\_prefix](#input\_bucket\_name\_prefix) | Organization Config S3 bucket prefix, prepended to the AWS account ID and region to make the bucket name. | `string` | `"inf-org-config"` | no |
| <a name="input_component_tags"></a> [component\_tags](#input\_component\_tags) | Additional tags for Components (s3, kms) | `map(map(string))` | <pre>{<br> "kms": {},<br> "s3": {}<br>}</pre> | no |
Expand Down
5 changes: 3 additions & 2 deletions s3-config-org/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ locals {
account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew"
organization_id = data.aws_organizations_organization.org.id

bucket_name = var.bucket_name != null ? var.bucket_name : format("%v-%v-%v", var.bucket_name_prefix, local.account_id, local.region)
key_name = compact([var.key_name, var.bucket_name, var.bucket_name_prefix])[0]
bucket_name = var.bucket_name != null ? var.bucket_name : format("%v-%v-%v", var.bucket_name_prefix, local.account_id, local.region)
key_name = compact([var.key_name, var.bucket_name, var.bucket_name_prefix])[0]
s3_notification_name = var.bucket_name != null ? var.bucket_name : var.bucket_name_prefix

base_tags = {
"Organization" = "census:aditcio:csvd"
Expand Down

0 comments on commit 7f8e7d6

Please sign in to comment.