8000 Duplicate URNs caused by truncated Azure resource names · Issue #790 · nitrictech/nitric · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Duplicate URNs caused by truncated Azure resource names #790

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

Open
davemooreuws opened this issue Apr 17, 2025 · 4 comments
Open

Duplicate URNs caused by truncated Azure resource names #790

davemooreuws opened this issue Apr 17, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@davemooreuws
Copy link
Member

Bug Report

Issue

When deploying to Azure, Nitric can generate resource names that exceed Azure's length limits. To comply, these names are truncated. However, truncation can lead to different resources ending up with identical names, resulting in duplicate URNs and deployment conflicts.

Expected

Each Nitric resource should result in a unique Azure resource name and corresponding URN, even if the original names require truncation.

@tjholm
Copy link
Member
tjholm commented Apr 17, 2025

This is too broad, needs an issue for each specific instance with its relevant naming restrictions.

@jyecusch
Copy link
Member
jyecusch commented Apr 17, 2025

Since Azure has overly restrictive resource name requirements, such as maximum lengths as short as just 14 characters in some cases, we implemented the ResourceName function in cloud/azure/deploy/resourcename.go to normalize the names and force them to meet the restrictions.

However, that creates a high likelyhood of name collisions from the resulting normalized, truncated names. Resulting in duplicate resource names and/or duplicate Pulumi resource URNs.

@tjholm
Copy link
Member
tjholm commented Apr 17, 2025

Since Azure has overly restrictive resource name requirements, such as maximum lengths as short as just 14 characters, we implemented the ResourceName function in cloud/azure/deploy/resourcename.go to normalize the names and force them to meet the restrictions.

However, that creates a high likelyhood of name collisions from the resulting normalized, truncated names. Resulting in duplicate resource names and/or duplicate Pulumi resource URNs.

That's fair enough in this case we should address the URNs and unique azure resource names as separate issues, as changing either of them for a resource is a destructive operation need to ensure we aren't going to clobber resources that contain data.

Truncation of any kind should not be used for URNs

@tjholm
Copy link
Member
tjholm commented Apr 17, 2025

For migration of resources where we want to change the URN see:
https://www.pulumi.com/docs/iac/concepts/options/aliases/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Milestone
No milestone
Development

No branches or pull requests

3 participants
0