-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize type and naming for numeric IDs #20530
Comments
I would treat Most of the rest of the time we're dealing with resource names (https://google.aip.dev/122) which we map into the Terraform Most APIs don't expose numeric ids, and GCE sometimes decides that its AIP-122 resource name includes the numeric id rather than the resource id ( The obvious outcome here is- for GCE resources, we should expose the numeric id in an integer field called |
@rileykarson I am working on adding Example:
|
Possibly- we could consider changing those to |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.9.8
on darwin_arm64
Affected Resource(s)
google_compute_network
(numeric_id
)google_project
(number
)Terraform Configuration
Debug Output
No response
Expected Behavior
vs
google_compute_network.numeric_id`, if that's the convention?)While it would be a breaking change to change the type of
numeric_id
discussion here, maybe it would be possible to addnetwork_id
first, and then removenumeric_id
as a breaking change (at least for that example)?I'm mostly opening this as a way that breaking changes related to updating the type of these IDs could be tracked in GH.
Actual Behavior
Steps to reproduce
terraform apply
Important Factoids
There may well be other resources with similar problems. This affects both the resource and the data source, and presumably these should be updated in tandem if any updates are made.
With
google_project
,project_id
already represents (confusingly) the project name (andnumber
, which is a string, represents the numeric integer value), so it definitely can't follow the convention for that specific case, though I don't know if there is something other thannumber
that could / should be used.References
numeric_id
togoogle_compute_subnetwork
GoogleCloudPlatform/magic-modules#12285numeric_id
togoogle_compute_network
data source GoogleCloudPlatform/magic-modules#12339The text was updated successfully, but these errors were encountered: