Skip to content

AWS named profile bug - SSO profile that exists in ~/.aws/config not recognized by formae when running with AWS_PROFILE #14

Description

@sam-delap

Steps to recreate the issue:

  1. Run "aws configure sso" to configure an AWS SSO profile
  2. Run "export AWS_PROFILE=your-profile-name" to set the AWS_PROFILE var to your newly-made SSO profile
  3. Run formae apply command

Result

Deployment of resources fail.

Forma spec

amends "@formae/forma.pkl"
import "@formae/formae.pkl"
import "@aws/aws.pkl"
import "@aws/ec2/vpc.pkl"
import "@aws/ec2/subnet.pkl"

description {
    text = "This forma deploys a basic VPC and some subnets for testing"
    confirm = false
}

forma {
    // Every forma needs a stack, for some reason
    new formae.Stack {
        label = "network"
        description = "My network"
    }

    new formae.Target {
        label = "basic-acct-2"
        config = new aws.Config {
            region = "us-east-1"
        }
    }

    // Type definitions/schemas are still changing pretty often
    local myVpc = new vpc.VPC {
        label = "test-vpc"
        cidrBlock = "172.16.0.0/16"
    }

    myVpc

    new subnet.Subnet {
        label = "test-subnet"
        vpcId = myVpc.res.vpcId
        cidrBlock = "172.16.0.0/18"
        availabilityZone = "us-east-1a"
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions