diff --git a/example/main.tf b/example/main.tf index b909a04..93ac9ab 100644 --- a/example/main.tf +++ b/example/main.tf @@ -5,16 +5,17 @@ module "cloudfront_auth" { cloudfront_distribution = "private.example.com" client_id = "CHANGE_ME" client_secret = "CHANGE_ME" + base_uri = "https://auth-xxxxxx.auth.us-east-1.amazoncognito.com" redirect_uri = "https://private.example.com/callback" github_organization = "exampleorg" bucket_name = "private.example.com" region = "eu-west-1" - cloudfront_acm_certificate_arn = "${aws_acm_certificate.cert.arn}" + cloudfront_acm_certificate_arn = aws_acm_certificate.cert.arn } resource "aws_acm_certificate" "cert" { - provider = "aws.us-east-1" + provider = aws.us-east-1 domain_name = "example.com" validation_method = "EMAIL" subject_alternative_names = [ @@ -24,9 +25,9 @@ resource "aws_acm_certificate" "cert" { // A test object for the bucket. resource "aws_s3_bucket_object" "test_object" { - bucket = "${module.cloudfront_auth.s3_bucket}" + bucket = module.cloudfront_auth.s3_bucket key = "index.html" source = "${path.module}/index.html" content_type = "text/html" - etag = "${md5(file("${path.module}/index.html"))}" + etag = sha256(file("${path.module}/index.html")) } diff --git a/main.tf b/main.tf index 1e080a8..b5f1cfa 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,22 @@ +# +# Local nvm presence check +# +resource "null_resource" "check_nvm" { + provisioner "local-exec" { + command = <