question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Add --profile flag back.

See original GitHub issue

I have credentials and config for various profiles stored in ~/.aws, but I intentionally do not use a default profile. Instead, I prefer to pass a specific profile name to the AWS CLI using the --profile argument. This has worked very well for all AWS tools I’ve used so far.

The README states that using shared credentials or config files should be possible, and everything does indeed work if I set the AWS_PROFILE environment variable to the profile name I want to use.

However, is there an option to pass a profile name to taskcat instead of using an environment variable? This article shows how to do just that using the -P argument, but that no longer seems to be supported.

Could anyone please point me in the right direction?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andrew-glenncommented, Feb 15, 2020

@LackoDan

We’ll consider this a feature request to re-add the profile flag. We made an intentional design decision to not mess with credentials on the command line, but I think the profile is an exception.

The project config (.taskcat.yml) and global config (~/.taskcat.yml) files support an ‘auth’ directive. Here’s an example of using a specific profile globally and specific to the project.

Project Config

project:
  owner: quickstart-eng@amazon.com
  name: complex-auth-config-file
  regions:
    - ap-northeast-1
    - ap-northeast-2
    - ap-south-1
    - ap-southeast-1
    - ap-southeast-2
    - eu-central-1
    - eu-west-1
    - eu-west-2
    - us-east-1
    - us-east-2
    - us-west-2
    - sa-east-1
    - me-south-1
    - ap-east-1
  parameters: {
    "AvailabilityZones": "$[taskcat_genaz_3]",
    "ByteValue": 1,
    "GlobalOverrideTest": "override",
    "LicenseContentTest": "$[taskcat_getlicensecontent]/aws-quickstart-datasets/taskcat-license-param-test/example.txt",
    "LocalOverrideTest": "override",
    "PasswordA": "$[taskcat_genpass_8A]",
    "PasswordAConfirm": "$[taskcat_getval_PasswordA]",
    "PasswordB": "$[taskcat_genpass_32S]",
    "RandomNumber": "$[taskcat_random-numbers]",
    "RandomString": "$[taskcat_random-string]",
    "UUID": "$[taskcat_genuuid]"
  }
  auth:
    default: profile-used-for-every-test-in-this-project
    ap-east-1: hongkong
tests:
  json-test:
    template: templates/debug.template
    auth:
      default: special-use-case-profile-name-for-this-test
    parameters:
      StackName: TestStack

Global config

general:
  auth:
    default: profile-for-everything

I also threw in an example around region-specific credentials. The auth section accepts either default or <region_name>.

Until we can add in the profile flag, does this get you in the right direction?

0reactions
andrew-glenncommented, May 1, 2020

This feature will be included in the 0.9.18 release of taskcat. In the interim, a development release is available.

pip install taskcat==0.9.18.dev7

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature Request] Add --profile flag back. · Issue #416 - GitHub
I have credentials and config for various profiles stored in ~/.aws, but I intentionally do not use a default profile.
Read more >
Feature flags - GitLab Docs
You can create feature flags in GitLab and use the API from your application to get the list ... Then if no session...
Read more >
Essential Guide to Feature Flags - Split Software
A good feature flagging system supports streaming updates to that configuration – the ability for any configuration changes to rapidly propagate to the...
Read more >
Building with feature flags - Robert Cooper
How feature flags work · In a feature flag admin page (that you could build out with a front-end framework), create a feature...
Read more >
How to Add a Flag to Your Facebook Profile Picture
Back in 2015, Facebook rolled out a feature that lets users add an animated frame to their profile pictures. Users and brands can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found