PaloAltoNetworks / terraform-google-vmseries-modules

Terraform Reusable Modules for VM-Series on Google Cloud Platform (GCP)
https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/google
MIT License
16 stars 27 forks source link

[Bug Report] Autoscale example fails when delicensing_cloud_function_config is not specified #222

Closed pavelrn closed 1 year ago

pavelrn commented 1 year ago

Describe the bug

When running examples/autoscaling if delicensing_cloud_function_config = null the example fails to run.

Changes to Outputs:
  + EXTERNAL_LB_IP = (known after apply)
╷
│ Error: Error in function call
│ 
│   on .terraform/modules/vmseries/modules/autoscale/main.tf line 203, in locals:
│  203:   name_prefix   = try(var.delicensing_cloud_function_config.name_prefix) == null ? "" : try(var.delicensing_cloud_function_config.name_prefix)
│     ├────────────────
│     │ while calling try(expressions...)
│     │ var.delicensing_cloud_function_config is null
│ 
│ Call to function "try" failed: no expression succeeded:
│ - Attempt to get attribute from null value (at .terraform/modules/vmseries/modules/autoscale/main.tf:203,60-72)
│   This value is null, so it does not have any attributes.
│ 
│ At least one expression must produce a successful result.

Module Version

1.2.3

Terraform version

No response

Expected behavior

Autoscale example runs without error when delicensing_cloud_function_config is not specified (is null)

Current behavior

No response

Anything else to add?

No response

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!