Skip to content

Commit

Permalink
update s3 bucket ref, make table resources conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsweetman committed Dec 15, 2023
1 parent f6dd8f2 commit 8b87bfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data "aws_vpc" "shared" {

module "s3-bucket" {
count = var.existing_bucket_name == "" && var.access_logs ? 1 : 0
source = "github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=8688bc15a08fbf5a4f4eef9b7433c5a417df8df1" # v7.0.0
source = "github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=7.1.0"

providers = {
aws.bucket-replication = aws.bucket-replication
Expand Down Expand Up @@ -326,6 +326,7 @@ resource "aws_iam_role_policy_attachment" "glue_service" {

# Catalog Tables
resource "aws_glue_catalog_table" "application_lb_logs" {
count = var.access_logs && var.load_balancer_type == "application" ? 1 : 0
name = "${var.application_name}-application-lb-logs"
database_name = aws_athena_database.lb-access-logs[0].name

Expand Down Expand Up @@ -471,6 +472,7 @@ resource "aws_glue_catalog_table" "application_lb_logs" {
}

resource "aws_glue_catalog_table" "network_lb_logs" {
count = var.access_logs && var.load_balancer_type == "network" ? 1 : 0
name = "${var.application_name}-network-lb-logs"
database_name = aws_athena_database.lb-access-logs[0].name

Expand Down

0 comments on commit 8b87bfe

Please sign in to comment.