adventurous-mechanic-24805
02/03/2023, 4:14 PMpulumi preview
, I get the following error:
Previewing update (shared.shared):
Type Name Plan Info
+ pulumi:pulumi:Stack svcmeshdemo-shared.shared create
└─ azure-native:resources:ResourceGroup resourceGroup 1 error
Diagnostics:
azure-native:resources:ResourceGroup (resourceGroup):
error: azure-native:resources:ResourceGroup resource 'resourceGroup' has a problem: 'resourceGroupName' does not match expression '^[-\w\._\(\)]+$'
My Pulumi.yaml
file is as follows:
name: svcmeshdemo
runtime: yaml
description: A minimal Azure Native Pulumi YAML program
config:
env:
type: string
default: ${env}
project:
type: string
default: ${project}
projectShort:
type: string
default: ${projectShort}
customer:
type: string
default: ${customer}
customerShort:
type: string
default: ${customerShort}
namePrefix:
type: string
default: ${customerShort}-${projectShort}
namePrefixCleaned:
type: string
default: ${customerShort}${projectShort}
resources:
# Create an Azure Resource Group
resourceGroup:
type: azure-native:resources:ResourceGroup
properties:
resourceGroupName: ${namePrefix}-${env}
tags:
Project: ${project}
Environment: ${env}
Source: Pulumi
Customer: ${customer}
Creator: ${customer}
Does anyone know what the problem is and how to fix it? Thanks 🙂melodic-tomato-39005
02/03/2023, 4:28 PMresourceGroupName
, so on the values of customerShort
, projectShort
, and env
. Somehow the resulting name is invalid. Does env
maybe end in a .
?adventurous-mechanic-24805
02/03/2023, 4:39 PMenv
, does it take the pulumi stack environment or the env
from Pulumi.shared.shared.yaml
because the environment is shared.shared
, but I want to reference it from the Pulumi.shared.shared.yaml
whose value is shared
melodic-tomato-39005
02/03/2023, 4:47 PMenv
is from. I’m not super familiar with Pulumi yaml and it’s actually not mentioned on https://www.pulumi.com/docs/reference/yaml/.adventurous-mechanic-24805
02/03/2023, 6:29 PM${namePrefix}-${env}
I resolved it by replacing config
with variables
because I am reusing the variables.
But, thank you anyways