gordonbondon / terraform-aws-wafv2-maxminddb

Configure WAFv2 with data from MaxMind DB
https://registry.terraform.io/modules/gordonbondon/wafv2-maxminddb/aws/latest
MIT License
3 stars 4 forks source link

Error - "argument named scope is not expected here" #3

Open snaravane opened 2 years ago

snaravane commented 2 years ago
➜ terraform init
Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
- Reusing previous version of hashicorp/archive from the dependency lock file
- Finding gordonbondon/maxminddb versions matching ">= 0.1.0"...
- Using previously-installed hashicorp/aws v3.59.0
- Using previously-installed hashicorp/archive v2.2.0
- Installing gordonbondon/maxminddb v0.1.0...
- Installed gordonbondon/maxminddb v0.1.0 (self-signed, key ID DF2C48C02E60BD53)
module "wafv2-maxminddb" {
  source  = "gordonbondon/wafv2-maxminddb/aws"
  version = "0.1.0"
  scope = "REGIONAL"
}
➜ terraform apply --target=module.wafv2-maxminddb
Releasing state lock. This may take a few moments...
╷
│ Error: Unsupported argument
│ 
│   on waf.tf line 11, in module "wafv2-maxminddb":
│   11:   scope = "REGIONAL"
│ 
│ An argument named "scope" is not expected here.
snaravane commented 2 years ago

@gordonbondon FYI.

gordonbondon commented 2 years ago

Hi, modules here are organized as submodules, so you need to use it like this:

module "wafv2-maxminddb_ipset" {
  source  = "gordonbondon/wafv2-maxminddb/aws//modules/ipset"
  version = "0.1.0"
  scope = "REGIONAL"
}

See more docs here https://registry.terraform.io/modules/gordonbondon/wafv2-maxminddb/aws/latest/submodules/ipset

Let me know if this helps.