Skip to content

Cherry-pick #23539 to 7.x: Deprecate aws_partition and use endpoint,regions instead#23626

Merged
kaiyan-sheng merged 3 commits intoelastic:7.xfrom
kaiyan-sheng:backport_23539_7.x
Jan 25, 2021
Merged

Cherry-pick #23539 to 7.x: Deprecate aws_partition and use endpoint,regions instead#23626
kaiyan-sheng merged 3 commits intoelastic:7.xfrom
kaiyan-sheng:backport_23539_7.x

Conversation

@kaiyan-sheng
Copy link
Copy Markdown
Contributor

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

Cherry-pick of PR #23539 to 7.x branch. Original message:

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

@kaiyan-sheng kaiyan-sheng added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team labels Jan 21, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/integrations (Team:Platforms)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jan 21, 2021
@kaiyan-sheng kaiyan-sheng self-assigned this Jan 21, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 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 #23626 updated

    • Start Time: 2021-01-23T00:05:50.710+0000
  • Duration: 67 min 44 sec

  • Commit: 0341e62

Test stats 🧪

Test Results
Failed 0
Passed 14606
Skipped 1313
Total 15919

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 14606
Skipped 1313
Total 15919

@kaiyan-sheng kaiyan-sheng merged commit fbfbb3d into elastic:7.x Jan 25, 2021
@kaiyan-sheng kaiyan-sheng deleted the backport_23539_7.x branch January 25, 2021 17:59
@zube zube bot removed the [zube]: Done label Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Platforms Label for the Integrations - Platforms team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants