Skip to content

Conversation

apeabody
Copy link
Contributor

No description provided.

@apeabody apeabody requested review from a team, rjerrems and bharathkkb as code owners November 28, 2022 20:52
Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

@apeabody apeabody changed the title chore: use random_project_id_length in tests chore: use random_project_id_length Nov 28, 2022
@apeabody
Copy link
Contributor Author

apeabody commented Nov 28, 2022

Sure! @bharathkkb - FYI: This will now be a breaking change.

@apeabody apeabody changed the title chore: use random_project_id_length feat!: use random_project_id_length Nov 28, 2022
@daniel-cit
Copy link
Contributor

Many projects are at the limit or near the limit of the max project_id length (30 chars) like:

prj-bu1-n-sample-peering-aaaa
prj-bu1-n-sample-floating-aaaa
prj-bu1-n-sample-restrict-aaaa
prj-bu2-c-infra-pipeline-aaaa
prj-c-restricted-net-hub-aaaa

with four additional chars for the random suffix, they would brake the limit .

Not all the projects can have this increase in the random size to prevent collisions

@apeabody
Copy link
Contributor Author

Many projects are at the limit or near the limit of the max project_id length (30 chars) like:

prj-bu1-n-sample-peering-aaaa
prj-bu1-n-sample-floating-aaaa
prj-bu1-n-sample-restrict-aaaa
prj-bu2-c-infra-pipeline-aaaa
prj-c-restricted-net-hub-aaaa

with four additional chars for the random suffix, they would brake the limit .

Not all the projects can have this increase in the random size to prevent collisions

Thanks for the feedback @daniel-cit. These should all be currently using random_project_id = true which already adds 4 characters for randomness, so adding the random_project_id_length = 4 should maintain the same length. The primary difference is that random_project_id_length implements a different and larger collusion domain (terraform-google-modules/terraform-google-project-factory#735), which should reduce duplicate project_id during CI. That said, let me know if I overlooked anything. Cheers!

@daniel-cit
Copy link
Contributor

Many projects are at the limit or near the limit of the max project_id length (30 chars) like:

prj-bu1-n-sample-peering-aaaa
prj-bu1-n-sample-floating-aaaa
prj-bu1-n-sample-restrict-aaaa
prj-bu2-c-infra-pipeline-aaaa
prj-c-restricted-net-hub-aaaa

with four additional chars for the random suffix, they would brake the limit .
Not all the projects can have this increase in the random size to prevent collisions

Thanks for the feedback @daniel-cit. These should all be currently using random_project_id = true which already adds 4 characters for randomness, so adding the random_project_id_length = 4 should maintain the same length. The primary difference is that random_project_id_length implements a different and larger collusion domain (terraform-google-modules/terraform-google-project-factory#735), which should reduce duplicate project_id during CI. That said, let me know if I overlooked anything. Cheers!

I see. Thanks for the clarification.
This is a great improvement ❤️

A great follow up would be adding the random_project_id_length to the two projects from 0-bootstrap that are created by the bootstrap modules

@apeabody
Copy link
Contributor Author

apeabody commented Dec 9, 2022

terraform-google-modules/terraform-google-project-factory#735

Many projects are at the limit or near the limit of the max project_id length (30 chars) like:

prj-bu1-n-sample-peering-aaaa
prj-bu1-n-sample-floating-aaaa
prj-bu1-n-sample-restrict-aaaa
prj-bu2-c-infra-pipeline-aaaa
prj-c-restricted-net-hub-aaaa

with four additional chars for the random suffix, they would brake the limit .
Not all the projects can have this increase in the random size to prevent collisions

Thanks for the feedback @daniel-cit. These should all be currently using random_project_id = true which already adds 4 characters for randomness, so adding the random_project_id_length = 4 should maintain the same length. The primary difference is that random_project_id_length implements a different and larger collusion domain (terraform-google-modules/terraform-google-project-factory#735), which should reduce duplicate project_id during CI. That said, let me know if I overlooked anything. Cheers!

I see. Thanks for the clarification. This is a great improvement ❤️

A great follow up would be adding the random_project_id_length to the two projects from 0-bootstrap that are created by the bootstrap modules

We can think about it, but would be a breaking change and need a migration guide for existing project_id: terraform-google-modules/terraform-google-bootstrap#215

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