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

Is there a way to use EC2 IAM Roles with R53 DNS plugin? #128

Closed
poenn opened this issue Mar 14, 2019 · 2 comments
Closed

Is there a way to use EC2 IAM Roles with R53 DNS plugin? #128

poenn opened this issue Mar 14, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@poenn
Copy link

poenn commented Mar 14, 2019

When running AWS API commands from an EC2 instance you can use IAM Roles for the EC2 instance to avoid managing credentials - temporary access keys are issued to the instance via STS and will be passed to applications automatically.
Is there a way to get the R53 DNS Plugin to use this instead of passing in a role name or access key?
The underlying PowerShell commands (Get-R53HostedZoneList, etc.) will work in this type of environment without specifying any credentials, but it looks like currently setting a profile name or access key is mandatory.

@rmbolger
Copy link
Owner

I didn’t even realize this was an option. But in retrospect, of course it is. The Azure plugin has an option for something very similar. And I’d guess I would implement this in the same fashion. Rather than making the existing credential parameters optional, there’d be a switch parameter you can use to basically say, “Use embedded auth.”

I can probably even make it work without the AwsPowershell module dependency eventually.

So yeah, thanks for the request! I can totally make this work.

@rmbolger rmbolger self-assigned this Mar 14, 2019
@rmbolger rmbolger added the enhancement New feature or request label Mar 14, 2019
@rmbolger
Copy link
Owner

There we go! You can now just specify R53UseIAMRole=$true in your plugin parameters to have it use the role associated with your instance. It even works without the AwsPowershell module being installed.

There are a couple additional things I'm trying to get into the next release. But until then, you can either grab the dev/master copy or just grab the updated plugin file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants