PaloAltoNetworks / pcs-sizing-scripts

Prisma Cloud sizing scripts
ISC License
46 stars 49 forks source link

AWS accounts beginning in 0 generate error at line 190 #18

Closed garbacik closed 2 years ago

garbacik commented 2 years ago

Describe the bug

If an AWS account within an organization begins with a zero, it reports an error at line 190 in the aws/resource-count-aws.sh.as follows: ./resource-count-aws.sh: line 190: [[: 012345678983: value too great for base (error token is "012345678983")

Expected behavior

Value is the test should be their string equivalent.

Current behavior

./resource-count-aws.sh: line 190: [[: 012345678983: value too great for base (error token is "012345678983")

Possible solution

Remove the double bracket test and use single brackets. See https://stackoverflow.com/questions/24777597/value-too-great-for-base-error-token-is-08

Steps to reproduce

At line 189, insert something like: ACCOUNT_ID=012345678983

Screenshots

Context

Your Environment

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

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

tkishel commented 2 years ago

Please take a look at PR #19

tkishel commented 2 years ago

PR Merged