proud-nail-99860
05/18/2022, 7:00 PMancient-nightfall-54764
05/19/2022, 8:14 AMstack infra
index.ts
....
export const ruleSgId = secgroup.id;
export const subnetA = subneta.id;
stack dev
index.ts
...
const stackRef = new pulumi.StackReference("blabla/blabla/infra");
const secg = stackRef.getOutput("ruleSgId");
const subnet = stackRef.getOutput("subnetA");
subnetId: subnet,
vpcSecurityGroupIds: [ secg, ],
...
But when I run the code, the result was error like this
error: Running program '/Users/mhw/WS/repos/pulumi' failed with an unhandled exception:
TypeError: Cannot read properties of undefined (reading 'id')
https://www.pulumi.com/learn/building-with-pulumi/stack-references/
Thank you.ancient-nightfall-54764
05/20/2022, 2:55 PMlet server = [];
server.push(new aws.ec2.Instance(`proxy-website-${ stack }`, {
ami: config.require("id-ami-ubuntu"),
instanceType: "t3.small",
keyName: config.require("key-name"),
subnetId: publicSubnet,
vpcSecurityGroupIds: [ secgroup ],
tags: {
Name: `proxy-website-${ stack }`,
Environment: `${ stack }`,
Pulumi: "true",
},
}));
hundreds-toothbrush-20089
05/21/2022, 11:31 AMgorgeous-twilight-11045
05/21/2022, 7:19 PMschema.json
resources block:
1. When would isComponent
be false?
2. What does it mean for something in the properties
section to be required
? I think properties = output properties but then a "required output property" doesn't really make sense to me.
Thanks!plain-doctor-68403
05/23/2022, 4:19 PMinstall pulumi
script for Linux I found at https://www.pulumi.com/docs/get-started/aws/begin/
curl -fsSL <https://get.pulumi.com> | sh
but got the following error while extracting the file:
=== Installing Pulumi v3.33.1 ===
+ Downloading <https://get.pulumi.com/releases/sdk/pulumi-v3.33.1-linux-x64.tar>
% Total % Received % Xferd Average Speed Time Time Time Curren
Dload Upload Total Spent Left Speed
100 78.7M 100 78.7M 0 0 9856k 0 0:00:08 0:00:08 --:--:-- 10.2M
+ Extracting to /home/max/.pulumi/bin
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
We're sorry, but it looks like something might have gone wrong during installa
If you need help, please join us on <https://slack.pulumi.com/>
Any advice on how to proceed? Thanks!most-jordan-25674
05/23/2022, 4:42 PMproud-nail-99860
05/23/2022, 5:21 PM// Create an archive resource for the latest web build.
let remoteArchive = new pulumi.asset.RemoteArchive("<https://example.com/mywebstuff.zip>");
const bucketObject = new gcp.storage.BucketObject("web", {
bucket: bucket.name,
contentType: "text/html",
source: remoteArchive,
})
There would be an unzip
option where it then unzips the archive and creates a folder called web
creamy-fall-88031
05/24/2022, 2:39 PMidentity: {
type: azure_native.network.ResourceIdentityType.UserAssigned,
userAssignedIdentities: {
"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {},
},
},
Now, I'm trying to change resource path in the example above with something more dynamic, so did the following:
let userIdentity = pulumi.all([subscriptionId, resourceGroup.name, userAssignedIdentity.id])
.apply(([subscriptionId, resourceGroup, usrAssignedIdentity]) => `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${usrAssignedIdentity}`)
And then used it as follows:
identity: {
type: azure_native.network.ResourceIdentityType.UserAssigned,
userAssignedIdentities: {
${userIdentity} : {},
},
},
But this doesn't seem to be working when the variable {$userIdentity}
is on the left of the colon sign. I'm getting the following error:
error: Code="LinkedInvalidPropertyId" Message="Property id 'userIdentity' at path '' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."
Can someone please help me with the proper way to do this ?proud-nail-99860
05/24/2022, 5:27 PMmysterious-hamburger-19066
05/24/2022, 11:58 PMmysterious-hamburger-19066
05/25/2022, 4:07 AMmost-stone-11511
05/25/2022, 1:29 PMhallowed-australia-10473
05/26/2022, 2:05 AMhallowed-australia-10473
05/26/2022, 3:25 AMsticky-answer-6826
05/27/2022, 7:06 PMsticky-answer-6826
05/27/2022, 7:38 PMpulumi stack output myOut
after deployment and the backend gets updated? I.e not simply by specifying a new line export const myOut = outputs.then(o, => o.myOutput)
. Adding this to my TS file alone results in an error with command above but is displayed with pulumi preview
. Hence, new outputs won't be available to other stacks until I pulumi
up
sticky-answer-6826
05/27/2022, 9:52 PMpulumi up
in the new stack yields an error because the resource already exists in AWS.
Is there a way to link these and have a new stack recognize it’s the same one I need, other than removing the resource in the other stack and then pulumi up
again in the new stack (basically delete and recreate)?square-library-83546
05/28/2022, 4:04 PMwitty-vegetable-61961
05/30/2022, 11:44 PMquick-painter-61380
06/01/2022, 12:32 AMsparse-caravan-29563
06/01/2022, 9:46 AMquick-painter-61380
06/01/2022, 4:38 PMaws:accessKey
and aws:secretKey
in my stack config while using the automation api. Is this not possible or is there documentation I'm missing? I have PULUMI_CONFIG_PASSPHRASE_FILE
set and it works when I take out the automation api parts and run pulumi up.sticky-answer-6826
06/01/2022, 10:29 PMstack
=
new
pulimi.StackReference(stackName)
. More specifically the errors occurs after that but before the next line that follows myOutput
=
await
stack.requireOutputValue(‘myVal’)
.
The error is “Duplicate resource URN ‘`urnpulumicurrentStack:currentProjectpulumipulumi:StackReference:stackINeed`’”.
When I only loop one set of resources, pulumi
preview
works fine. It is when I have 2 resources that iterate through the loop that I get the error. Hence, I can only attribute it to trying to get a reference to the stack that already exists in the current state of running pulumi preview
.
Am I way off in my thought?
Thanks!handsome-rainbow-98791
06/02/2022, 11:19 PM$ pulumi destroy git:peer_to_rds*
Previewing destroy (ironnetcybersecurity/jcc)
View Live: <https://app.pulumi.com/ironnetcybersecurity/salamander/jcc/previews/7ac2218e-7bbe-4d24-9f10-27a93537ba82>
Do you want to perform this destroy? yes
Destroying (ironnetcybersecurity/jcc)
View Live: <https://app.pulumi.com/ironnetcybersecurity/salamander/jcc/updates/114>
Type Name Status Info
pulumi:pulumi:Stack salamander-jcc **failed** 1 error; 1 warning
- └─ kubernetes:core/v1:Namespace global-services **deleting failed** 1 error
Diagnostics:
pulumi:pulumi:Stack (salamander-jcc):
warning: Attempting to deploy or update resources with 1 pending operations from previous deployment.
* urn:pulumi:jcc::salamander::kubernetes:core/v1:Namespace::global-services, interrupted while deleting
These resources are in an unknown state because the Pulumi CLI was interrupted while
waiting for changes to these resources to complete. You should confirm whether or not the
operations listed completed successfully by checking the state of the appropriate provider.
For example, if you are using AWS, you can confirm using the AWS Console.
Once you have confirmed the status of the interrupted operations, you can repair your stack
using 'pulumi refresh' which will refresh the state from the provider you are using and
clear the pending operations if there are any.
Note that 'pulumi refresh' will not clear pending CREATE operations since those could have resulted in resources
which are not tracked by pulumi. To repair the stack and remove pending CREATE operation,
use 'pulumi stack export' which will export your stack to a file. For each operation that succeeded,
remove that operation from the "pending_operations" section of the file. Once this is complete,
use 'pulumi stack import' to import the repaired stack.
error: update failed
kubernetes:core/v1:Namespace (global-services):
error: Timeout occurred polling for 'global-services'
$ pulumi cancel git:peer_to_rds*
This will irreversibly cancel the currently running update for 'jcc'!
Please confirm that this is what you'd like to do by typing ("jcc"): jcc
error: [409] Conflict: The Update has already completed
$ pulumi refresh
freezing-daybreak-42018
06/03/2022, 3:04 PMfreezing-daybreak-42018
06/03/2022, 3:04 PMfreezing-daybreak-42018
06/03/2022, 3:04 PMfreezing-daybreak-42018
06/03/2022, 3:04 PMfreezing-daybreak-42018
06/03/2022, 3:05 PM