Skip to content

Replace deprecated kubernetes_namespace with kubernetes_namespace_v1#5

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deprecated-kubernetes-resource
Draft

Replace deprecated kubernetes_namespace with kubernetes_namespace_v1#5
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deprecated-kubernetes-resource

Conversation

Copilot AI commented Feb 24, 2026

Copy link
Copy Markdown

The kubernetes_namespace resource is deprecated by the Kubernetes Terraform provider in favor of kubernetes_namespace_v1, producing warnings on every plan/apply.

Changes

  • main.tf: Replace kubernetes_namespace with kubernetes_namespace_v1; add a moved block to migrate existing state without destroying/recreating the namespace
  • README.md: Update Resources table to reference kubernetes_namespace_v1 with the correct registry link
resource "kubernetes_namespace_v1" "meshcloud" {
  metadata {
    name = var.namespace
  }
}

moved {
  from = kubernetes_namespace.meshcloud
  to   = kubernetes_namespace_v1.meshcloud
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Deprecated resource</issue_title>
<issue_description>It seems this module uses a deprecated resource

│ Warning: Deprecated Resource
│ 
│   with module.aks_meshplatform.kubernetes_namespace.meshcloud,
│   on .terraform/modules/aks_meshplatform/main.tf line 2, in resource "kubernetes_namespace" "meshcloud":
│    2: resource "kubernetes_namespace" "meshcloud" {
│ 
│ Deprecated; use kubernetes_namespace_v1.
│ 
│ (and 15 more similar warnings elsewhere)
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…e_v1

Co-authored-by: Jelledb <14248574+Jelledb@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix usage of deprecated kubernetes resource in module Replace deprecated kubernetes_namespace with kubernetes_namespace_v1 Feb 24, 2026
Copilot AI requested a review from Jelledb February 24, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated resource

2 participants