renovate/lib/modules/manager/terraform/common.ts
Johannes Feichtner a4205761c8
feat(terraform): kubernetes image resources support (#16029)
* add tests

* add support for kubernetes image resources

* Update lib/modules/manager/terraform/extract.ts

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>

* added unknown resource

* added Kubernetes to Readme

* missed one spot in the Readme

* Update lib/modules/manager/terraform/readme.md

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>

* switch to toMatchObject() in tests

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-06-14 19:51:11 +00:00

43 lines
1.5 KiB
TypeScript

// FIXME #12556
/* eslint-disable @typescript-eslint/naming-convention */
// eslint-disable-next-line typescript-enum/no-enum
export enum TerraformDependencyTypes {
unknown = 'unknown',
module = 'module',
provider = 'provider',
required_providers = 'required_providers',
resource = 'resource',
terraform_version = 'terraform_version',
}
export const TerraformResourceTypes: Record<string, string[]> = {
unknown: ['unknown'],
generic_image_resource: [
// Docker provider: https://registry.terraform.io/providers/kreuzwerker/docker
'docker_container',
'docker_service',
// Kubernetes provider: https://registry.terraform.io/providers/hashicorp/kubernetes
'kubernetes_cron_job',
'kubernetes_cron_job_v1',
'kubernetes_daemon_set',
'kubernetes_daemon_set_v1',
'kubernetes_daemonset',
'kubernetes_deployment',
'kubernetes_deployment_v1',
'kubernetes_job',
'kubernetes_job_v1',
'kubernetes_pod',
'kubernetes_pod_v1',
'kubernetes_replication_controller',
'kubernetes_replication_controller_v1',
'kubernetes_stateful_set',
'kubernetes_stateful_set_v1',
],
// https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs/resources/image
docker_image: ['docker_image'],
// https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release
helm_release: ['helm_release'],
// https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace
tfe_workspace: ['tfe_workspace'],
};