Skip to content

Support for moved blocks between version-suffixed and non-suffixed resource types #2540

Open
@sybereal

Description

@sybereal

Description

Terraform 1.8.0 added support for moved blocks in which the source and destination resource types differ. This support, however, depends on the provider declaring support for this operation. The request is for the Kubernetes Terraform provider to support use of moved blocks to convert, e.g., kubernetes_deployment resources to kubernetes_deployment_v1.

Potential Terraform Configuration

# old.tf
resource "kubernetes_deployment" "my_deployment" {
  ...
}

# new.tf
resource "kubernetes_deployment_v1" "my_deployment" {
  ...
}

moved {
  from = kubernetes_deployment.my_deployment
  to   = kubernetes_deployment_v1.my_deployment
}

References

#2301 was closed, but at the time, Terraform support for cross-resource-type moved blocks did not exist yet.

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions