wet-ambulance-3300
02/19/2021, 10:17 AMdata "archive_file" "source_archive" {
source_dir = var.source_directory
output_path = "./main.zip"
type = "zip"
}
resource "google_storage_bucket_object" "archive" {
name = "${lower(replace(base64encode(data.archive_file.source_archive.output_md5), "=", ""))}.zip"
bucket = google_storage_bucket.source_bucket.name
source = data.archive_file.source_archive.output_path
}
I saw https://www.pulumi.com/docs/intro/concepts/assets-archives/#archives but as far as I can tell, it just represents an archive. It does not actually create the archive... Please correct me if i'm wrong.future-nail-59564
02/19/2021, 12:57 PMchild_process.exec()
to call out to a bash script, but it seems like the “black magic” that pulumi resorts to for dynamic providers doesn’t like child_process
. Is there any way around that? What I need to do is clone a git repo into a temp dir, copy some files in a branch, commit, push and create a PR using the GitHub CLI. The bash script does all of that very nicely, if only I could invoke it! 🤔wet-ambulance-3300
02/23/2021, 3:35 PMconst [projectId, projectNumber] = gcp.organizations.getProject({}).then(prj => [prj.id, prj.number])
bumpy-laptop-30846
03/04/2021, 11:17 AMawait
can be used in typescript.
How do you use something like aws.iam.User.get
which returns a promise without await in your index.ts
?ancient-megabyte-79588
03/04/2021, 4:23 PMpulumi cli
to proceess a .env
file? I want to simulate what our deployment pipelines do by passing in secrets as Env Var and I don't want to make a bunch of actual Env Var in my shell session.ancient-megabyte-79588
03/04/2021, 6:28 PM2021-03-04T17:23:48.8597836Z azure-native:documentdb/v20210301preview:DatabaseAccount (releasesplatform-cosmosdb):
2021-03-04T17:23:48.8598404Z error: building auth config: obtain subscription() from Azure CLI: Error parsing json result from the Azure CLI: Error waiting for the Azure CLI: exit status 1
This build worked prior to the cosmosdb additions.
I've re-run another one of our pipelines that executes a pulumi app and it continues to work.ancient-megabyte-79588
03/04/2021, 6:32 PMaz logout
and tried pulumi up
and now the error is on my local machine as well.ancient-megabyte-79588
03/04/2021, 6:33 PMpulumi config
which is what the pipelines do for authentication with Azuregentle-monitor-55086
03/04/2021, 8:28 PM"paths": {}
and baseUrl
in my tsconfig.json
Webstorm and VS both see and understand my custom paths just fine.
However pulumi up
says it can't find the modules, any hoops i gotta jump through to get pulumi to understand the pathing?cold-yacht-45876
03/05/2021, 1:40 PMerror: no resource plugin 'pulumi-nodejs' found in the workspace or on your $PATH
Does anyone know how to attack this?acceptable-army-69872
03/05/2021, 7:00 PMnew Provider
which doesn't automatically pick up the profile set by config set aws:profile blah
straight-cartoon-24485
03/07/2021, 5:35 AMpulumi up
.
Diagnostics:
pulumi:providers:kubernetes (default_0_0_1):
error: no resource plugin 'kubernetes-v0.0.1' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource kubernetes v0.0.1`
package.json
of my local autogenerated package:
{
"name": "@pulumi/depo-cert-manager",
"version": "0.0.1",
"scripts": {
"build": "tsc"
},
"peerDependencies": {
"@pulumi/pulumi": "^2.22.0"
},
"pulumi": {
"resource": true
},
"devDependencies": {
"typescript": "^4.2.3"
}
}
loading that package in the main pulumi program package.json
with:
"dependencies": {
"@pulumi/depo-cert-manager": "file:cert-manager-types",
What's causing pulumi to think of this package as a plugin?
I changed to "version": "0.0.2"
, and I get the following on `pulumi up`:
Diagnostics:
pulumi:providers:kubernetes (default_0_0_2):
error: no resource plugin 'kubernetes-v0.0.2' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource kubernetes v0.0.2`
busy-cat-53487
03/08/2021, 11:05 AMmillions-furniture-75402
03/08/2021, 4:44 PMwet-soccer-72485
03/08/2021, 4:45 PMTypeError: Class constructor ComponentResource cannot be invoked without 'new
wet-soccer-72485
03/08/2021, 5:02 PMbland-byte-34481
03/09/2021, 7:45 PMexport declare function buildAndPushImage(imageName: string, pathOrBuild: pulumi.Input<string | DockerBuild>, repositoryUrl: pulumi.Input<string>, logResource: pulumi.Resource, connectToRegistry?: () => pulumi.Input<Registry>, skipPush?: boolean): pulumi.Output<string>;
what should I pass as "logResource"?better-shampoo-48884
03/12/2021, 8:27 PMindex.ts
I create a resource (resourceGroup) as const rg = new azure.resource... etc
then afterwards place rg in an object createdStuff = { rg: { name: rg.name.apply(name => name), id: rg.id.apply(id => id), resource: rg}}
and that's fine. then i create a complicated set of network operations, storage operations, etc - and put them each into their own module which follow the model (module.ts: export const createNetwork = function(curStack : any) : any { .. I do all my stuff here and update curStack with new resources .. until.. return curStack }
). So far this seems fine. Then I tried making my fourth resource this way - and relying on createdStuff.rg.name
as part of the name of the resource I'm creating.. I've used createdStuff.rg.name
many times before, in all references to resourceGroupName
in at least 8 other resources, but THIS it doesn't like.. I'm getting ye old classic ror: azure-native:keyvault:Vault resource 'Calling [toString] on an [Output<T>] is not supported.
though as you have seen, createdStuff.rg.name == rg.name.apply(name => name)
. I just feel that it's weird.better-shampoo-48884
03/12/2021, 8:28 PMbreezy-butcher-78604
03/16/2021, 6:09 AMComponentResource
?
basically I have an S3 bucket inside a ComponentResource
however I now want to refactor this template and move the bucket out of the component resource, but i don't want to replace the actual resource in AWS. is this possible?
I basically removed the entire component resource from my code, copy-pasted just the bucket resource into the template. I've then set a few variations of aliases
on the resource but each time i run pulumi up
it's seeing them as two different resources. I feel like maybe i'm just not providing the right alias but just wanted to check if this was actually possiblequaint-electrician-41503
03/16/2021, 6:20 AMResources:
1 unchanged
Do you want to perform this update? yes
Updating (dev):
Type Name Status
pulumi:pulumi:Stack pulumi-vpc-ts-dev
Resources:
1 unchanged
Duration: 1s
numerous-psychiatrist-20856
03/16/2021, 10:00 AMfuture-morning-96441
03/17/2021, 8:34 AMpnpm
? I'm banging my head against the wall for quite some time now...
Afaik read-package-tree
is used by pulumi to find all dependencies, but this is expecting a flat node_modules directory and disregards the node_modules/.pnpm
directory. I also desperately used shamefully-hoist
, which changed the error messages but didn't unblock me.
Any ideas?prehistoric-account-60014
03/17/2021, 3:48 PMpulumi up
? In this case it's a pulumi.dynamic.Resource
and I tried always returning { changes: true }
from diff
, but that didn't work.stocky-fireman-97153
03/18/2021, 7:33 PMmillions-furniture-75402
03/19/2021, 8:02 PMpulumi import
a custom resource? The urn has a $
in it, e.g.: db$aws:rds/instance:Instance
pulumi import 'db$aws:rds/instance:Instance' production-db-instance-rds prod-mariadb
fails with:
panic: fatal: A precondition has failed for urn
goroutine 190 [running]:
<http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)>
handsome-state-26704
03/21/2021, 12:51 AMipv6VPC = new aws.ec2.Vpc("IPv6VPC_1", {
"cidrBlock": "10.10.0.0/16",
"assignGeneratedIpv6CidrBlock": true
});
ipv6Subnet = pulumi.all([ipv6VPC.cidrBlock, ipv6VPC.ipv6CidrBlock]).apply(([v4Cidr, v6Cidr]) => {
new aws.ec2.Subnet("IPv6Subnet_1", {
"vpcId": ipv6VPC.id,
"cidrBlock": v4Cidr.replace(/0.0\/.+$/, "10.0/24"),
"ipv6CidrBlock": v6Cidr.replace(/00::\/.+/, "10::/64")
});
})
exports.net1VpcId = ipv6VPC.id;
exports.net1SubnetId = ipv6Subnet.id;
busy-magazine-48939
03/22/2021, 8:13 AMconst http = new aws.ec2.SecurityGroup(
`${sharedPrefix}-http`,
{
name: `${sharedPrefix}-http`,
ingress: [
{
fromPort: 80,
toPort: 80,
protocol: 'TCP',
cidrBlocks: [...whitelisted],
},
],
vpcId: vpc.id,
tags: overridenTags,
},
{ deleteBeforeReplace: true }
);
const https = new aws.ec2.SecurityGroup(
`${sharedPrefix}-https`,
{
name: `${sharedPrefix}-https`,
ingress: [
{
fromPort: 443,
toPort: 443,
protocol: 'TCP',
cidrBlocks: [...whitelisted],
},
],
vpcId: vpc.id,
tags: overridenTags,
},
{ deleteBeforeReplace: true }
);
const alb = new awsx.lb.ApplicationLoadBalancer(albName, {
name: albName,
external: true,
vpc: vpc,
subnets: vpc.publicSubnetIds,
securityGroups: [http.id, https.id],
tags: overridenTags,
});
rough-window-15889
03/22/2021, 1:41 PMlittle-cartoon-10569
03/22/2021, 10:57 PMlittle-cartoon-10569
03/22/2021, 10:57 PM"lib": "./lib", "test": "."
in my package.json, but I don't know what they're for or if they're right.npm run test --spec **/Si*.spec.ts
). If I use a slightly broader ant-expression that finds more than one file (npm run test --spec **/S*.spec.ts
) then everything is fine, even the tests in the file that previously didn't compileexpect(bucketUnderTest.bucket.serverSideEncryptionConfiguration!.rule.applyServerSideEncryptionByDefault.sseAlgorithm.promise()).to.eventually.contain("kms")
and it's complaining with this:
error TS2339: Property 'rule' does not exist on type 'Output<BucketServerSideEncryptionConfiguration | undefined>'.Property 'rule' does not exist on type 'OutputInstance<BucketServerSideEncryptionConfiguration | undefined>'.
Output<BucketServerSideEncryptionConfiguration | undefined>
so TypeScript / tslint has a rant.