salmon-printer-16080
12/06/2021, 2:24 AMAzure-TypeScript
? Having issues with the mocks, and it looks like the examples / docs are quite old. Would be good to have some boilerplate to verify.numerous-printer-41511
12/06/2021, 3:38 AMpulumi up
would I expect that resource to be re-created and all dependent properties/resources updated with new values after that resource’s re-creation?echoing-activity-32278
12/06/2021, 11:46 AMthankful-father-68341
12/06/2021, 12:44 PMearly-intern-90238
12/06/2021, 4:01 PMbulky-policeman-29913
12/06/2021, 5:46 PMbreezy-table-35227
12/06/2021, 6:30 PMDuring some program executions,can anyone let me know the preferred way to create a resource that depends on an output value? Me and my teammates have been trying for days to create resources without this, and always end up with various errors relating to things being an Output instance (we’re using python if it matters)doesn’t run. For example, it won’t run during a preview, when resource output values may be unknown. Therefore, you should avoid side-effects within the callbacks. For this reason, you should not allocate new resources inside of your callbacks either, as it could lead toapply
being wrong.pulumi preview
freezing-sugar-24066
12/06/2021, 11:45 PMacm.getCertificate()z
for the only purpose of using the arn
to create a CloudFront distribution with an cloudfront.DistributionViewerCertificate
object, but would like the class creating the cloudfront distribution to accept either just a static string arn: string
or an arn: Output<string>
, what’s the cleanest way to go about that? (I believe one can pass in strings to Output<string> but am only 92% sure).
I think I’ve got it right that I can do this so that Pulumi understands the dependency graph:
const gcResult = await acm.getCertificateOutput({ domain })
new aws.cloudfront.Distribution('api-cloudfront', {
...
viewerCertificate: gdResult.apply(r => ({
acmCertificateArn: r.arn
})),
...
})
But how do I wrap the new()
in a class that accepts Input<string>
instead of Input<acm.GetCertificateResult>
, since I don’t need to depend on the whole object and don’t want to write a class that requires passing in an object with all the properties of acm.GetCertificateResult
?abundant-book-94104
12/07/2021, 8:03 AMmany-salesmen-89069
12/07/2021, 8:33 AMpulumi stack rm
. I really wish it didn’t remove files from my repo. I often use this command while developing to make sure I’m starting with a clean slate and it always removes my config file which if I’m lucky I have in git history, except now…future-daybreak-16512
12/07/2021, 9:35 AMerror: Exception calling application: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.
The sample code :
from pprint import pprint
from pulumi_policy import (
ReportViolation,
ResourceValidationArgs,
)
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
def ec2_validator(args: ResourceValidationArgs, report_violation: ReportViolation):
if args.resource_type == "aws:ec2/instance:Instance":
if args.props.get('vpcSecurityGroupIds'):
sg_id = aws.ec2.get_security_groups(tags={
"key": "val",
"key": "val",
})
pprint(vars(sg_id))
Any idea how to fix this error?colossal-boots-62227
12/07/2021, 10:18 AMmemory="1 GB"
for aws.ecs.TaskDefinition
(which is allowed but converted to 1024
by ECS) then Pulumi always think that the service needs to be updatedechoing-activity-32278
12/07/2021, 12:21 PMechoing-activity-32278
12/07/2021, 12:21 PMproud-art-41399
12/07/2021, 2:19 PMpulumi config set --path 'foo["bar"]' 100
pulumi -C infra/ config set 'baz' 100
These result in this stack config:
test:baz: "100"
test:foo:
bar: 100
i.e. it's a string value for top-level key while it's number for nested key.dry-motorcycle-32519
12/07/2021, 2:33 PMmelodic-policeman-41474
12/07/2021, 2:38 PMThese 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 stack export' to 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.
freezing-sugar-24066
12/07/2021, 3:49 PMjolly-vr-53742
12/07/2021, 7:48 PMbored-carpenter-17346
12/08/2021, 2:29 AMvictorious-sugar-42620
12/08/2021, 3:07 AMdev:ACCOUNTS:
- pass:
secure: v1:xxxxxxxxx
user: admin
- pass:
secure: v1:yyyyyyyyy
user: admin2
What I am trying to achieve is to get this, turn it into JSON and send it to my Node application as a environment variable. The problem is when I do something like this:
const config = new Config();
config.requireSecretObject<any[]>('ACCOUNTS').apply(a => JSON.stringfy(a)); // Will produce "[{\"pass\":\"[secret]\",\"user\":\"admin\"},{\"pass\":\"[secret]\",\"user\":\"admin2\"}]"
JSON.stringfy(config.requireObject('ACCOUNTS')) // Will also produce "[{\"pass\":\"[secret]\",\"user\":\"admin\"},{\"pass\":\"[secret]\",\"user\":\"admin2\"}]"
I want the secret itself, the only reason I use it as a secret in the stack is to avoid it in plain text in the Github Repo. I have no problems with people being able to see it inside the TaskDefinition (since I am using AWS). How do I achieve this?victorious-sugar-42620
12/08/2021, 3:08 AMvictorious-sugar-42620
12/08/2021, 3:09 AMpass.toString = () => '[secret]';
steep-beach-52652
12/08/2021, 4:56 AMaws:servicediscovery:PrivateDnsNamespace (xyz):
error: deleting urn:pulumi:dev::dev::aws:servicediscovery/privateDnsNamespace:PrivateDnsNamespace::xyz: 1 error occurred:
* error deleting Service Discovery Private DNS Namespace (ns-54dofue7mzejssxa): ResourceInUse: Namespace has associated services; delete the services before deleting the names
square-coat-62279
12/08/2021, 5:12 AMconst request = require('request');
const fs = require('fs');
const testImage = fs.readFileSync('src/deploys/imageUpload/testImage.txt',{ encoding: 'utf8', flag: 'r' });
request(`http://${props.hosts[0]}/upload`, {
method: 'POST',
json: true,
body: {
key: 'somerandomvalue12345',
files: testImage,
},
});
the file (src/deploys/imageUpload/testImage.txt) is actually a base64 value text file while the original file is in PNG format.tall-beard-99429
12/08/2021, 2:16 PMerror: failed to decrypt config: [500] Internal Server Error
on update
bulky-policeman-29913
12/08/2021, 3:27 PMbulky-policeman-29913
12/08/2021, 3:29 PMaws.sns.getTopic({name: name})
and it returns a promise. How exactly do I pass a value like the arn to another resource for use. It's not a pulumi input/output. I would prefer not to have my entire other resource definition created in the promise blockmany-dress-54535
12/08/2021, 3:37 PM# Environment variable for container command line
PURGE_CMD="acr purge \
--filter 'samples/devimage1:.*' --filter 'samples/devimage2:.*' \
--ago 0d --untagged"
az acr task create --name weeklyPurgeTask \
--cmd "$PURGE_CMD" \
--schedule "0 1 * * Sun" \
--registry myregistry \
--context /dev/null
I am trying to implement that using https://www.pulumi.com/registry/packages/azure-native/api-docs/containerregistry/task but I couldn't find a way to:
• Get the names of the acr repositories at each execution
• Pass the command as a stringmysterious-battery-54431
12/08/2021, 6:57 PMpulumi up
it deletes the output, but the output is actually never deleted, and I can see it in the stack in the Pulumi console, or if I run pulumi stack output
. Any ideas about how to surgically remove an output in this scenario?mysterious-battery-54431
12/08/2021, 6:57 PMpulumi up
it deletes the output, but the output is actually never deleted, and I can see it in the stack in the Pulumi console, or if I run pulumi stack output
. Any ideas about how to surgically remove an output in this scenario?red-match-15116
12/08/2021, 6:59 PMmysterious-battery-54431
12/08/2021, 7:10 PM