Author : MD TAREQ HASSAN | Updated : 2021/10/28
error: stack names may not contain slashes
- Reason: naming naming validation
- Recommended naming convention “
<orgName>/<projectName>/<stackName>
“ will not work for local and cloud backend (i.e. Azure blod container) - Error: “could not create stack: validating stack properties: a stack name may only contain alphanumeric, hyphens, underscores, or periods”
- Work around: use “
<project-name>-<stack-hint>
” i.e. “pulumi-demo-dev” (project-name: pulumi-demo, stack-hint: dev) - See:
error: cannot create already existing resource
Cause:
- Pulumi resource name (unique name) is changed but the actual resource name is not changed
- Example:
new ResourceGroup("UniqueXXX", new ResourceGroupArgs { ResourceGroupName = "rg-demo" });
UniqueXXX
is changed toUniqueYYY
ResourceGroupName = "rg-demo"
is not changed- Re-creation of resource group with same “rg-demo” name will fail
Solution:
- Comment out code, then
pulumi up -s dev
(resources will be deleted) - Uncomment and again
pulumi up -s dev