CLEAResult / cr-azurerm_app_service

Terraform module for Azure App Service
MIT License
0 stars 0 forks source link

Empty default plan variable causing errors #12

Closed mcdafydd closed 4 years ago

mcdafydd commented 4 years ago

I get the following errors when referencing this module:

Error: Invalid index

  on .terraform/modules/appservice/variables.tf line 198, in locals:
 198:   plan_name = split("/", var.plan)[8]
    |----------------
    | var.plan is ""

The given key does not identify an element in this collection value.

Error: Invalid index

  on .terraform/modules/appservice/variables.tf line 199, in locals:
 199:   plan_rg   = split("/", var.plan)[4]
    |----------------
    | var.plan is ""

The given key does not identify an element in this collection value.

The empty string default value for var.plan takes precedence over module inputs sometimes.