Does Pulumi has any option to generate yaml file t...
# general
g
Does Pulumi has any option to generate yaml file that code is actually is..
b
only for kubernetes
g
any example to know more on this..
g
Any plans for future support of such feature in all IaC areas
b
no, we likely won’t ever support outputting yaml from all providers. If you want YAML, you can use pulumi to author
g
you can use pulumi to author ?? can you pl eloberate
I am seeing generated yaml is one of the way to verify and debug the code at least when the IaC code is minimal
b
g
Nice Initiative, especially generate code from existing yaml too.
This example gives this error.. error: azure-nativeresourcesResourceGroup resource 'anna-group' has a problem: missing required property 'location'. Either set it explicitly or configure it with 'pulumi config set azure-native:location <value>'.
any way to overcome this..
May be location info still missing in main.cue file
b
the error is telling you how to fix it
Either set it explicitly or configure it with β€˜pulumi config set azure-native:location <value>’.
g
Not sure what this value is..
b
it’s an azure location, have you not used those before?
g
Copy code
azure:location: westus
b
okay, so use
azure-native:location westus
πŸ‘ 1
g
I see storagename creation as error.. G:\DWork\osource\cloudc\devops\pulumi\go\azure>pulumi up -y Please choose a stack, or create a new one: dev Previewing update (dev) View Live: https://app.pulumi.com/nagkumar/cuedemo/dev/previews/6dec0269-b81f-4fbc-8279-b105a645dd0a Type Name Plan + pulumipulumiStack cuedemo-dev create + β”œβ”€ azure-nativeresourcesResourceGroup bob-group create + β”œβ”€ azure-nativeresourcesResourceGroup anna-group create + β”œβ”€ azure-nativestorageStorageAccount anna-storage create + β”œβ”€ azure-nativestorageStorageAccount bob-storage create + β”œβ”€ azure-nativestorageStorageAccountStaticWebsite anna-website create + β”œβ”€ azure-nativestorageStorageAccountStaticWebsite bob-website create + β”œβ”€ azure-nativestorageBlob anna-index.html create + └─ azure-nativestorageBlob bob-index.html create Resources: + 9 to create Updating (dev) View Live: https://app.pulumi.com/nagkumar/cuedemo/dev/updates/5 Type Name Status Info + pulumipulumiStack cuedemo-dev creating failed 1 error + β”œβ”€ azure-nativeresourcesResourceGroup anna-group created + β”œβ”€ azure-nativeresourcesResourceGroup bob-group created + β”œβ”€ azure-nativestorageStorageAccount anna-storage creating failed 1 error + └─ azure-nativestorageStorageAccount bob-storage creating failed 1 error Diagnostics: pulumipulumiStack (cuedemo-dev): error: update failed azure-nativestorageStorageAccount (anna-storage): error: Code="AccountNameInvalid" Message="anna-storageb09dfdd2 is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only." azure-nativestorageStorageAccount (bob-storage): error: Code="AccountNameInvalid" Message="bob-storage7b1e61c2 is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only." Resources: + 3 created Duration: 30s
does this need any special fix in cue code
e
I am seeing generated yaml is one of the way to verify and debug the code at least when the IaC code is minimal (e
We couldn't really generate complete yaml programs unless we'd already run the deployment, at which point if you just want some data to look at you can view the json for the stack state. There's probably an isomorphism between yaml programs and stack state, but I'm not sure it's worth us coding it up.