From 95f83041bd756287956652ed96802ce9e1dfd30f Mon Sep 17 00:00:00 2001 From: Sion Smith Date: Sun, 8 Nov 2020 16:52:24 +0000 Subject: [PATCH] updated TF version renaming resoruces updating S3 git ref --- aws_cloudfront_distribution.tf | 4 ++-- ...ront_logging.tf => module_s3_bucket_cloudfront_logging.tf | 5 +++-- outputs.tf | 2 +- terraform.tf | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) rename aws_s3_bucket_cloudfront_logging.tf => module_s3_bucket_cloudfront_logging.tf (78%) create mode 100644 terraform.tf diff --git a/aws_cloudfront_distribution.tf b/aws_cloudfront_distribution.tf index 9aa66e9..28c93dc 100644 --- a/aws_cloudfront_distribution.tf +++ b/aws_cloudfront_distribution.tf @@ -33,7 +33,7 @@ resource "aws_cloudfront_distribution" "s3_distribution" { ] logging_config { - bucket = module.bucket-cloudwatch-logs-backup.bucket_domain_name + bucket = module.bucket_cloudwatch_logs_backup.bucket_domain_name include_cookies = false prefix = "cloudfront/" } @@ -78,7 +78,7 @@ resource "aws_cloudfront_distribution" "s3_distribution" { #tags tags = var.common_tags - depends_on = [module.bucket-cloudwatch-logs-backup, aws_acm_certificate.certificate] + depends_on = [module.bucket_cloudwatch_logs_backup, aws_acm_certificate.certificate] } resource "aws_cloudfront_origin_access_identity" "current" {} diff --git a/aws_s3_bucket_cloudfront_logging.tf b/module_s3_bucket_cloudfront_logging.tf similarity index 78% rename from aws_s3_bucket_cloudfront_logging.tf rename to module_s3_bucket_cloudfront_logging.tf index edb4208..97291b1 100644 --- a/aws_s3_bucket_cloudfront_logging.tf +++ b/module_s3_bucket_cloudfront_logging.tf @@ -1,5 +1,6 @@ -module "bucket-cloudwatch-logs-backup" { - source = "../../aws-terraform-module-s3" +module "bucket_cloudwatch_logs_backup" { + source = "git::ssh://git@github.com/osodevops/aws-terraform-module-s3.git" +// source = "../../aws-terraform-module-s3" s3_bucket_name = local.logging_bucket_name s3_bucket_force_destroy = false s3_bucket_policy = "" diff --git a/outputs.tf b/outputs.tf index 9e40d70..694c8fa 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,5 +1,5 @@ output "logging_bucket" { - value = module.bucket-cloudwatch-logs-backup.s3_id + value = module.bucket_cloudwatch_logs_backup.s3_id } output "distribution" { diff --git a/terraform.tf b/terraform.tf new file mode 100644 index 0000000..106ecff --- /dev/null +++ b/terraform.tf @@ -0,0 +1,3 @@ +terraform { + required_version = ">= 0.13.5" +}