common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
955 stars 90 forks source link

bump awsconfigfile #648

Closed mikesarver closed 2 months ago

mikesarver commented 2 months ago

What changed?

Bump awsconfigfile dependency

Why?

Add Sprig Template functions for SectionNameTemplate to allow consistent profile names. (lower case and delimiter instead of spaces)

How did you test it?

Go test

Potential risks

Is patch release candidate?

Link to relevant docs PRs

ibottamike commented 2 months ago

I'm debugging issue when testing locally

./bin/dgranted sso generate --sso-region us-east-1 --profile-template "{{ replace ` ` `-` .AccountName }}/{{ .RoleName }}" https://yourid.awsapps.com/start
[✘] template: :1: unexpected "~" in operand`  
mikesarver commented 2 months ago

I'm debugging issue when testing locally

./bin/dgranted sso generate --sso-region us-east-1 --profile-template "{{ replace ` ` `-` .AccountName }}/{{ .RoleName }}" https://yourid.awsapps.com/start
[✘] template: :1: unexpected "~" in operand`  

I see the default behavior is to replace space with -, so that is not required (and not a sprig function). The following command works.

./bin/dgranted sso generate --sso-region us-east-1 --profile-template "{{ .AccountName | lower }}/{{ .RoleName }}" https://yourid.awsapps.com/start

chrnorm commented 2 months ago

Thanks @mikesarver!