boundless-telephone-98269
02/13/2022, 8:24 PMlimited-rainbow-51650
02/14/2022, 9:07 AMmake install_nodejs_sdk
on my Mac, but even without a single change, this build command fails:
$ make install_nodejs_sdk
rm -rf sdk/nodejs
cd provider/cmd/pulumi-gen-xyz && go run . nodejs ../../../sdk/nodejs /Users/r.de.smet/Projects/pulumi-component-provider-go-boilerplate/schema.yaml
cd sdk/nodejs/ && \
yarn install && \
yarn run tsc --version && \
yarn run tsc && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
sed -i.bak -e "s/\${VERSION}/0.0.1/g" ./bin/package.json && \
rm ./bin/package.json.bak
yarn install v1.22.17
warning package.json: No license field
info No lockfile found.
warning @pulumi/xyz@${VERSION}: No license field
[1/4] 🔍 Resolving packages...
warning @pulumi/aws > read-package-tree@5.3.1: The functionality that this package provided is now in @npmcli/arborist
warning @pulumi/aws > @pulumi/pulumi > read-package-tree@5.3.1: The functionality that this package provided is now in @npmcli/arborist
warning @pulumi/aws > aws-sdk > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning @pulumi/aws > aws-sdk > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning @pulumi/aws > aws-sdk > uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See <https://v8.dev/blog/math-random> for details.
[2/4] đźšš Fetching packages...
[3/4] đź”— Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
✨ Done in 28.81s.
yarn run v1.22.17
warning package.json: No license field
$ /Users/r.de.smet/Projects/pulumi-component-provider-go-boilerplate/sdk/nodejs/node_modules/.bin/tsc --version
Version 3.9.10
✨ Done in 0.35s.
yarn run v1.22.17
warning package.json: No license field
$ /Users/r.de.smet/Projects/pulumi-component-provider-go-boilerplate/sdk/nodejs/node_modules/.bin/tsc
✨ Done in 12.38s.
yarn unlink xyz
yarn unlink v1.22.17
error No registered package found called "xyz".
info Visit <https://yarnpkg.com/en/docs/cli/unlink> for documentation about this command.
make: *** [install_nodejs_sdk] Error 1
$
What am I missing here? Also, if I want to change the setup to have my own package name, generated in my own namespace (npm), what files should I update manually and which ones are generated? Not much documented about all of this.quiet-laptop-13439
02/14/2022, 3:01 PMStringPtrOutput
to StringOutput
(and default to zero value?) Right now we wrote our own helper func, but it looks strangeboundless-telephone-98269
02/14/2022, 3:53 PMStringPtrOutput
has a Elem()
method that does this ^late-energy-66663
02/14/2022, 8:27 PMerror: could not create stack: the stack is currently locked by 1 lock(s). Either wait for the other process(es) to end or manually delete the lock file(s).
the only Way I found was to go and delete the .json lock file manually from the stack folder . Just wondering how I can manage and check if the stack is lock using Automation api and unlock the locked stack using automation api , instead of the deleting the stack file manually .little-soccer-5693
02/14/2022, 10:27 PMgo mod tidy
but now i'm getting:
pulumi:providers:aws (default):
`error: no resource plugin 'aws-v4.37.4' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource aws v4.37.4``
but that doesn't work:
$ pulumi plugin install resource aws v4.37.4
[resource plugin aws-4.37.4] installing
error: [resource plugin aws-4.37.4] downloading from : 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-aws-v4.37.4-linux-amd64.tar.gz>
any idea what's going on?quiet-addition-42622
02/15/2022, 2:53 AMpulumi.All(a, b, c).ApplyT(myFunc)
and c
is a pulumi secret, the resulting output of ApplyT
is also a secret, right? This doc talks about ApplyT()
but not All()
thousands-telephone-86052
02/22/2022, 4:56 PMbored-table-20691
02/22/2022, 8:24 PMthousands-telephone-86052
02/22/2022, 10:31 PMup
the stack, it downloads the plugins it needs.. which.. are in typescript, not Go / native:
âžś eks_go git:(feature/eks_go_aws) âś— pulumi plugin ls
NAME KIND VERSION SIZE INSTALLED LAST USED
TOTAL plugin cache size: 0 B
âžś eks_go git:(feature/eks_go_aws) âś— ls ~/.pulumi/plugins/
âžś eks_go git:(feature/eks_go_aws) âś—
âžś eks_go git:(feature/eks_go_aws) âś— ls
eksCluster.go go.mod go.sum main.go nodeGroups.go Pulumi.eks-test.yaml Pulumi.yaml
âžś eks_go git:(feature/eks_go_aws) âś— pulumi up
Please choose a stack, or create a new one: eks-test
Previewing update (eks-test):
[resource plugin kubernetes-3.16.0] installing
Downloading plugin: 0 B / 30.27 MiB [----------------------------------] 0.00%[resource plugin eks-0.37.1] installing
Downloading plugin: 656.37 KiB / 656.37 KiB [=======================] 100.00% 0s
[resource plugin aws-4.37.4] installing
Downloading plugin: 30.27 MiB / 30.27 MiB [=========================] 100.00% 1s
Downloading plugin: 96.60 MiB / 96.60 MiB [=========================] 100.00% 2s
Type Name Plan Info
+ pulumi:pulumi:Stack eks_go-eks-test create 3 errors; 9 messages
+ └─ pulumi:providers:aws test_east1 create
Diagnostics:
pulumi:pulumi:Stack (eks_go-eks-test):
error: Error: invocation of pulumi:pulumi:getResource returned an error: unknown resource urn:pulumi:eks-test::eks_go::aws:iam/role:Role::eksEc2Role
at Object.callback (/home/vikas/.pulumi/plugins/resource-eks-v0.37.1/node_modules/@pulumi/runtime/resource.ts:139:40)
at Object.onReceiveStatus (/home/vikas/.pulumi/plugins/resource-eks-v0.37.1/node_modules/@grpc/grpc-js/src/client.ts:338:26)
at Object.onReceiveStatus (/home/vikas/.pulumi/plugins/resource-eks-v0.37.1/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
at Object.onReceiveStatus (/home/vikas/.pulumi/plugins/resource-eks-v0.37.1/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
at /home/vikas/.pulumi/plugins/resource-eks-v0.37.1/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
at processTicksAndRejections (node:internal/process/task_queues:78:11)
bored-table-20691
02/22/2022, 10:32 PMbored-table-20691
02/22/2022, 10:33 PMPulumi.yaml
in that directory look like?bored-table-20691
02/22/2022, 10:33 PMlate-energy-66663
02/25/2022, 10:26 PMgreen-musician-49057
02/28/2022, 7:30 PMApplyT
? I noticed that the function can return an error...but it doesn't seem to have any effect.
Are we supposed to call panic(err)
within the interpolation function? And if so, is there a risk of that panic
causing issues with the pulumi state or the infra state?chilly-plastic-75584
03/04/2022, 7:07 PMcalm-train-38333
03/05/2022, 3:06 PMwafv2
objects on AWS. This `pulumiTypes.go` file is unusually big at 70MB and 7 million lines.
My local go build
on Mac takes 60 secs. Pulumi preview mostly hangs, sometimes works. All Github Action containers crash because of their provisioned CPU/mem.
It is just wafv2
that is giving problems. Provisioning other objects are mostly fine both locally and on CD pipelines.
Any reason on why this is such an outlier and ways to work around this?quiet-laptop-13439
03/09/2022, 2:50 PMproud-machine-85126
03/09/2022, 7:05 PMalert-crayon-18838
03/10/2022, 4:09 AMvpc, err := ec2.NewVpc(ctx, "partseeker-dev", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
assertNoErr(err)
publicA, err := ec2.NewSubnet(ctx, "publicA", &ec2.SubnetArgs{
VpcId: pulumi.String(vpc.ID()), //<---- here
AvailabilityZone: pulumi.String(appAZ),
CidrBlock: pulumi.String("10.0.10.0/24"),
})
VpcId needs a string, and I thought vpc.ID() returns a string... but it returns the type IDOutput. What should I be doing instead?alert-crayon-18838
03/11/2022, 2:00 AMbright-needle-80161
03/14/2022, 5:31 PMred-football-97286
03/15/2022, 2:01 PMflaky-school-70251
03/17/2022, 7:59 AMproject := auto.Project(workspace.Project{
Name: tokens.PackageName(projectName),
Runtime: workspace.NewProjectRuntimeInfo("go", nil),
Backend: &workspace.ProjectBackend{
URL: "file://~/.pulumi-local",
}, })
s, err := auto.UpsertStackInlineSource(ctx, stackName, projectName, deployFunc(configPath), project, secretsProvider, stackSettings, envvars)
My issue is that if ~/.pulumi-local
directory doesn't exist, this will fail with stderr: error: unable to open bucket file:///home/tim/.pulumi-local: stat /home/tim/.pulumi-local: no such file or directory
. If the directory exists, the code works and the stack is updated without issue.
Looking through the pulumi CLI code, the 'login' function is what would normally create the local backend directory if it doesn't exist, but I can't seem to find this functionality exposed by the SDK.late-energy-66663
03/20/2022, 10:30 PM<http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/eks|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/eks>
or
"<http://github.com/pulumi/pulumi-eks/sdk/go/eks|github.com/pulumi/pulumi-eks/sdk/go/eks>"
Just wondering which SDK should i use for EKS cluster provisioning ?polite-napkin-90098
04/08/2022, 7:31 PMquaint-hair-91883
04/12/2022, 10:15 AMmodern-nest-74116
04/14/2022, 6:44 PMfunc createUsers(ctx *pulumi.Context,
group mcfg.Group,
globalTags map[string]string) ([]pulumi.StringOutput, error) {
// the order of users in the list is important to avoid
// unnecessary updates of GroupMembership and to serialize its update
// with NewUsers exectued in a loop.
sort.Strings(group.Users)
var newUsersNames []pulumi.StringOutput
var newUser *iam.User
var err error
for _, user := range group.Users {
newUser, err = iam.NewUser(ctx, user, &iam.UserArgs{
Name: pulumi.String(user),
Path: pulumi.String("/perf/"),
Tags: pulumi.ToStringMap(globalTags),
})
if err != nil {
return nil, err
}
newUsersNames = append(newUsersNames, newUser.Name)
}
if len(newUsersNames) > 0 {
ngMemberName := fmt.Sprintf("%s-%s", group.Name, "mozart")
// a hack to serialize NewUsers with NewGroupMembership
_, err := iam.NewGroupMembership(ctx, ngMemberName, &iam.GroupMembershipArgs{
Users: pulumi.ToStringArray(group.Users),
Group: pulumi.String(group.Name),
}, pulumi.DependsOn([]pulumi.Resource{newUser}))
if err != nil {
return nil, err
}
}
return newUsersNames, nil
}
My initial attempt was to convert newUsersNames - []pulumi.StringOutput
to []string
using ApplyT on each of the list elements. It works but then the creation of NewUsers
and NewGroupMembership
is not serialized.
In the above version I just pass the list of users which is provided by a function argument to GroupMembershipArgs
and try to create a dependency on the last NewUser
resource created in the loop. Is there a better way of doing this?late-energy-66663
04/15/2022, 3:44 PMsalmon-account-74572
04/19/2022, 3:16 PMAWS_PROFILE
in the environment (set via .envrc
and direnv
) to specifying the AWS profile in a Pulumi configuration value (i.e., pulumi config set aws:profile <name>
). This worked for everything except a Pulumi program that sets up VPC peering between VPCs in two different regions. The error it returned was related to the AWS provider that operates in the “destination” region (one provider operates in the “source” region to set up peering-related objects, and a second provider operates in the “destination” region to set up the corresponding objects on the other side of the connection). Is this expected behavior? I haven’t dug deep into fixing it yet, but I’m guessing there’s something about the way I’m setting up the destination provider that isn’t working with/respecting the aws:profile
configuration value. (All this is written in Go, hence why I’m posting here.)