cerbo / aws-waf-security-automation

Amazon WAF Security Automation deployment (modular with Terraform)
Apache License 2.0
73 stars 27 forks source link

Error on Create #5

Closed brianclaveau-coresecure closed 5 years ago

brianclaveau-coresecure commented 6 years ago

Update: This is using the V2 Branch, no issues creating the original WAF

My Log bucket exists and is private

I only updated the Amazon creds file and I am getting this error

Failed to load root config module: Error loading //waflambdafiles.tf: Error reading config for aws_s3_bucket[WAFLambdaFiles]: local.waf_bucket_name: resource variables must be three parts: TYPE.NAME.ATTR in:

${var.WafFilesBucketName != "" ? var.WafFilesBucketName : local.waf_bucket_name}

ventz commented 5 years ago

@brianclaveau-coresecure Missed this issue somehow -- it seems it never generated an email.

The "waf lambda" config is directly from the variable "customer" in the config -- generated by the waf script (which pulls the `.template.main.tf and creates a main.tf for you)

Try in again clean environment - it sounds like the part that's failing is this:

bucket = "${var.customer}-waflambdafiles"

Which is relying on your customer variable. And it seems something got either corrupted or "twisted" in the config-to-real-world-s3-bucket mapping.