Skip to content

Commit

Permalink
Merge pull request #23 from Optum/Fix/ModuleFile
Browse files Browse the repository at this point in the history
Move to module path for file object
  • Loading branch information
kddejong authored Sep 10, 2019
2 parents 3b82ef8 + 737484e commit efcd4f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions modules/artifacts_bucket.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
locals {
redbox_principal_policy = var.redbox_principal_policy == "" ? "${path.module}/fixtures/policies/redbox_principal_policy.tmpl" : var.redbox_principal_policy
}


# Configure an S3 Bucket to hold artifacts
# (eg. application code deployments, etc.)
resource "aws_s3_bucket" "artifacts" {
Expand Down Expand Up @@ -62,6 +67,6 @@ POLICY
resource "aws_s3_bucket_object" "redbox_principal_policy" {
bucket = aws_s3_bucket.artifacts.id
key = "fixtures/policies/redbox_principal_policy.tmpl"
source = var.redbox_principal_policy
etag = "${filemd5(var.redbox_principal_policy)}"
source = local.redbox_principal_policy
etag = "${filemd5(local.redbox_principal_policy)}"
}
2 changes: 1 addition & 1 deletion modules/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,5 @@ variable "budget_notification_threshold_percentiles" {
variable "redbox_principal_policy" {
type = string
description = "Location of file with the policy used for the RedBox Principal Account"
default = "fixtures/policies/redbox_principal_policy.tmpl"
default = ""
}

0 comments on commit efcd4f5

Please sign in to comment.