Skip to content

fix: move deprecated to versioned resources#2521

Open
HarisDotParis wants to merge 6 commits into
terraform-google-modules:mainfrom
HarisDotParis:move_configmap_to_versioned_res
Open

fix: move deprecated to versioned resources#2521
HarisDotParis wants to merge 6 commits into
terraform-google-modules:mainfrom
HarisDotParis:move_configmap_to_versioned_res

Conversation

@HarisDotParis
Copy link
Copy Markdown

  • Terraform's Kubernetes provider's v3 update has deprecated several unversioned resource names
  • This PR updates all affected resources
    • kubernetes_service
    • kubernetes_service_account
    • kubernetes_config_map
    • kubernetes_pod
  • If a resource is part of regular code, then there is always a corresponding moved block to move the old resource to the new one
  • If a resource is part of directory examples/, then its resource type is only renamed, but there is no corresponding moved block as that is only exemplary code
  • Additionally, the file examples/workload_identity/main.tf has been updated to be valid and syntactically correct

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jan 13, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Collaborator

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @HarisDotParis!

Please run make docker_generate_docs and add to your change.

@HarisDotParis HarisDotParis force-pushed the move_configmap_to_versioned_res branch from 4795c74 to 93f1407 Compare January 26, 2026 15:46
@apeabody
Copy link
Copy Markdown
Collaborator

/gcbrun

Copy link
Copy Markdown
Collaborator

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @HarisDotParis

From the lint:

terraform_validate ./test/fixtures/workload_identity
╷
│ Error: Unsupported argument
│ 
│   on ../../../examples/workload_identity/main.tf line 65, in module "workload_identity":
│   65:   network       = var.network
│ 
│ An argument named "network" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on ../../../examples/workload_identity/main.tf line 66, in module "workload_identity":
│   66:   subnetwork    = var.subnetwork
│ 
│ An argument named "subnetwork" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on ../../../examples/workload_identity/main.tf line 67, in module "workload_identity":
│   67:   ip_range_pods = var.ip_range_pods
│ 
│ An argument named "ip_range_pods" is not expected here.

Comment on lines +86 to +88
network = var.network
subnetwork = var.subnetwork
ip_range_pods = var.ip_range_pods
Copy link
Copy Markdown

@patjlm patjlm Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think those are irrelevant here, but the deleted ones should remain.

Comment on lines +103 to +105
network = var.network
subnetwork = var.subnetwork
ip_range_pods = var.ip_range_pods
Copy link
Copy Markdown

@patjlm patjlm Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, irrelevant fields, but use_existing_gcp_sa should be kept

@patjlm
Copy link
Copy Markdown

patjlm commented Mar 12, 2026

x-ref kubernetes provider bump: #2501

@patjlm
Copy link
Copy Markdown

patjlm commented Apr 2, 2026

this PR will handle service accounts: #2560

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.

3 participants