I hereby claim:
- I am tcondeixa on github.
- I am tcondeixa (https://keybase.io/tcondeixa) on keybase.
- I have a public key ASAeYvxDBB8gHD4uHXTJ_dYRNlobmWl3a0HNrfjLb79GmAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
output "s3_bucket" { | |
description = "map with arn, name and id of the s3 bucket example s3_bucket[\"arn\"]" | |
value = module.s3.s3_bucket | |
} |
variable "aws_region" { | |
description = "aws region to be used" | |
type = string | |
} | |
variable "environment" { | |
description = "environment to associate example dev, staging, production" | |
type = string | |
} |
output "s3_bucket" { | |
description = "map with arn, name and id of the s3 bucket example s3_bucket[\"arn\"]" | |
value = map ( | |
"arn", var.create ? aws_s3_bucket.bucket[0].arn : null, | |
"name", var.create ? aws_s3_bucket.bucket[0].bucket : null, | |
"id", var.create ? aws_s3_bucket.bucket[0].id : null | |
) | |
} |
variable "aws_region" { | |
description = "region to create the bucket" | |
type = string | |
} | |
variable "name" { | |
description = "name of the bucket before appending other things" | |
type = string | |
} |
locals { | |
encryption_alg = var.rest_encryption ? [{sse_algorithm: "AES256"}] : [] | |
replication = var.backup_replication ? [{status: "Enabled"}] : [] | |
expiration_days = var.expiration_days != 0 ? [{days: var.expiration_days}] : [] | |
noncurrent_version_expiration = var.expiration_versioning_days != 0 ? [{days: var.expiration_versioning_days}] : [] | |
cors_rule = var.cors_enable ? [var.cors_rule] : [] | |
website = var.website_enable ? [var.website] : [] | |
} | |
resource "aws_s3_bucket" "bucket" { |
module "s3" { | |
source = "../../../../basic_modules/aws/s3_bucket/v1" | |
create = true | |
aws_region = var.aws_region | |
environment = var.environment | |
namespace = var.namespace | |
name = "${var.environment}-${var.namespace}-${var.name}-${var.aws_region}${var.domain}" | |
folders = var.folders |
I hereby claim:
To claim this, I am signing this object: