Skip to content

Commit b9e73fe

Browse files
r33drichardsRobertkayman-mk
authoredJan 1, 2023
fix: Invalid Function Arguement when passing bucket as arg (#266)
* fix Invalid Function Arguement when passing bucket as arg see #265 * docs: detail the usage of S3 cache policy (#427) * Add remarks to explain traps in the code * Format code * leave the comment, no code changes Co-authored-by: Robert <[email protected]> Co-authored-by: Matthias Kay <[email protected]>
1 parent 48ce0e7 commit b9e73fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ resource "aws_launch_template" "gitlab_runner_instance" {
303303
### Create cache bucket
304304
################################################################################
305305
locals {
306-
bucket_name = var.cache_bucket["create"] ? module.cache[0].bucket : lookup(var.cache_bucket, "bucket", "")
307-
bucket_policy = var.cache_bucket["create"] ? module.cache[0].policy_arn : lookup(var.cache_bucket, "policy", "")
306+
bucket_name = var.cache_bucket["create"] ? module.cache[0].bucket : var.cache_bucket["bucket"]
307+
bucket_policy = var.cache_bucket["create"] ? module.cache[0].policy_arn : var.cache_bucket["policy"]
308308
}
309309

310310
module "cache" {

0 commit comments

Comments
 (0)
Please sign in to comment.