Skip to content

don't try to reach STS if role_arn is not specified#1

Open
MichaelCosby wants to merge 2 commits intomasterfrom
MakeSTSOptional
Open

don't try to reach STS if role_arn is not specified#1
MichaelCosby wants to merge 2 commits intomasterfrom
MakeSTSOptional

Conversation

@MichaelCosby
Copy link
Owner

When telegraf is running inside a VPC, STS may not be reachable. This makes the cloudwatch output plugin fail before it even tries other methods of getting its authentication tokens.

Since the documentation already states that STS is only tried if role_arn is specified, this patch skips STS entirely if the role_arn is blank.

Required for all PRs:

  • [ X] Signed CLA.
  • [X ] Associated README.md updated.
  • Has appropriate unit tests.

Since the change I'm making here simply makes the existing README.md true, there was no need to modify it.

I didn't add a unit test; I don't know enough about go yet to know how to mock out the sts module and the existing tests don't have a good example top copy. Assuming that's required for this change, I can learn that...

We should only try to reach AWS Simple Token Service is the role_arn was specified. This solves the situation where telegraf is running inside a VPC and doesn't have access to STS but is instead using IAM credentials or another auth mechanism, but auth fails because STS is unreachable
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

Successfully merging this pull request may close these issues.

1 participant