packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

temporary_security_group_source_cidrs passing Variable issue

Open ciberesponce opened this issue 4 years ago • 1 comments

Having three different outcomes which would be expected to drive the same outcome:

  1. Hardcoding temporary_security_group_source_cidrs
  2. Using a variable-- packer validate .
  3. Using a variable-- packer build

When hard coding the CIDR, this works.

However, one would want to tie this to an environmental variable (type string). When doing this, you would validate this: packer build . This passes.

However, on the same file, `packer build ' will fail on the same file, throwing an error: "Error parsing CIDR in temporary_security_group_source_cidrs: invalid CIDR address: "72.X.Y.Z/32"

What is weird is, if you copy and paste this string (72.X.Y.Z/32) this works; both packer build . and packer build <file> work as expected.

ciberesponce avatar Jul 23 '21 22:07 ciberesponce

Looka like I'm having the same issue: https://github.com/hashicorp/packer-plugin-amazon/issues/439 @ciberesponce did you solve this?

steffakasid avatar Dec 05 '23 12:12 steffakasid