Skip to content

AWS_CONTAINER_CREDENTIALS_RELATIVE_URI uses environment variables #64

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

Merged
merged 2 commits into from
Mar 13, 2020
Merged

AWS_CONTAINER_CREDENTIALS_RELATIVE_URI uses environment variables #64

merged 2 commits into from
Mar 13, 2020

Conversation

happysiro
Copy link

Hello.
I use ECS.

Instead of writing the contents of the environment variable AWS _ CONTAINER _ CREDENTIALS _ RELATIVE _ URI to a configuration file, you may want to use it directly.
What do you think?

Copy link
Collaborator

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change really needed?
In this plugin, AWS credentials should be set up with configuration file.

@@ -17,7 +17,6 @@ class AwsElasticsearchServiceOutput < ElasticsearchOutput
config_param :access_key_id, :string, :default => ""
config_param :secret_access_key, :string, :default => "", secret: true
config_param :assume_role_arn, :string, :default => nil
config_param :ecs_container_credentials_relative_uri, :string, :default => nil #Set with AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable value
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing config_param is not good.
If you remove it completely, please use :obsolete here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's certainly not good.
Modify.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about refer AWS_CONTAINER_CREDENTIALS_RELATIVE_URI in #configure?

aws_container_credentials_relative_uri = opts[:ecs_container_credentials_relative_uri] || ENV["AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this should be in #credentails.
But, using instance variable to store credentials information in #configure is also OK for me

@happysiro
Copy link
Author

Why is this change really needed?

When using Fargate with ECS, there is no way to know the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.
So suggested this pull request.

@cosmo0920
Copy link
Collaborator

cosmo0920 commented Mar 11, 2020

I think that this change breaks compatibility.
How about coexisting with config_param like as?
#64 (comment)

@happysiro
Copy link
Author

Thank you for a good suggestion.
Please wait a moment while I correct it.

@happysiro
Copy link
Author

I'm late.
I revised it, so please review it.

@cosmo0920

Copy link
Collaborator

@cosmo0920 cosmo0920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable for me!
Thank you for your contribution. 😄

@cosmo0920 cosmo0920 merged commit c24c9e1 into atomita:master Mar 13, 2020
@cosmo0920
Copy link
Collaborator

@atomita Could you release a new version which includes this change?

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.

3 participants