elegant-crayon-4967
04/28/2021, 9:14 PMelegant-pager-5412
04/29/2021, 4:39 AMserializeFunction
is having an issue serializing TypeORM active record entities. I’ve opened an issue regarding this with easy reproduction steps: https://github.com/pulumi/pulumi/issues/6908
Maybe someone here bumped into this and solved it?polite-shoe-79877
04/29/2021, 10:11 AMimport serviceConfig from '../appsettings.json';
this in ts config
{
"compilerOptions": {
"strict": true,
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"experimentalDecorators": true,
"pretty": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
},
"files": [
"index.ts"
]
}
But iam till gettin this error
Cannot find module '../appsettings.json'. Consider using '--resolveJsonModule' to import module with '.json' extensiondamp-school-17708
04/29/2021, 10:56 AMmysterious-wolf-74677
04/29/2021, 10:06 PMaws:iam:RolePolicy (fooRolePolicy):
error: aws:iam/rolePolicy:RolePolicy resource 'fooRolePolicy' has a problem: "policy" contains an invalid JSON: invalid character '\n' in string literal
the resource is built like this:
new aws.iam.RolePolicy('fooRolePolicy', {
role: fooRole.id,
policy: `{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AWSCloudTrailCreateLogStream",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "${foobarLogGroup.arn}:*"
}
]
}`,
})
mysterious-wolf-74677
04/29/2021, 10:06 PMmysterious-wolf-74677
04/29/2021, 10:07 PMmysterious-wolf-74677
04/29/2021, 10:08 PMbreezy-butcher-78604
04/30/2021, 3:19 AMOutput<T>
instead of just T
or Promise<T>
? stack outputs will be known at preview time but since they return Output<T>
i can't use those values until deploy timemysterious-oyster-86659
05/03/2021, 7:13 PMTS
-formatted Lambda
resource to provision a Python
runtime, which already exists in S3 as a zip. Any thoughts to solutions for my use-case...?
Note that all other resources referenced in properties for the Lambda
are valid and exist in my stack.
export const campuSolutionsLambdaIngestCleaner = new aws.lambda.Function(
"campus-solutions-lambda-ingest-cleaner-foo",
{
name: "campuSolutions-LambdaIngestCleaner-foo",
role: campusSolutionsLambdaRole.arn,
// code: lambdaScriptBucketObjectCampuSolutionsCleaner,
s3Bucket: lambdaScriptBucketObjectCampuSolutionsCleaner.bucket,
s3Key: lambdaScriptBucketObjectCampuSolutionsCleaner.key,
memorySize: 9000,
runtime: "python3.8",
timeout: 800,
vpcConfig: {
securityGroupIds: [lambdaSqlRedshiftSecurityGroupfoo.id],
subnetIds: [
config.require("az0SubnetPrivateId"),
config.require("az1SubnetPrivateId"),
],
},
tags: tags(),
},
{ deleteBeforeReplace: true },
)
*ERROR*(s):
* filename, s3_* or image_uri attributes must be set
or sometimes, it's this...
error creating Lambda Function: ValidationException: status code: 400, request id: e8e53a21-e586-4bd1-a0dc-e9aa5627a87f
fresh-hospital-81544
05/04/2021, 12:57 AMconst exampleRecord: aws.route53.Record[];
for (const range of Object.entries(exampleCertificate.domainValidationOptions.apply(domainValidationOptions => domainValidationOptions.reduce((__obj, dvo) => { ...__obj, [dvo.domainName]: {
name: dvo.resourceRecordName,
record: dvo.resourceRecordValue,
type: dvo.resourceRecordType,
} }))).map(([k, v]) => {key: k, value: v})) {
exampleRecord.push(new aws.route53.Record(`exampleRecord-${range.key}`, {
allowOverwrite: true,
name: range.value.name,
records: [range.value.record],
ttl: 60,
type: range.value.type,
zoneId: exampleZone.then(exampleZone => exampleZone.zoneId),
}));
}
Hi, typescript noob so bear with me. The above code is copy+paste from the docs and it gives a lot of compiler errors. does anyone know how it should be? Thankselegant-pager-5412
05/05/2021, 1:15 PMincalculable-hairdresser-41711
05/10/2021, 11:17 AMworried-boots-97291
05/11/2021, 10:57 AMruntime.setMocks({
newResource(args: MockResourceArgs): { id: string | undefined; state: Record<string, any> } {
const { type, id, name } = args;
expect(type).toEqual("azure-nextgen:network/latest:Subnet");
return {
id,
state: {
...args.inputs,
name,
},
};
},
call(args: MockCallArgs) {
return args.inputs;
},
});
Running tests give:
`Program run without the Pulumi engine available; re-run using the pulumi
CLI`
Is anyone able to help with why this is?elegant-pager-5412
05/12/2021, 7:30 AMdata-fns
) and simply copy the entire folder into the lambda’s code. Why can’t Pulumi only copy the subset of features used?fast-vegetable-68654
05/12/2021, 3:10 PMrootAccountId
) and use it when creating the principal for a role.
const rootAccountId = organization.getOutput('rootAccountId'); <-- output from another stack
const adminRole = createRole({
allowedActions: accountRoles.admin,
principal: {
AWS: [rootAccountId.apply((id) => `arn:aws:iam::${id}:root`)],
},
roleName: 'admin',
});
export function createRole({
allowedActions,
principal,
roleName,
}: {
allowedActions: string[];
principal: aws.iam.Principal;
roleName: string;
}) {
const role = new aws.iam.Role(`${roleName}-role`, {
assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal(principal),
});
...
}
little-cartoon-10569
05/13/2021, 1:59 AMproud-spoon-58287
05/13/2021, 11:42 AMaws:elasticache:Cluster (data-feed-control):
error: unmarshaling urn:pulumi:development::platform-data-feed::aws:elasticache/cluster:Cluster::data-feed-control's instance state: could not read field snapshot_arns: '' expected type 'string', got unconvertible type '[]interface {}', value: '[]'
in this part:
return new aws.elasticache.Cluster('data-feed-control', {
clusterId: 'data-feed-control',
engine: 'redis',
engineVersion: '6.x',
nodeType: 'cache.t3.micro',
numCacheNodes: 1,
parameterGroupName: 'default.redis6.x',
securityGroupIds: [defaultSecurityGroup.id],
subnetGroupName: feedControlSubnetGroup.id
})
melodic-easter-82419
05/13/2021, 4:18 PMexport const resources = pulumiResources.reduce(
(result, res) => ({
...result,
[res.location]: {
// This variable is Output<string>
resourceGroup: res.resourceGroup,
otherProperty: res.foo,
},
}),
{}
);
Problem I am running into is when I try to run pulumi.apply in order to set the key as a string. When I run this, I will either only get the first item in the list applied to the object or I will get the last object of list applied.
export const resources = pulumiResources.reduce((result, res) =>
res.location.apply(
(location) => ({
...result,
[location]: {
// This variable is Output<string>
resourceGroup: res.resourceGroup,
otherProperty: res.foo,
},
}),
{}
)
);
I tried doing a pulumi.all on the resources and this didn’t work either.red-football-97286
05/14/2021, 8:23 AMmicroscopic-dress-1605
05/18/2021, 12:06 PMError: Program run without the Pulumi engine available; re-run using the `pulumi` CLI
As if the mocks are not taken into account.
I’ve done the necessary modifications to the mock definition as defined by the Upgrading to Pulumi v3 documentation.
The unit tests worked perfectly well with the v2 of the Pulumi SDK.
Note: By Pulumi library I mean it defines a generic set of infrastructure that is reused by several Pulumi programs. So, it does not define a stack. This is similar to Terraform modules.
Does anyone has an idea what could be the problem? Thank you for your help.gray-hamburger-90102
05/21/2021, 9:27 AMconst vpc = new awsx.ec2.Vpc("BaseNetworkVPC", {
cidrBlock: "10.50.0.0/22",
subnets: [
{ type: "public" },
{ type: "private" },
],
});
// this is probably wrong, but not sure how to proceed!
const vpcPrivateSubnets = pulumi.output(vpc.privateSubnets).apply(psns => psns.map(psns => psns.routeTable?.id));
// I want to make a routeTable propagation for each of my VPC's private subnets
const routeTablePropagation2 = new aws.ec2.VpnGatewayRoutePropagation("VPGPropagateMainRouteTable", {
vpnGatewayId: gatewayAssociation.associatedGatewayId,
routeTableId: // what goes here?
});
});
limited-rainbow-51650
05/21/2021, 10:07 AMdone
function in both paths of my if-else
, I still get this error:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/r.de.smet/Projects/pulumi-libs/test/gcp/network/index.spec.ts)
The only difference I have is that I use ts-mocha
rather than mocha -r ts-node/register
little-market-63455
05/21/2021, 1:45 PM@pulumi
packages would be removed at runtime and you are referencing aws.iam.User
or am I missing something?hundreds-leather-25986
05/22/2021, 3:49 PMmax(last_5m):avg:gcp.pubsub.subscription.examplemetric{project_id} by {subscription_id}
Note: {subscription_id} //contains multiple values
Trying to convert into single pulumi datadog monitor help appreciated thankslittle-fish-42857
05/25/2021, 3:40 PMquiet-hairdresser-18834
05/27/2021, 11:48 PMquiet-hairdresser-18834
05/28/2021, 12:17 AMconst fs = require('fs')
const data = fs.readFileSync('./Files/certificates/dev.pfx', 'base64')
var cert = new azure.keyvault.Certificate("LetsEncrypt", {
name: "LetsEncrypt",
keyVaultId: keyVaultId,
certificate: {
contents: data,
password: "MyPassword"
},
certificatePolicy: {
issuerParameters: {
name: "Unknown"
},
keyProperties: {
exportable: false,
keyType: "RSA",
reuseKey: false,
keySize: 2048
},
secretProperties: {
contentType: "application/x-pkcs12",
},
}
})
quiet-hairdresser-18834
05/28/2021, 12:17 AMlimited-rainbow-51650
05/31/2021, 9:51 AMlimited-rainbow-51650
05/31/2021, 9:51 AMlittle-cartoon-10569
05/31/2021, 9:14 PM