Blog

Granted's Profile Registry Leveled Up

Chris Norman
Chris Norman
January 11, 2023
Granted's Profile Registry Leveled Up

Back in November we released Profile Registries - an easy way of centralising your AWS config file across your team, and syncing it with Granted. Based on Profile Registries v1, we got some excellent feedback from Eric and Loren (RFD #2), and collaboratively made some changes.

We value our community and our highest priority is to build products you love! If you see an opportunity like this, don’t hesitate to reach out, we always love to collaborate. You can get in touch via our Slack community or by posting an RFD.

Handling duplicate profile names

When multiple registries are in use, registries are synced in descending priority where the default priority is zero. This allows you to consistently define which registry config should be prefixed upon duplication.

Variable substitution for profile configurations

Variable substitution allows you to set variables within your profile configurations and have them be automatically populated by predefined key-name pairs. Additionally, these values can be user specific and defined from CLI prompts. Variable substitution can also be used for arbitrary variables, allowing you to reuse a variable within your config file.

Here’s an example:

awsConfig:
  - ./dev/config1
templateValues:
  - <YourKeyName>
    - ...
  - BaseProfile:
    - value: "my-profile"
  - SessionName:
      - isRequired: true
      - prompt: "Enter your user name (e.g john.doe)"

[profile prod]
session_name = {{ .Required.SessionName }}
role_arn = arn:aws:iam::0123456789012:role/example

[profile uat]
source_profile = {{ .Variables.BaseProfile}}
role_arn = arn:aws:iam::0123456789012:role/example

You can get started with Profile Registries here.

Let us know how you go, we’d love to hear from you!

Share this post
Chris Norman
Co-Founder