Skip to content

Commit

Permalink
Merge pull request #7 from ministryofjustice/versions
Browse files Browse the repository at this point in the history
Fix versions, variables and add outputs.tf file
  • Loading branch information
jakemulley authored Feb 9, 2021
2 parents de29ec3 + 47079c5 commit 68fbeec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_s3_bucket" "default" {
prevent_destroy = true
}

dynamic lifecycle_rule {
dynamic "lifecycle_rule" {
for_each = var.enable_lifecycle_rules ? [var.enable_lifecycle_rules] : []

content {
Expand All @@ -32,7 +32,7 @@ resource "aws_s3_bucket" "default" {
}
}

dynamic logging {
dynamic "logging" {
for_each = (length(var.log_bucket) > 0) ? [var.log_bucket] : []

content {
Expand Down
3 changes: 0 additions & 3 deletions output.tf

This file was deleted.

4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "bucket" {
value = aws_s3_bucket.default
description = "Direct aws_s3_bucket resource with all attributes"
}
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variable "acl" {
variable "bucket_policy" {
type = string
description = "JSON for the bucket policy"
default = ""
default = "{}"
}

variable "bucket_prefix" {
Expand Down Expand Up @@ -52,6 +52,6 @@ variable "replication_role_arn" {
}

variable "tags" {
type = map
type = map(any)
description = "Tags to apply to resources, where applicable"
}
3 changes: 2 additions & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
version = ">= 3.20.0"
}
}
required_version = ">= 0.13"
Expand Down

0 comments on commit 68fbeec

Please sign in to comment.