happy-gpu-24908
11/15/2021, 5:34 PMimage, err := docker.NewRemoteImage(ctx, dockerImage, &docker.RemoteImageArgs{
Name: pulumi.Sprintf("%s-docker.pkg.dev/%s/%s/%s:%s", repo.Location, repo.Project, repo.RepositoryId, conf.serviceName, conf.version),
KeepLocally: pulumi.Bool(true),
PullTriggers: pulumi.StringArray{
pulumi.String("something"),
},
})
if err != nil {
return err
}
But this works randomly. Means half of the time it works, half of the time it returns error. Related to https://github.com/pulumi/actions/issues/28quiet-addition-42622
11/16/2021, 2:18 AMpulumi.RequireSecret()
and pulumi.Unsecret()
functions. The tests pass, but fail with the data race flag set because of <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).fulfillValue()|github.com/pulumi/pulumi/sdk/v3/go/pulumi.(*OutputState).fulfillValue()>
assigning values to the *pulumi.OutputState
, even though each sub test has its own context and values. Here is the code I’m trying to test and the associated unit tests for it.numerous-printer-41511
11/19/2021, 4:33 PMreplace
operation. So i need a handle on the default provider to pass it in for backward compatibility. Grr any ideas?mammoth-honey-6147
11/25/2021, 9:12 PMmammoth-honey-6147
11/30/2021, 1:27 PMcertificate
resource type, facilitated by cert-manager. I'm using dns-01
challenge request, so although the certificate
object type is created, it won't be ready
for 60-90 seconds, this is causing issues with my application that reads the corresponding secret prematurely.cuddly-tailor-40542
12/02/2021, 2:25 AMReady
attribute does not show.
The documentation unfortunately couldn’t help mebusy-island-31180
12/04/2021, 12:52 AMstring
as an input. How do I convert from pulumi.InputString
to a vanilla string
?
for a concrete example, I am creating a role:
https://www.pulumi.com/registry/packages/aws/api-docs/iam/role/#assumerolepolicy_go
this role needs an AssumeRolePolicy
(which is just a string/json document). In order to construct this json document, I need an output value from another resource (an OIDC provider), which would not be known until apply
time
I simply don’t understand how to pass in a vanilla string, when that string needs to be async/dynamically createdambitious-salesmen-39356
12/12/2021, 5:40 PMambitious-salesmen-39356
12/12/2021, 5:41 PMlittle-notebook-32921
12/12/2021, 9:10 PMambitious-salesmen-39356
12/12/2021, 9:21 PMambitious-salesmen-39356
12/12/2021, 9:22 PMfunc createVPC(ctx *pulumi.Context) err {}
ambitious-salesmen-39356
12/12/2021, 9:24 PMfunc createSubnets(ctx *pulumi.Context, vpc *ec2.Vpc) err {}
? Am I attempting something stupid here?lively-dentist-84054
12/12/2021, 11:51 PMNodeSecurityGroup
created by eks.NewCluster
but the type returned is a *SecurityGroupOutput
and I can't figure out how to get the ID output out of it to use with other resourcesnice-engineer-43278
12/13/2021, 4:00 PMnice-engineer-43278
12/13/2021, 4:01 PMnice-engineer-43278
12/13/2021, 4:02 PMPreviewing update (draftea/dev)
View Live: <https://app.pulumi.com/draftea/mongo/dev/previews/f6e0caff-8747-457b-b337-9e8cb430cac9>
Type Name Plan
+ pulumi:pulumi:Stack mongo-dev create
hundreds-article-77945
12/17/2021, 8:26 PMpulumi.StringPtrOutput
with pulumi.Sprintf
? I’m getting this: "serviceAccount:<...>.svc.id.goog[%!s(*string=0x140001425d0)/%!s(*string=0x140006169b0)]"
from:
pulumi.Sprintf("serviceAccount:%s.svc.id.goog[%v/%v]", config.Require(ctx, "gcp:project"), namespace.Metadata.Name(), ksa.Metadata.Name()),
The first arg is a string, but the latter two are string pointers.ripe-shampoo-80285
01/04/2022, 2:39 AMclean-church-26730
01/04/2022, 6:10 PMimportant-sandwich-62391
01/05/2022, 12:44 AMmelodic-policeman-1516
01/07/2022, 5:50 PMpulumi.String
, or pulumi.Bool
)?nice-engineer-43278
01/10/2022, 3:43 PMnice-engineer-43278
01/10/2022, 3:43 PMnice-engineer-43278
01/10/2022, 3:43 PMpackage main
import (
"encoding/json"
"fmt"
"os"
"<http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/sqs|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/sqs>"
"<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
)
var (
stage string
queueNamePlayerFreezePrice string
)
func init() {
queueNamePlayerFreezePrice = "PlayerFreezePrice"
stage = os.Getenv("STAGE")
if stage == "" {
stage = "dev"
}
}
func main() {
name := queueNamePlayerFreezePrice
pulumi.Run(func(ctx *pulumi.Context) error {
// -----------------------------------------------------//
// ---------------- DEAD LEATER QUEUE ------------------//
// -----------------------------------------------------//
deadQueuePfpName := fmt.Sprintf("%s-Dead-%s", name, stage)
deadQueuePfp, err := sqs.NewQueue(ctx, deadQueuePfpName, &sqs.QueueArgs{
DelaySeconds: <http://pulumi.Int|pulumi.Int>(0),
ReceiveWaitTimeSeconds: <http://pulumi.Int|pulumi.Int>(5),
Tags: pulumi.StringMap{
"stage": pulumi.String(stage),
},
})
if err != nil {
return err
}
ctx.Export(fmt.Sprintf("DeadQueue%s-id", name), deadQueuePfp.ID())
ctx.Export(fmt.Sprintf("DeadQueue%s-arn", name), deadQueuePfp.Arn)
// -----------------------------------------------------//
// ----------------- MAIN EVENT QUEUE ------------------//
// -----------------------------------------------------//
redrivePolicyPfp, err := json.Marshal(map[string]interface{}{
"deadLetterTargetArn": deadQueuePfp.Arn,
"maxReceiveCount": 4,
})
if err != nil {
return err
}
queueNamePfp := fmt.Sprintf("%s-%s", name, stage)
queuePfp, err := sqs.NewQueue(ctx, queueNamePfp, &sqs.QueueArgs{
DelaySeconds: <http://pulumi.Int|pulumi.Int>(0),
ReceiveWaitTimeSeconds: <http://pulumi.Int|pulumi.Int>(5),
RedrivePolicy: pulumi.String(string(redrivePolicyPfp)),
Tags: pulumi.StringMap{
"stage": pulumi.String(stage),
},
}, pulumi.DependsOn([]pulumi.Resource{
deadQueuePfp,
}))
if err != nil {
return err
}
ctx.Export(fmt.Sprintf("Queue%s-arn", name), queuePfp.ID())
ctx.Export(fmt.Sprintf("Queue%s-arn", name), queuePfp.Arn)
return nil
})
}
nice-engineer-43278
01/10/2022, 3:45 PMaws:sqs:Queue (PlayerFreezePrice-dev):
error: 1 error occurred:
* error creating SQS Queue (PlayerFreezePrice-dev-64a7583): InvalidParameterValue: Value {"deadLetterTargetArn":{},"maxReceiveCount":4} for parameter RedrivePolicy is invalid. Reason: Invalid value for deadLetterTargetArn.
status code: 400, request id: e655efc4-e352-5db1-86b9-b592b5f812df
bored-table-20691
01/12/2022, 9:34 PM[]string
, in the importing stack it will be a StringArrayOutput.
Two questions:
1. What’s the right way to import this, given the stackRef.GetOutput(...)
returns an AnyOutput
? What’s the best way to make it a StringArrayOutput
?
2. Is there any way to iterate over the values in there as StringOutput
? e.g. say I want to make a new StringArrayOutput
that is the result of running pulumi.Sprintf
on the individual items in the array, can I do that? I really hope I don’t have to do this in an ApplyT
, because it’s going to be very painful.fierce-ability-58936
01/14/2022, 3:01 AMtype RepositoryArgs struct {
Environments pulumi.StringArrayInput `pulumi:"environments"`
}
How do I iterate over pulumi.StringArrayInput
? Like so?
args.Environments.ToStringArrayOutput().ApplyT(func(environments []string) error {
...
}
Should it be this or just []string
? What's the meaning of pulumi:"environments"
here?
Also, what's the meaning of this snippet? https://github.com/pulumi/examples/blob/master/aws-go-s3-folder-component/s3folder.go#L82-L90
Sorry. docs on this are really lean and there's not much in the examples either.chilly-plastic-75584
01/14/2022, 7:54 PMripe-shampoo-80285
01/14/2022, 11:33 PM