Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a withAWS plugin (as alternative to Awssume) #107

Closed
kmanning opened this issue Sep 3, 2019 · 2 comments
Closed

Add a withAWS plugin (as alternative to Awssume) #107

kmanning opened this issue Sep 3, 2019 · 2 comments

Comments

@kmanning
Copy link
Collaborator

kmanning commented Sep 3, 2019

The awssume plugin requires installing awssume on your slave.

An alternative plugin based on using the role assumption feature of withAWS would remove that dependency.

@kmanning
Copy link
Collaborator Author

kmanning commented Sep 3, 2019

UseCase 1(a): Assume environment-specific roles

WithAwsPlugin.withRole().init()
...
def testAndPackage = new TerraformValidateStage()
// Execute in an withAws block, using `role` of AWS_ROLE_ARN, or QA_AWS_ROLE_ARN
def deployQa = new TerraformEnvironmentStage('qa')
// Execute in an withAws block, using `role` of AWS_ROLE_ARN, or UAT_AWS_ROLE_ARN
def deployUat = new TerraformEnvironmentStage('uat')
// Execute in an withAws block, using `role` of AWS_ROLE_ARN, or PROD_AWS_ROLE_ARN
def deployProd = new TerraformEnvironmentStage('prod')

UseCase 1(b): Explicitly define role

WithAwsPlugin.withRole('someRoleArn').init()
...
def testAndPackage = new TerraformValidateStage()
// Execute in an withAws block, using `role` of `someRoleArn`
def deployQa = new TerraformEnvironmentStage('qa')
// Execute in an withAws block, using `role` of `someRoleArn`
def deployUat = new TerraformEnvironmentStage('uat')
// Execute in an withAws block, using `role` of `someRoleArn`
def deployProd = new TerraformEnvironmentStage('prod')

@kmanning
Copy link
Collaborator Author

kmanning commented Sep 3, 2019

Did not implement withCredentials. That should be a separate Issue.

Implemented with standard global variable hierarchy. That should be the preferred method.

@kmanning kmanning closed this as completed Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant