Open briantkennedy opened 3 years ago
I'm working on giving terraform-validator access to the project number. It will be a little annoying for users to have to set things up in the right order - but it wouldn't be possible to write a config validator constraint against a project number prior to project creation anyway. (And it isn't possible to write a config validator constraint against project id at all.)
And it isn't possible to write a config validator constraint against project id at all.
I think this is the part we need to fix actually, exactly because number can't be determined pre-deployment.
What is/are the use case(s) for writing a validation rule against a specific project pre-deployment? Is this a thing people are currently doing and/or want to be able to do?
The use case is primarily if projects are following a common naming convention so you want to use a glob in it, but I agree that's probably an edge case we don't need to prioritize.
Terraform validator gets input from terraform plan which uses project ID. Meanwhile, CAI dumps rely on project number for the hierarchy. We need to resolve this discrepancy so that the same constraint target will be portable across TF Validator and Config Validator operating modes.