Skip to content

Commit

Permalink
dev: update name of resources in example
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtoj committed Jul 14, 2023
1 parent 1bce764 commit fef7dc9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions examples/aws-lambda-fn/main.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
module "packager" {
module "artifact_packager" {
source = "../../"

artifact_src_path = "/tmp/package.zip"
docker_build_context = "${path.module}/fixures/echo-app"
docker_build_target = "package"
docker_build_args = {}
}

resource "aws_lambda_function" "this" {
function_name = "tf-example-echo-app"

filename = module.packager.artifact_dst_path
source_code_hash = filebase64sha256(module.packager.artifact_dst_path)
filename = module.artifact_packager.artifact_dst_path
source_code_hash = filebase64sha256(module.artifact_packager.artifact_dst_path)
handler = "index.handler"

runtime = "nodejs18.x"
Expand Down
6 changes: 3 additions & 3 deletions examples/aws-s3-bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ locals {
}
}

module "artifact_builder" {
module "artifact_packager" {
source = "../../"

docker_build_context = "${path.module}/fixtures/website"
Expand All @@ -37,11 +37,11 @@ resource "aws_s3_bucket" "website_bucket" {
}

resource "aws_s3_bucket_object" "website_files" {
for_each = fileset(module.artifact_builder.artifact_dst_directory, "**/*")
for_each = fileset(module.artifact_packager.artifact_dst_directory, "**/*")

bucket = aws_s3_bucket.website_bucket.bucket
key = each.value
source = "${module.artifact_builder.artifact_dst_directory}/${each.value}"
source = "${module.artifact_packager.artifact_dst_directory}/${each.value}"
content_type = lookup(local.mime_types, regex("\\.[^.]+$", each.value), "binary/octet-stream")
acl = "public-read"
}

0 comments on commit fef7dc9

Please sign in to comment.