https://pulumi.com logo
#general
Title
# general
g

gentle-market-22852

08/18/2022, 3:35 AM
Does Pulumi has any option to generate yaml file that code is actually is..
b

billowy-army-68599

08/18/2022, 3:39 AM
only for kubernetes
g

gentle-market-22852

08/18/2022, 3:41 AM
any example to know more on this..
g

gentle-market-22852

08/18/2022, 3:48 AM
Any plans for future support of such feature in all IaC areas
b

billowy-army-68599

08/18/2022, 3:49 AM
no, we likely won’t ever support outputting yaml from all providers. If you want YAML, you can use pulumi to author
g

gentle-market-22852

08/18/2022, 3:51 AM
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

billowy-army-68599

08/18/2022, 3:53 AM
g

gentle-market-22852

08/18/2022, 3:56 AM
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

billowy-army-68599

08/18/2022, 4:31 AM
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

gentle-market-22852

08/18/2022, 4:32 AM
Not sure what this value is..
b

billowy-army-68599

08/18/2022, 4:32 AM
it’s an azure location, have you not used those before?
g

gentle-market-22852

08/18/2022, 4:33 AM
Copy code
azure:location: westus
b

billowy-army-68599

08/18/2022, 4:34 AM
okay, so use
azure-native:location westus
πŸ‘ 1
g

gentle-market-22852

08/18/2022, 5:10 AM
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

echoing-dinner-19531

08/18/2022, 7:28 AM
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.
2 Views