bright-sandwich-93783
07/08/2021, 7:59 PMbrainy-rainbow-75025
07/16/2021, 6:36 PMGetVpc
call but I can't find a single example of how to declare one of the required arguments for InputID
and again... all the links are broken.
Then, I attempt to get the provider version and this is what I get....brainy-rainbow-75025
07/16/2021, 6:36 PMbrainy-rainbow-75025
07/16/2021, 6:39 PMbrainy-dawn-85792
07/22/2021, 6:26 AMquaint-restaurant-18952
08/03/2021, 4:32 PMpulumi new kubernetes-go
just takes me straigth to
Installing dependencies...
go: <http://github.com/pulumi/pulumi/sdk/v3@v3.9.1|github.com/pulumi/pulumi/sdk/v3@v3.9.1> requires <http://github.com/spf13/cobra@v1.0.0|github.com/spf13/cobra@v1.0.0> requires <http://github.com/spf13/viper@v1.4.0|github.com/spf13/viper@v1.4.0> requires <http://go.uber.org/zap@v1.10.0|go.uber.org/zap@v1.10.0>: verifying go.mod: <http://go.uber.org/zap@v1.10.0/go.mod|go.uber.org/zap@v1.10.0/go.mod>: malformed record data
When i checked https://pkg.go.dev/go.uber.org/zap@v1.10.0 it is reported as broken.. any suggestions to how to get around this?quiet-architect-91246
08/03/2021, 5:22 PMpulumi.Run(func(ctx *pulumi.Context) error {
output := cluster.Provider.ApplyT(func(p *kubernetes.Provider) (string, error)
appSvc, svcerr := corev1.NewService(ctx, "app-svc", &corev1.ServiceArgs{
...
},
}, pulumi.Provider(p))
ctx.Export("appIp", appSvc.Status.ApplyT(func(status *corev1.ServiceStatus) *string {
return status.LoadBalancer.Ingress[0].Ip
}))
ctx.Export("test-export", pulumi.String("testexportvalue"))
return "", nil
}).(pulumi.StringOutput)
ctx.Export("output", output)
return nil
})
Hi everyone! Im running go code like stated above, and am wondering why only the "output" ctx.Export and not "test-export" or "appIp" show up in my Stack as outputs. I assume its because its inside of an .apply()
, but cant really understand why that would stop it from working. Also since it doesnt work the way I tried, how would you go about achieving a similar result?important-sandwich-62391
08/03/2021, 11:01 PMpanic: reflect: Elem of [secret] type interface {}
goroutine 262 [running]:
reflect.(*rtype).Elem(0x1f42040, 0xc00042d1b0, 0x194)
/usr/local/Cellar/go/1.16.3/libexec/src/reflect/type.go:915 +0x1a5
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.awaitInputs(0x23fd638|github.com/pulumi/pulumi/sdk/v3/go/pulumi.awaitInputs(0x23fd638>, 0xc0000580e0, 0x1f89ee0, 0xc00042d190, 0x94, 0x1f42040, 0xc00042d1b0, 0x194, 0x2420000, 0x0, ...)
/Users/pquerna/xsrc/ductone/ops/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:702 +0x2662
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.awaitInputs(0x23fd638|github.com/pulumi/pulumi/sdk/v3/go/pulumi.awaitInputs(0x23fd638>, 0xc0000580e0, 0x2088f00, 0xc00042d180, 0x99, 0x1fdc340, 0xc00042d1a0, 0x199, 0x0, 0x0, ...)
/Users/pquerna/xsrc/ductone/ops/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:734 +0x150a
<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.toOutputTWithContext.func3(0xc00042d1c0|github.com/pulumi/pulumi/sdk/v3/go/pulumi.toOutputTWithContext.func3(0xc00042d1c0>, 0x2088f00, 0xc00042d180, 0x2409798, 0xc00029dc70, 0x23fd638, 0xc0000580e0, 0x1fdc340, 0xc00042d1a0, 0x199, ...)
/Users/pquerna/xsrc/ductone/ops/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:828 +0x137
created by <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi.toOutputTWithContext|github.com/pulumi/pulumi/sdk/v3/go/pulumi.toOutputTWithContext>
/Users/pquerna/xsrc/ductone/ops/vendor/github.com/pulumi/pulumi/sdk/v3/go/pulumi/types.go:820 +0x216
bored-spoon-83710
08/06/2021, 9:09 AMcrds
└── go
├── acme
│ ├── v1
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ ├── v1alpha2
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ ├── v1alpha3
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ └── v1beta1
│ ├── challenge.go
│ ├── init.go
│ ├── order.go
│ └── pulumiTypes.go
├── certmanager
│ ├── v1
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha2
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha3
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ └── v1beta1
│ ├── certificate.go
│ ├── certificateRequest.go
│ ├── clusterIssuer.go
│ ├── init.go
│ ├── issuer.go
│ └── pulumiTypes.go
└── pulumiUtilities.go
I expected that the acme folder be under the certmanager folder, since the API group of these CRDs is <http://acme.cert-manager.io|acme.cert-manager.io>
. I see from the code (https://github.com/pulumi/crd2pulumi/blob/765df3fae9a0b07043229c4d540c8808a5c25d65/gen/generate.go#L335) that only the first word of the API group is kept.
Couldn’t we take as crd2pulumi argument a suffix to remove from the API group and a prefix to add so that for example crd2pulumi -g --prefix-to-add certmanager --suffix-to-remove <http://cert-manager.io|cert-manager.io> cert-manager.crds.yaml
would give a structure like that?
crds
└── go
├── certmanager
│ ├── acme
│ │ ├── v1
│ │ │ ├── challenge.go
│ │ │ ├── init.go
│ │ │ ├── order.go
│ │ │ └── pulumiTypes.go
│ │ ├── v1alpha2
│ │ │ ├── challenge.go
│ │ │ ├── init.go
│ │ │ ├── order.go
│ │ │ └── pulumiTypes.go
│ │ ├── v1alpha3
│ │ │ ├── challenge.go
│ │ │ ├── init.go
│ │ │ ├── order.go
│ │ │ └── pulumiTypes.go
│ │ └── v1beta1
│ │ ├── challenge.go
│ │ ├── init.go
│ │ ├── order.go
│ │ └── pulumiTypes.go
│ ├── v1
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha2
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ ├── v1alpha3
│ │ ├── certificate.go
│ │ ├── certificateRequest.go
│ │ ├── clusterIssuer.go
│ │ ├── init.go
│ │ ├── issuer.go
│ │ └── pulumiTypes.go
│ └── v1beta1
│ ├── certificate.go
│ ├── certificateRequest.go
│ ├── clusterIssuer.go
│ ├── init.go
│ ├── issuer.go
│ └── pulumiTypes.go
└── pulumiUtilities.go
fast-florist-41572
08/11/2021, 8:09 AMpulumi.all
?
The setup I have is that I create a list of AWS accounts from a JSON file, and then want to create a policy that uses the the IDs/Arns for all those accounts. However I'm not sure how best to pass this data in? Maybe I'm going about this the incorrect way but does anyone have best practises or how to do this?fast-florist-41572
08/11/2021, 9:24 AMpulumi.Any
where I want to define the resources as follows
"Resource": []interface{}{
pulumi.Sprintf("arn:aws:s3:::%s/AWSLogs/%s/*", ctBucket.ID(), logAccount.ID()),
},
That works fine if I inline it
But when I use a function instead like
func createS3BucketPolicyResources(bucket *s3.Bucket, accounts []*organizations.Account) []pulumi.StringOutput {
var resources []pulumi.StringOutput
for _, account := range accounts {
resource := pulumi.Sprintf("arn:aws:s3:::%s/AWSLogs/%s/*", bucket.ID(), account.ID())
resources = append(resources, resource)
}
return resources
}
I get an error marshaling properties: awaiting input property policy: cannot marshal an input of type pulumi.StringOutput with element type string as a value of type pulumi.StringOutput
fast-florist-41572
08/11/2021, 11:09 AMpulumi.StringArray
fast-florist-41572
08/11/2021, 1:00 PMmammoth-honey-6147
08/13/2021, 8:59 AMpulumi.Run
function in main
? I'm getting to the point where I'd like to break out some stuff into separate functions. For example, probing a generated url from an output until there's a response with go's native http
packagegreen-motorcycle-58080
08/13/2021, 12:30 PMfunc monitoring(ctx *pulumi.Context, k8sProvider *providers.Provider) error {...}
and call it happily within the pulumi.Run func with
if err = monitoring(ctx, k8sProvider); err != nil {
return err
}
green-motorcycle-58080
08/14/2021, 3:36 PMkubernetes.Provider
, not providers.Provider
. Just migrating to v3 nowripe-shampoo-80285
08/23/2021, 12:43 PMripe-shampoo-80285
08/23/2021, 1:23 PMpurple-jelly-68780
08/24/2021, 6:39 PM0
) to become an IntInput. I have tried:
pulumi.IntInput(0)
and
var zero int = 0
pulumi.IntInput(zero)
and
pulumi.IntInput(pulumi.Input(0))
with no success 😕 I think I'm missing something fundamental here so if anyone has a moment to help clear this up for me that would be great!purple-jelly-68780
08/27/2021, 4:34 PMfast-photographer-25791
08/27/2021, 6:51 PMDiagnostics:
pulumi:pulumi:Stack (localsre-eks-dev):
# <http://github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/providers|github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/providers>
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:28:38: undefined: getEnvOrDefault
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:28:61: undefined: parseEnvBool
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:31:38: undefined: getEnvOrDefault
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:34:53: undefined: getEnvOrDefault
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:34:76: undefined: parseEnvBool
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:37:50: undefined: getEnvOrDefault
/Users/zcn/go/pkg/mod/github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.6.3/go/kubernetes/providers/provider.go:37:73: undefined: parseEnvBool
wide-crayon-4093
09/07/2021, 5:51 AMpgaConfig := cluster.pgaPassword.Result.ApplyT(func(pgaPassword string) string {
println(fmt.Sprintf("%v", cluster.cfg.Databases))
return cluster.preparePgaConfig(pgaCfg.ApiKey, pgaPassword)
}).(pulumi.StringOutput)
if I have many 'cluster' resources, e.g iterating over an array of clusters and generating resources, then inside ApplyT preparePgaConfig
is called on the last cluster, not each. How do I pass the 'context' in there?wonderful-twilight-70958
09/18/2021, 9:10 PMwonderful-twilight-70958
09/18/2021, 9:10 PMnew
command I get the following error when installing the dependencies:
<http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/s3|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/s3>: unzip /home/john/go/pkg/mod/cache/download/github.com/pulumi/pulumi-aws/sdk/v4/@v/v4.18.0.zip: open /home/john/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.18.0/dotnet/KinesisAnalyticsV2/Inputs/ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersCsvMappingParametersArgs.cs: file name too long
wonderful-twilight-70958
09/18/2021, 9:10 PMwonderful-twilight-70958
09/18/2021, 9:12 PMgo 1.16.6
if relevant on Ubuntu 20.04quick-room-65437
09/22/2021, 3:31 PMquick-room-65437
09/22/2021, 3:33 PMbillowy-army-68599
id
output - if you share your code in the thread above we should be able to get it workingechoing-librarian-76448
09/29/2021, 4:57 PMctx.Export
inside of an .ApplyT
function, the export doesn't happen. Is this the expected behavior?
Here's a code example:
aksVNet.ID().ToStringOutput().ApplyT(func(id string) error {
applicationAKSSubnetID := fmt.Sprintf("%s/subnets/Application", id)
var clusterInput *aks.ClusterInput
if err := cfg.TryObject(appAKSClusterConfigKey, &clusterInput); err != nil {
return err
}
cluster, err = aks.CreateAKSCluster(ctx,
clusterInput,
applicationAKSSubnetID,
commonTags)
if err != nil {
return err
}
ctx.Export("clusterName", cluster.Name)
return nil
})