PaloAltoNetworks / pcs-sizing-scripts

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

Added support for AWS Profiles #36

Closed bpmetzge closed 9 months ago

bpmetzge commented 2 years ago

Description

This update will check for available profiles and prompt the user to enter a profile name if more than one profile is available. If there is only one, the script will carry on as usual.

Motivation and Context

In some cases, the default profile is not able to be used with temporary credentials issued through a login provider such as Okta or OneLogin.

How Has This Been Tested?

Used this updated script to pull information from over 50 accounts via profiles.

Screenshots (if appropriate)

Types of changes

Checklist

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

:tada: Thanks for opening this pull request! We really appreciate contributors like you! :raised_hands:

tkishel commented 2 years ago

I don't understand: this changes overwrites the current AWS_PROFILE env var, and forces the user to select a profile if more than one profile exists, and then sets the AWS_PROFILE env var to their selection. Why not just retain and honor the already defined AWS_PROFILE env var?

sullivan1337 commented 2 years ago

This seems to break if run within cloudshell, can we make it so you have to pass a flag to enable using profiles? image