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

Deprecate aws_partition and use endpoint,regions instead #23539

Merged
merged 9 commits into from
Jan 21, 2021
Merged

Deprecate aws_partition and use endpoint,regions instead #23539

merged 9 commits into from
Jan 21, 2021

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Jan 15, 2021

What does this PR do?

This PR is to deprecate aws_partition config parameter and use endpoint with regions instead in order to make the AWS configuration less confusing.

Why is it important?

There is overlap between aws_partition and endpoint. We decide to use endpoint moving forward.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  1. Test case with no endpoint specified
    Enable aws module:
./metricbeat modules enable aws

Change aws.yml config file to run ec2 metricset:

- module: aws
  period: 5m
  credential_profile_name: elastic-beats
  metricsets:
    - ec2

This should work like it used to.

  1. Test case with endpoint
- module: aws
  period: 5m
  credential_profile_name: elastic-beats
  endpoint: amazonaws.com
  regions: us-east-1
  metricsets:
    - ec2

Start Metricbeat and ec2 metricset should work and collect metrics for instances in us-east-1.

Related issues

Closes #23153

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 15, 2021
@kaiyan-sheng kaiyan-sheng self-assigned this Jan 15, 2021
@kaiyan-sheng kaiyan-sheng added needs_backport PR is waiting to be backported to other branches. review Team:Platforms Label for the Integrations - Platforms team labels Jan 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 15, 2021
@kaiyan-sheng kaiyan-sheng added the in progress Pull request is currently in progress. label Jan 15, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 16, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #23539 updated

    • Start Time: 2021-01-21T18:34:05.466+0000
  • Duration: 48 min 23 sec

  • Commit: 11f2f1d

Test stats 🧪

Test Results
Failed 0
Passed 14651
Skipped 1285
Total 15936

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 14651
Skipped 1285
Total 15936

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Looks good, added a couple of small suggestions.

x-pack/metricbeat/module/aws/aws.go Show resolved Hide resolved
@andresrc
Copy link
Contributor

Do we have an issue to remove the deprecated parameter in 8.0?

@kaiyan-sheng
Copy link
Contributor Author

@andresrc I just created an issue for removing the config in 8.0.0: #23590

@kaiyan-sheng kaiyan-sheng added test-plan Add this PR to be manual test plan and removed in progress Pull request is currently in progress. labels Jan 21, 2021
@kaiyan-sheng kaiyan-sheng merged commit ba552f6 into elastic:master Jan 21, 2021
@kaiyan-sheng kaiyan-sheng deleted the aws_endpoint branch January 21, 2021 19:35
@kaiyan-sheng kaiyan-sheng added v7.12.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jan 21, 2021
kaiyan-sheng added a commit that referenced this pull request Jan 25, 2021
…egions instead (#23626)

* Deprecate aws_partition and use endpoint,regions instead (#23539)


(cherry picked from commit ba552f6)
@andresrc andresrc added the test-plan-added This PR has been added to the test plan label Feb 15, 2021
@ChrsMark ChrsMark added the test-plan-ok This PR passed manual testing label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Platforms Label for the Integrations - Platforms team test-plan Add this PR to be manual test plan test-plan-added This PR has been added to the test plan test-plan-ok This PR passed manual testing v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate on aws_partition parameter
5 participants