bored-table-20691
05/21/2021, 1:01 AMtls
provider?bored-monitor-99026
05/21/2021, 4:52 AMpurple-lawyer-35555
05/21/2021, 7:39 AMlittle-market-63455
05/21/2021, 1:55 PMOutputInstance.get()
method. From the docs:
This function is only callable in code that runs in the cloud post-deployment. At this point all Output values will be known and can be safely retrieved.But at 'cloud' time the Pulumi packages aren't available, for example for serialized lambdas. What am I missing? Is there any use case for it?
bored-table-20691
05/21/2021, 4:31 PMbored-table-20691
05/21/2021, 4:42 PMcolossal-australia-65039
05/21/2021, 10:13 PM@pulumi/docker
to build an image and i always get this warning. Why is it a warning?
warning: #1 [internal] load build definition from Dockerfile
worried-knife-31967
05/22/2021, 8:07 AMsilly-lock-12335
05/22/2021, 3:19 PMcolossal-potato-56488
05/22/2021, 4:44 PMconst postgres = new k8s.helm.v3.Chart("postgres", {
version: "10.4.6",
chart: "postgresql",
fetchOpts: {
repo: "<https://charts.bitnami.com/bitnami>",
},
});
// Cannot read property 'postgresql-password' of undefined
// kubectl get secret --namespace default postgres-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode
export const dbPassword = new k8s.core.v1.Secret('postgres-postgresql', { metadata: { namespace: 'default' } }).data.apply(data => data['postgresql-password'])
console.log(46, dbPassword)
postgresql.config.username = 'postgres'
postgresql.config.password = dbPassword // yields: Type 'Output<string>' is not assignable to type 'string'
const myDb = new postgresql.Database("my-database");
Any help appreciated!bored-table-20691
05/22/2021, 10:16 PMexp
field, which is in epoch time seconds. If I just do something like time.Now().Add(time.Hour * 24 * 30)
(to make one that expires in a month), that seems bad as it would regenerate the JWT every time that the stack was updated, which could cause downstream things to restart (e.g. if it was in a Kubernetes Secret
), even though there may be plenty of expiration left. Iām curious what others have done for similar cases.
To give an example, here is how I am generating the JWT
jwtKey, err := tls.NewPrivateKey(ctx, "jwt-key", &tls.PrivateKeyArgs{
Algorithm: pulumi.String("RSA"),
RsaBits: <http://pulumi.Int|pulumi.Int>(4096),
})
if err != nil {
return err
}
systemToken := pulumi.ToSecret(pulumi.All(jwtKey.PrivateKeyPem).ApplyT(
func(args []interface{}) (string, error) {
privateKey := args[0].(string)
privateKeyPem, err := decodePrivateKey([]byte(privateKey))
if err != nil {
return "", err
}
// Create the JWT claims, which includes the username, groups and expiry time
claims := &claims{
Username: "myusername",
Issue: "myissuer",
Groups: []string{"system"},
StandardClaims: jwt.StandardClaims{
// A 10 year token
ExpiresAt: time.Now().Add(time.Hour * 24 * 30).Unix(),
},
}
token := jwt.NewWithClaims(jwt.SigningMethodRS512, claims)
tokenString, err := token.SignedString(privateKeyPem)
return tokenString, err
},
))
ctx.Export("jwt-public-key", jwtKey.PublicKeyPem)
ctx.Export("jwt-private-key", jwtKey.PrivateKeyPem)
ctx.Export("system-token", systemToken)
purple-nail-36818
05/22/2021, 10:24 PMbillowy-army-68599
bored-monitor-99026
05/23/2021, 8:09 AMhappy-window-22449
05/23/2021, 8:31 AMget_subnet_ids
like so:
import pulumi
import pulumi_aws as aws
from pulumi_aws.ec2.get_subnet_ids import get_subnet_ids
vpc = aws.ec2.DefaultVpc(f'default-vpc')
get_subnet_ids(vpc_id=vpc.id)
It returns:
Exception: invoke of aws:ec2/getSubnetIds:getSubnetIds failed: Missing required argument: The argument "vpc_id" is required, but no definition was found. ()
All I want to do is get the subnets associated with the default VPCbored-monitor-99026
05/24/2021, 12:09 AMicy-jordan-58549
05/24/2021, 6:40 AMerror: no stack named '*' found
getting this for all my stacks, and now after some time even org is disappeared from app.pulumi.combig-caravan-27537
05/24/2021, 8:13 AMazure:monitoring:ScheduledQueryRulesAlert (scheduledqueryrulesalert-0):
error: Preview failed: transport is closing
azure:monitoring:ScheduledQueryRulesAlert (scheduledqueryrulesalert-1):
error: Preview failed: transport is closing
azure:network:NetworkInterface (ClusterName-bastion-0-nic):
error: Preview failed: transport is closing
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3df0355]
goroutine 349 [running]:
abundant-autumn-85033
05/24/2021, 9:33 AMtall-beard-99429
05/24/2021, 3:31 PMconst proj = new gitlab.Project(...)
and I want to get proj.id
to use in a string literal (typescript). The documentation seems to be indicating that I can do this: `console.log(proj.id.apply(v => ${v}
));` however it doesn't like itbulky-afternoon-6143
05/24/2021, 5:07 PMcreating urn:pulumi:deploy-ci-ap-1968-1974::deploy::aws:lb/targetGroup:TargetGroup::tg-34fffe08c9cdc8xx: error updating LB Target Group (arn:aws:elasticloadbalancing:us-west-2:9484287xxx:targetgroup/tg-34fffe08c9cdxxx-11dxx/be0f801aee3xxx) tags: error tagging resource (arn:aws:elasticloadbalancing:us-west-2:9484287xx:targetgroup/tg-34fffe08c9cdcxx/be0f801aee3xx): TargetGroupNotFound: Target groups 'arn:aws:elasticloadbalancing:us-west-2:9484287xx:targetgroup/tg-34fffe08c9cdc8xx-11dxx/be0f801aee3xx' not found
status code: 400, request id: 3a8287xx-xx-xx-xx-a9a26466xx
Does anyone have any idea why this is happening? We are using Pulumi 2.19 right nowbored-table-20691
05/24/2021, 8:26 PMpulumi destroy
, but I donāt want the actual resource deleted. An example would be a per-tenant S3 bucket or a database in an RDS instance (where each tenant gets a stack) that houses some data, so that once it is created it wonāt get removed, even if I destroy the stack, since this might have some user data that I want to not delete by default.
Ideally this would be automatic, i.e. I wouldnāt have to do anything by hand (i.e. manually delete it from the state file). Looking through the docs and Slack history, I couldnāt see an answer, so thought Iād ask here.polite-winter-39579
05/24/2021, 10:25 PMpolite-winter-39579
05/24/2021, 10:32 PMsteep-island-39848
05/24/2021, 10:33 PMif len(svc.statuses)>0:
pulumi.export("url", Output.concat(svc.statuses[0].url))
But Output objects donāt have a length, and a try / catch doesnāt stop Pulumi from crashing.
How would I check for that value to be available before exporting it?nutritious-battery-42762
05/24/2021, 11:41 PMfresh-hospital-81544
05/25/2021, 12:39 AM*.<http://working.domain.com|working.domain.com>
and *.<http://notworking.domain.com|notworking.domain.com>
The first issue I ran into was the clusterrole already existed and this was causing pulumi to fail. I fixed this by changing this line https://github.com/pulumi/cert-manager-examples/blob/master/examples/letsencrypt/index.ts#L56 so that nginxName
is unqiue. this allows pulumi to successfully run but then I end up with the following error when describing the <http://orders.acme.cert-manager.io|orders.acme.cert-manager.io>
that gets created
Warning Solver 31s cert-manager Failed to determine a valid solver configuration for the set of domains on the Order: no configured challenge solvers can be used for this challenge
Any clues about what other changes might be required in order to make this work would be great?
Thankscolossal-rainbow-39841
05/25/2021, 3:20 AMgreen-musician-49057
05/25/2021, 6:01 AMstraight-tailor-56799
05/25/2021, 6:42 AMsubprocess.Popen
. This shell script does gcloud auth
, pulumi login
and pulumi new
back in the python application I am trying to use pulumi auto and its complaining about missing google credentials. Note: I am using google storage as my managed backend⦠Am I doing anything fundamentally wrong ? how to address this ? I want my python application (using Flask) to create and destroy stacks using pulumi auto (using my gs backend url)