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
feat(datasource/aws-machine-image): Add profile and region configuration support #24086
Conversation
Also leave the option open to for additional aws configuration parameters by parsing a serialized json dictionary.
Example config used for testing: config.js module.exports = {
platform: "github",
endpoint: "https://github.example.com/api/v3",
token: "xxxx",
repositories: ["reegnz/renovate-test"],
regexManagers: [
{
customType: "regex",
fileMatch: ['.*\.tfvars$'],
matchStrings: [
'.*amiFilter=(?<packageName>.*?)\n(.*currentImageName=(?<currentDigest>.*?)\n)?(.*\n)?.*?(?<depName>[a-zA-Z0-9-_:]*)[ ]*?[:|=][ ]*?["|\']?(?<currentValue>ami-[a-z0-9]{17})["|\']?.*',
],
datasourceTemplate: 'aws-machine-image',
versioningTemplate: 'aws-machine-image',
},
],
enabledManagers: ["regex"],
prHourlyLimit: 0,
prConcurrentLimit: 0,
} terraform.tfvars: # amiFilter=[{"Name":"owner-id","Values":["sanitized"]},{"Name":"name","Values":["sanitized"]},{"profile":"test","region":"us-west-2"}]
# currentImageName=none
us_image_id = "ami-sanitized" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs tests
* move types to separate types.ts * change reduce to for..of loop * run prettier to fix formatting issues
@viceice Not sure how to test for EC2 client configuration, the existing tests are all mocking the client. |
Going to write some jest tests to test the |
@viceice let me know what else should be done to move this along. Thanks for having looked at it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm lockfile is broken, needs fix
That's very curious, might have broken it with some change. Pushed a fixed one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint issues 😉
ah, feel like such a noob! 😮💨 |
🎉 This PR is included in version 36.69.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
The PR adds region support as well as profile support in case the user wants to utilize the shared config file to switch between configurations.
Changes
The aws-machine-image datasource can optionally handed region and aws-profile configuration through the amiFilter json array.
Context
This is an attempt at fixing #14421.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: