eager-vase-43200
10/03/2021, 4:31 PMrs, err := random.NewRandomString(ctx, fmt.Sprintf("some-project-suffix", name), &random.RandomStringArgs{
Length: <http://pulumi.Int|pulumi.Int>(4),
Special: pulumi.Bool(false),
})
pulumi -v=3 import random:index/randomString:RandomString some-project-suffix ffde
Previewing import (leftbin/org)
Type Name Plan Info
+ pulumi:pulumi:Stack some-stack create 1 error
= └─ random:index:RandomString some-project-suffix import 2 errors
Diagnostics:
pulumi:pulumi:Stack (some-stack):
error: preview failed
random:index:RandomString (some-project-suffix):
error: random:index/randomString:RandomString resource 'some-project-suffix' has a problem: Required attribute is not set. Examine values at 'RandomString.Length'.
error: Preview failed: one or more inputs failed to validate
can someone please help?damp-accountant-65956
10/04/2021, 1:24 AMerror: program failed: waiting for RPCs: rpc error: code = Unknown desc = marshaling properties: awaiting input property vpc: cannot marshal an input of type pulumi.StringOutput with element type string as a value of type pulumi.StringOutput
If I flatten it out into a single struct, though, it works fine...
3. do I have to call ctx.RegisterResourceOutputs
to register outputs at the end? it doesn't seem to have any effect if I comment it out. Or is that used for other languages like NodeJS and .NET?
Feel free to DM me or at least tag me so I see any replies... and TIA!!green-musician-49057
10/05/2021, 12:28 AMshy-author-33795
10/06/2021, 7:12 PMUnexpected duplicate underscore
error thrown by pulumi-terraform-bridge? I'm not sure what the issue may be here:
pulumi:pulumi:Stack (autoscaling_group-dev):
panic: fatal: An assertion has failed: Unexpected duplicate underscore: pulumi__project
goroutine 31 [running]:
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.failfast(...)>
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.9.1/go/common/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf(0xc001c01800|github.com/pulumi/pulumi/sdk/v3/go/common/util/contract.Assertf(0xc001c01800>, 0x86c3006, 0x23, 0xc001a1ae78, 0x1, 0x1)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.9.1/go/common/util/contract/assert.go:33 +0x1a5
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.TerraformToPulumiName(0xc001c01890|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.TerraformToPulumiName(0xc001c01890>, 0xf, 0x0, 0x0, 0x0, 0xffffffffffffff00, 0x1, 0xc001bf1440)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/names.go:106 +0x285
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.getInfoFromTerraformName(0xc001c01890|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.getInfoFromTerraformName(0xc001c01890>, 0xf, 0x92a72e0, 0xc000ad59e0, 0x0, 0x0, 0x0, 0xc001bf1440, 0x100, 0x6d7cee0, ...)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/schema.go:903 +0x1c5
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutputs(0x92c06b8|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutputs(0x92c06b8>, 0xc001708b40, 0xc001a1b268, 0x92a72e0, 0xc000ad59e0, 0x0, 0xc001bf1440, 0xc001c20100, 0x94)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/schema.go:622 +0x12e
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutput.func1(0x92c06b8|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutput.func1(0x92c06b8>, 0xc001708b40, 0x751ca60, 0xc001bf1680, 0x92c2878, 0xc000b01040, 0xc00178e9c0, 0xc001bf1440, 0x7510100, 0x4, ...)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/schema.go:745 +0xcc5
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutput(0x92c06b8|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutput(0x92c06b8>, 0xc001708b40, 0x751ca60, 0xc001bf1680, 0x92c2878, 0xc000b01040, 0xc00178e9c0, 0xc001bf1440, 0x92c0100, 0xc000b01040, ...)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/schema.go:753 +0xaf
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutputs(0x92c06b8|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.MakeTerraformOutputs(0x92c06b8>, 0xc001708b40, 0xc001bf1470, 0x92a72e0, 0xc000ad5710, 0xc00175f260, 0xc001bf1440, 0x100, 0x91b3400)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/schema.go:626 +0x1c6
<http://github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Check(0xc0002f6780|github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Check(0xc0002f6780>, 0x92879a8, 0xc001bf0ff0, 0xc001beee80, 0xc0002f6780, 0x7675101, 0xc001bef840)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.5.0/pkg/tfbridge/provider.go:701 +0x954
<http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Check_Handler.func1(0x92879a8|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Check_Handler.func1(0x92879a8>, 0xc001bf0ff0, 0x82db620, 0xc001beee80, 0x83ae320, 0xdccede8, 0x92879a8, 0xc001bf0ff0)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.9.1/proto/go/provider.pb.go:2558 +0x89
<http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x92879a8|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x92879a8>, 0xc001bf0cf0, 0x82db620, 0xc001beee80, 0xc0013dfbe0, 0xc001bd4fa8, 0x0, 0x0, 0x91a1080, 0xc0003ef870)
/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x30a
<http://github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Check_Handler(0x84e8120|github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Check_Handler(0x84e8120>, 0xc0002f6780, 0x92879a8, 0xc001bf0cf0, 0xc0004cdec0, 0xc0016e7fe0, 0x92879a8, 0xc001bf0cf0, 0xc0003d1c00, 0x3e7)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.9.1/proto/go/provider.pb.go:2560 +0x150
<http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0008defc0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0008defc0>, 0x92adef8, 0xc000522180, 0xc0018edd40, 0xc001801d70, 0xdc8a150, 0x0, 0x0, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:1217 +0x52b
<http://google.golang.org/grpc.(*Server).handleStream(0xc0008defc0|google.golang.org/grpc.(*Server).handleStream(0xc0008defc0>, 0x92adef8, 0xc000522180, 0xc0018edd40, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:1540 +0xd0c
<http://google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000556020|google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000556020>, 0xc0008defc0, 0x92adef8, 0xc000522180, 0xc0018edd40)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:878 +0xab
created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.37.0/server.go:876 +0x1fd
mammoth-honey-6147
10/10/2021, 7:56 PMnil
value if I reference an output that doesn't exist.
Also, if I have a folder structure like this:
root
infra
app
And my app
project references resources from the infra
project, is there a way I can pulumi up
the entire directory rather than running it from the individual folders/projects? Or would I need to look into the automation API for that?mammoth-honey-6147
10/15/2021, 4:15 PMstack output
object? In one stack I export a pulumi.StringArray{}
, when I reference this in another stack it returns type pulumi.AnyOutput
. I want to iterate over this like an array, but currently the only way I've got round to do this is via reflection, ie:
output1 := stackReference.GetOutput(pulumi.String("Infra"))
_ = output1.ApplyT(func(list interface{}) string {
switch reflect.TypeOf(list).Kind() {
case reflect.Slice:
s := reflect.ValueOf(list)
for i := 0; i < s.Len(); i++ {
ripe-shampoo-80285
10/17/2021, 3:10 AMacoustic-iron-92969
10/22/2021, 3:35 PMcold-toothbrush-60276
10/23/2021, 7:57 PMbusy-insurance-52853
10/26/2021, 2:08 PMbumpy-bear-61087
10/27/2021, 8:48 AMstring
from Output
? I'd like to get the string from containerDefaultSA.Email
, but I don't get the docs at https://www.pulumi.com/docs/intro/concepts/inputs-outputs/
containerDefaultSA, _ := projects.NewServiceIdentity(p.ctx, "hcSa", &projects.ServiceIdentityArgs{
Project: pulumi.String(p.projectID),
Service: pulumi.String("<http://container.googleapis.com|container.googleapis.com>"),
})
kmsIAM, err := organizations.LookupIAMPolicy(p.ctx, &organizations.LookupIAMPolicyArgs{
Bindings: []organizations.GetIAMPolicyBinding{{
Role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
Members: []string{
pulumi.Sprintf("serviceAccount:%s", containerDefaultSA.Email),
}},
},
}, nil)
bumpy-bear-61087
10/27/2021, 10:29 AMCluster: pulumi.String(fmt.Sprintf("projects/%s/locations/%s/clusters/%s",
pulumi.String(cluster.Project), pulumi.String(cluster.Location), pulumi.String(cluster.Name))),
bumpy-bear-61087
10/27/2021, 9:13 PM.applyT(...)
?bored-table-20691
10/27/2021, 11:53 PMApplyT
can accept a function that returns an error, and then will return a rejected outputbored-table-20691
10/27/2021, 11:56 PMbumpy-bear-61087
10/28/2021, 9:52 AM_, err = projects.NewOrganizationPolicy(p.ctx, "disallow_iam_external_domains", &projects.OrganizationPolicyArgs{
Project: pulumi.String(p.projectID),
Constraint: pulumi.String("constraints/iam.allowedPolicyMemberDomains"),
ListPolicy: projects.OrganizationPolicyListPolicyArgs{
Allow: projects.OrganizationPolicyListPolicyAllowArgs{
Values: pulumi.ToStringArray([]string{
p.gcpCustomerID,
}),
},
},
})
Diagnostics:
gcp:projects:OrganizationPolicy (disallow_iam_external_domains):
error: gcp:projects/organizationPolicy:OrganizationPolicy resource 'disallow_iam_external_domains' has a problem: ExactlyOne: "list_policy.0.allow.0.all": only one of `list_policy.0.allow.0.all,list_policy.0.allow.0.values` can be specified, but `list_policy.0.allow.0.all,list_policy.0.allow.0.values` were specified.. Examine values at 'OrganizationPolicy.ListPolicy.Allow[0].All'.
error: gcp:projects/organizationPolicy:OrganizationPolicy resource 'disallow_iam_external_domains' has a problem: ExactlyOne: "list_policy.0.allow.0.values": only one of `list_policy.0.allow.0.all,list_policy.0.allow.0.values` can be specified, but `list_policy.0.allow.0.all,list_policy.0.allow.0.values` were specified.. Examine values at 'OrganizationPolicy.ListPolicy.Allow[0].Values'.
bumpy-bear-61087
10/28/2021, 9:53 AMAll:...
so curious why that is triggered.best-summer-38252
10/28/2021, 9:36 PMpulumi.Run(func(ctx *pulumi.Context) error {
awsCfg := config.New(ctx, "aws")
region := awsCfg.Require("region")
stackName := ctx.stack
ctx.stack
doesn't exist but *pulumi.Context has stack
type Context struct {
ctx context.Context
info RunInfo
stack Resource
ripe-shampoo-80285
10/29/2021, 1:16 AMripe-shampoo-80285
10/29/2021, 1:46 AMcuddly-tailor-40542
10/30/2021, 12:28 AMmammoth-honey-6147
10/30/2021, 2:32 PMValues: pulumi.Map{
"configInline" : pulumi.Map{
"address-pools" : pulumi.Map{
"name": pulumi.String("pool"),
"protocol": pulumi.String("layer2"),
"addresses": pulumi.String("172.16.10.55-172.16.10.55"),
},
},
},
However the workload from the chart has issues trying to unmarshl it:
could not parse config: yaml: unmarshal errors:\n line 2: cannot unmarshal !!map into []config.addressPool
Getting the values from helm:
USER-SUPPLIED VALUES:
configInline:
address-pools:
addresses: 172.16.10.55-172.16.10.55
name: pool
protocol: layer2
Would appreciate a second pair of eyescuddly-tailor-40542
11/01/2021, 3:48 PMlb.LookupLoadBalancer
needs the Name
to be of type string, however, the Name
the Kubernetes ingress created for me is of type Pulumi.StringOutput
. Below is how I get the Name
ingressUrlName := ingress.Status.ApplyT(
func(status interface{}) string {
return *status.(*networkingv1.IngressStatus).LoadBalancer.Ingress[0].Hostname
}).(pulumi.StringOutput)
bumpy-bear-61087
11/04/2021, 9:59 AMcontainerDefaultSA, err := serviceaccount.NewAccount(p.ctx, fmt.Sprintf("gke-%s-default-sa", name), &serviceaccount.AccountArgs{
AccountId: pulumi.String(fmt.Sprintf("%sgke%sdefaultsa", p.args.ProjectId, name)),
Description: nil,
Disabled: pulumi.Bool(false),
DisplayName: pulumi.String("GKE default node SA"),
Project: pulumi.String(p.args.ProjectId),
})
if err != nil {
return nil, errors.Wrap(err, "could not create new default GKE SA")
}
containerDefaultSA.Email.ApplyT(func(email string) error {
kmsIAM, err := organizations.LookupIAMPolicy(p.ctx, &organizations.LookupIAMPolicyArgs{
Bindings: []organizations.GetIAMPolicyBinding{{
Role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
Members: []string{
fmt.Sprintf("serviceAccount:%s", email),
}},
},
}, nil); if err != nil {
return errors.Wrap(err, "could not get IAM policy")
}
_, err = serviceaccount.NewIAMPolicy(p.ctx, fmt.Sprintf("gke-%s-kms-iam", name), &serviceaccount.IAMPolicyArgs{
ServiceAccountId: pulumi.String(fmt.Sprintf(
"projects/%s/serviceAccounts/%s", p.args.ProjectId,
strings.ReplaceAll(email, "container-engine-robot.", p.args.ProjectId + "."),
)),
PolicyData: pulumi.String(kmsIAM.PolicyData),
})
if err != nil {
return errors.Wrap(err, "could not create default IAM SA")
}
return nil
})
bumpy-bear-61087
11/04/2021, 9:59 AMroles/cloudkms.cryptoKeyEncrypterDecrypter
.faint-area-23556
11/04/2021, 4:45 PMpulumi.Resource
that was created by referencing the pulumi.Context
? I have one package that creates a resource that another package depends onnumerous-printer-41511
11/06/2021, 10:09 PMterraform import
and pulumi import
don’t generate the associated HCL (in TF) or Go code (in Pulumi). Is there a reason this can’t be done?thousands-telephone-86052
11/12/2021, 9:21 PM<http://github.com/pulumi/pulumi-eks/sdk/go/eks|github.com/pulumi/pulumi-eks/sdk/go/eks>
- this seems to be the more visibly documented version. It is also probably compatible my current typescript-generated stacks
• <http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/eks|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/eks>
<-- this seems more "modern" in the sense of adoption of / integration with aws/eks features. This is not compatible with my current stacks.
It seems like both are currently maintained. Any experience / guidance / gotchas in choosing one over the other?happy-gpu-24908
11/15/2021, 5:44 AMpulumi.StringOutput
to json/yml. But I can't. It just print's some memory address.brash-match-91530
11/15/2021, 2:24 PMpulumi
team, we're hitting an issue with crd2pulumi
in go and apparently we're not the only ones. This https://github.com/pulumi/crd2pulumi/issues/46 is the issue and we're struggling to work around it. Would love any inputs you might have on the matterbrash-match-91530
11/15/2021, 2:24 PMpulumi
team, we're hitting an issue with crd2pulumi
in go and apparently we're not the only ones. This https://github.com/pulumi/crd2pulumi/issues/46 is the issue and we're struggling to work around it. Would love any inputs you might have on the matterbillowy-army-68599
11/15/2021, 3:42 PMbrash-match-91530
11/15/2021, 4:00 PM