PaloAltoNetworks / terraform-azurerm-vmseries-modules

Terraform Reusable Modules for VM-Series on Azure
https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/azurerm/latest
MIT License
49 stars 58 forks source link

transit_vnet_common example build fails on terraform apply #193

Closed pmusolino-rms closed 1 year ago

pmusolino-rms commented 2 years ago

Describe the bug

While attempting to bootstrap the vmseries transit vnet set up in the examples, the terraform apply fails due to a bootstrap_options validation check. This is because the main.tf is joining the file share keys, names, etc to the bootstrap_options variable, but the validation it does in the modules/vmseries/variables.tf:195 does not contain these 4 keys. It looks to be the same on the dedicated examples as well

Expected behavior

The Terraform apply should complete successfully and the vmseries firewalls it builds should complete bootstrap

Current behavior

Error: Invalid value for variable │ │ on main.tf line 131, in module "common_vmseries": │ 131: bootstrap_options = join(",", │ 132: [ │ 133: "storage-account=${module.bootstrap.storage_account.name}", │ 134: "access-key=${module.bootstrap.storage_account.primary_access_key}", │ 135: "file-share=${module.bootstrap.storage_share.name}", │ 136: "share-directory=None" │ 137: ]) │ ├──────────────── │ │ var.bootstrap_options has a sensitive value │ │ Error in validating bootstrap_options, for details see variable description. │ │ This was checked by the validation rule at ../../modules/vmseries/variables.tf:195,3-13.

Possible solution

Add storage_account, access-key, file-share, and share-directory to the validation

Steps to reproduce

  1. login to azure cli
  2. change variables in terraform.tfvars file to your own specific environment
  3. terraform init
  4. terraform plan
  5. terraform apply

    Screenshots

Context

Just started when trying to do POC

Your Environment

TF 1.2.9

welcome-to-palo-alto-networks[bot] commented 2 years ago

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

FoSix commented 1 year ago

@pmusolino-rms - Thanks 🤝 you're right, a fix already set for this.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 0.5.0 :tada:

The release is available on Terraform Registry and GitHub release

Posted by semantic-release bot