hitachienergy / epiphany

Cloud and on-premises automation for Kubernetes centered industrial grade solutions.
Apache License 2.0
138 stars 107 forks source link

[BUG] terraform fails when `use_network_security_groups` is set to `false` #3179

Closed wkalbar closed 2 years ago

wkalbar commented 2 years ago

Describe the bug When use_network_security_groups is set to false, terraform fails with error:

11:54:42 INFO cli.src.providers.azure.InfrastructureBuilder - Starting step
11:54:42 INFO cli.src.providers.azure.InfrastructureBuilder - Step finished in: 0.01s
11:54:42 ERROR epicli - local variable 'subnet_nsg_association' referenced before assignment
11:54:44 INFO dump_debug_info - Error dump has been written to: /shared/epicli_error_20220601-115442.dump
11:54:44 WARNING dump_debug_info - This dump might contain sensitive information. Check before sharing.
11:54:44 INFO run_time - Total run time: 2.98s

when switched back to true it works fine, with all other settings in config file left unchanged.

How to reproduce Steps to reproduce the behavior:

  1. execute epicli init ... (with params)
  2. edit config file
  3. change use_network_security_groups to false
  4. execute epicli apply ...

Expected behavior Working like in previous releases.

Config files Not applicable, just this one option is changed.

Environment

epicli version: 2.0.0

Additional context n/a


DoD checklist

przemyslavic commented 2 years ago

It looks like the subnet_nsg_association variable is not assigned if use_network_security_groups is set to false but it's used later anyway. image

image

seriva commented 2 years ago

Jup, already testing a fix for just that:)