AWS Machine Image clarification needed for hosted instances #41923
chkpwd
started this conversation in
Mend Hosted Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've configured a custom regex manager in
.renovate/customManagers.json5to detect AMI IDs in Terraform files:1. File Matching Conflict
The built-in
terraformmanager is matchingterraform/aws/*.tffiles before the custom regex manager can process them. This prevents the custom manager from detecting AMI IDs.Current state in renovate.json5:
This pattern matches ALL terraform files including
terraform/aws/*.tf.Attempted solution: Using negative lookahead regex to exclude
terraform/aws/:I'd imagine this failed because Renovate's regex parser doesn't support lookahead?
2. AWS Credentials Configuration
According to the Renovate docs for aws-machine-image, AWS credentials can be provided via:
AWS_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_PROFILE~/.aws/configand~/.aws/credentialsfilesHowever, the documentation is unclear about:
Host Rules vs Environment Variables: Should AWS credentials be configured via Renovate's
hostRulesconfiguration, or via environment variables/secrets (i.e. prefixed with MEND_*)?How to exclude specific directories from the terraform manager so a custom regex manager can handle them?
What's the correct way to configure AWS credentials for the
aws-machine-imagedatasource?hostRuleswithhostType: "aws-machine-image"?AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY)?example
Here's the current Terraform file structure im trying to monitor:
Renovate user with perms:
https://github.com/chkpwd/iac/blob/main/terraform/aws/directory.tf
Custom Manager:
https://github.com/chkpwd/iac/blob/main/.renovate/customManagers.json5#L14
And my renovate file:
https://github.com/chkpwd/iac/blob/main/renovate.json5
Beta Was this translation helpful? Give feedback.
All reactions