Skip to content
cloud

GitHub Action

.env from parameter store list (AWS SSM)

v1.1.5 Latest version

.env from parameter store list (AWS SSM)

cloud

.env from parameter store list (AWS SSM)

Pass SSM Parameter Store values from a file to dotenv file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: .env from parameter store list (AWS SSM)

uses: enuelx/action-env-from-an-aws-ssm-list@v1.1.5

Learn more about this action in enuelx/action-env-from-an-aws-ssm-list

Choose a version

Release Tests CodeQL

Buy Me a Coffee at ko-fi.com

Invitame un café en cafecito.app

Create a dotenv from aws parameter store list 🚀

Create a dotenv from another dotenv file with a list of paths from aws parameter store

Parameters

Input Required? Default Description
inputFilename no .env.map Filename received as parameter with ssm paths
outputFilename no .env Filename received as parameter for output file

Example input file .env.map

VAR1=/qa/core/var1
VAR2=/qa/core/var2
VAR3=/qa/core/var3

Example output file .env

VAR1=value1
VAR2=value2
VAR3=value3

Example usage

name: Create dotenv file

on: [ push ]

jobs:
  create-dotenv-file:
    name: Create dotenv file
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v3

      # reference documentation: https://github.com/aws-actions/configure-aws-credentials
      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v2
        with:
          role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role
          aws-region: us-east-2
      
      - uses: enuelx/env-from-an-aws-ssm-list@v1