Skip to content

Add support for take_ownership attribute in helm_release resourceΒ #1671

@othmane399

Description

@othmane399

Description

The Helm v3 action.Install struct includes a TakeOwnership field that allows ignoring helm annotation checks and taking
ownership of resources. This feature is currently not exposed in the terraform-provider-helm, making it impossible to use this
functionality through Terraform.

The TakeOwnership field is particularly useful for:

  • Migrating existing resources - Taking ownership of resources that were created outside of Helm
  • Recovery scenarios - Recovering from situations where Helm metadata is missing or corrupted
  • Integration with other tools - Working with resources that may have been modified by other Kubernetes tools

This would allow users to handle edge cases where Helm metadata is missing and provide more flexibility in complex deployment
scenarios.

Potential Terraform Configuration

resource "helm_release" "example" {
  name             = "my-release"
  namespace        = "my-namespace"
  repository       = "https://charts.example.com"
  chart            = "my-chart"
  version          = "1.0.0"
  take_ownership   = true

  values = [
    file("${path.module}/values.yaml")
  ]
}

References

Community Note

  • Please vote on this issue by adding a πŸ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions