renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.44k stars 2.29k forks source link

Support .tf.json Terraform JSON #11997

Open rarkins opened 3 years ago

rarkins commented 3 years ago

What would you like Renovate to be able to do?

Support Terraform's JSON syntax: https://www.terraform.io/docs/language/syntax/json.html

If you have any ideas on how this should be implemented, please tell us here.

Ideally within the same manager.

Would need to be driven by someone who has this requirement, so far I'm not aware of anyone requesting it.

Is this a feature you are interested in implementing yourself?

No

jakauppila commented 1 year ago

We have a need for this so I'd be interested in working on it.

My initial question: when adding the equivalent fixtures and tests, is there a preference on naming within the tests?

https://github.com/renovatebot/renovate/blob/main/lib/modules/manager/terraform/extract.spec.ts#L10-L15

Something like this?

const modulesJSON = Fixtures?.get('modules.tf.json');
const bitbucketModulesJSON = Fixtures?.get('bitbucketModules.tf.json');
const azureDevOpsModulesJSON = Fixtures?.get('azureDevOpsModules.tf.json');
const providersJSON = Fixtures?.get('providers.tf.json');
const dockerJSON = Fixtures?.get('docker.tf.json');
const kubernetesJSON = Fixtures?.get('kubernetes.tf.json');
rarkins commented 1 year ago

Not too much preference although lately we prefer to inline small fixtures wherever possible as it's better for performance.