Skip to content

fix(vpc): avoid deprecated numeric_id warning in network output#707

Open
bruno561 wants to merge 2 commits into
terraform-google-modules:mainfrom
bruno561:fix/706-vpc-network-id-deprecation
Open

fix(vpc): avoid deprecated numeric_id warning in network output#707
bruno561 wants to merge 2 commits into
terraform-google-modules:mainfrom
bruno561:fix/706-vpc-network-id-deprecation

Conversation

@bruno561

Copy link
Copy Markdown

This PR addresses #706 by removing the deprecation warning triggered by the network output in the VPC submodule.

Previously, the output returned the full google_compute_network.network resource object, which surfaces a deprecated provider attribute (numeric_id) during validation.
This change replaces that with an explicit object of selected stable attributes.

Changes

  • Updated modules/vpc/outputs.tf:
  1. Replaced output "network" value from raw resource object to a selected attribute map.
  2. Added network_id from google_compute_network.network.network_id.
  3. Kept numeric_id as a compatibility alias mapped to network_id.
  4. Updated modules/vpc/README.md output description for network to reflect the new shape.

Why this approach

  • Removes dependency on deprecated provider internals in output evaluation.
  • Preserves backward compatibility for consumers that still read network.numeric_id.
  • Keeps the PR scope small and focused on deprecation cleanup.

Validation

  • terraform init (in modules/vpc)
  • terraform validate (in modules/vpc) -> Success

Closes #706

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.

Deprecation warning in VPC module output due to numeric_id reference

1 participant