stale-holiday-22431
10/18/2018, 6:25 PMcreamy-potato-29402
10/18/2018, 6:26 PMcreamy-potato-29402
10/18/2018, 6:26 PMstale-holiday-22431
10/18/2018, 6:26 PMcreamy-potato-29402
10/18/2018, 6:26 PMcreamy-potato-29402
10/18/2018, 6:26 PMcreamy-potato-29402
10/18/2018, 6:26 PMstale-holiday-22431
10/18/2018, 6:27 PMstale-holiday-22431
10/18/2018, 6:27 PMcreamy-potato-29402
10/18/2018, 6:27 PMcreamy-potato-29402
10/18/2018, 6:28 PMstale-holiday-22431
10/18/2018, 6:31 PMk8sprovider
argument in the code block for?chilly-pharmacist-32380
10/18/2018, 7:06 PMorange-tailor-85423
10/18/2018, 7:07 PMorange-tailor-85423
10/18/2018, 7:07 PMorange-tailor-85423
10/18/2018, 7:07 PMfull-dress-10026
10/18/2018, 8:22 PM/{proxy+}
with an ANY
method. It will simply send all requests to a lambda function using the LAMBDA_PROXY
request integration. What is the idiomatic way to go about this? i.e. Should I create all of the individual AWS resources using the aws package or is there some higher level package, perhaps in cloud-aws or cloud, that would allow me to do that with less code? The lambda function is an existing lambda function created and managed by a different, non-pulumi, process.full-dress-10026
10/18/2018, 8:31 PMbusy-umbrella-36067
10/18/2018, 8:33 PM$ cat stack.json | noglob jq -r .deployment.resources[3]
{
"urn": "urn:pulumi:containers-dev::containers::pulumi:providers:kubernetes::default",
"custom": true,
"id": "4bee1431-e9c0-42d0-99f1-e813af0fa1a4",
"type": "pulumi:providers:kubernetes",
"inputs": {
"version": "0.17.2"
},
"dependencies": null,
"initErrors": null
}
$ cat stack.json | noglob jq -r .deployment.manifest.plugins[0]
{
"name": "kubernetes",
"path": "/Users/azamat/.pulumi/plugins/resource-kubernetes-v0.17.2/pulumi-resource-kubernetes",
"type": "resource",
"version": "0.17.2"
}
$ pulumi plugin ls ✘ 255
NAME KIND VERSION SIZE INSTALLED LAST USED
aws resource 0.16.0 144 MB 2 minutes ago now
kubernetes resource 0.17.2 48 MB 2 minutes ago now
TOTAL plugin cache size: 192 MB
$ pulumi refresh
...
...
...
error: could not find plugin for provider 'urn:pulumi:containers-dev::containers::pulumi:providers:kubernetes::default'
full-dress-10026
10/18/2018, 9:38 PMService
? For example, I have
export let apiEndpoint = deployment.invokeUrl.apply(url => url + deployment.stageName);
let nginxService = new cloudAws.Service("nginx", {
containers: {
nginx: {
build: {
context: "./nginx",
args: {
"API_URL": apiEndpoint,
"FRONTEND_URL": frontendUrl
}
},
memory: 256,
ports: [{port: 443, external: true, protocol: "https"}]
}
},
replicas: 3
});
But it appears build args requires a string, not an Output
. In the above example, apiEndpoint
is an output.full-dress-10026
10/18/2018, 11:01 PMid
be for the aws.lambda.Function.get
function?full-dress-10026
10/18/2018, 11:01 PMPlan apply failed: refreshing urn:pulumi:services-prod::services::aws:lambda/function:Function::ion-lambda-function: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, GetFunctionInput.FunctionName.
full-dress-10026
10/18/2018, 11:03 PMquaint-queen-37896
10/18/2018, 11:07 PMfull-dress-10026
10/18/2018, 11:33 PMlet ionLambdaFunction = aws.lambda.Function.get("ion-lambda-function", null,
{arn: ionLambdaArn}
);
full-dress-10026
10/18/2018, 11:33 PMfull-dress-10026
10/18/2018, 11:40 PMlet ionLambdaFunction = aws.lambda.Function.get("ion-lambda-function", ionLambdaArn,
{name: ionLambdaName}
);
And this does not:
let ionLambdaFunction = aws.lambda.Function.get("ion-lambda-function", null,
{name: ionLambdaName}
);
Curious why you'd need to pass the lambda ARN and the name.full-dress-10026
10/18/2018, 11:40 PMerror: Error: Missing required property 'handler'
at Function (/home/kenny/compute_software/infrastructure/pulumi-src/services/node_modules/@pulumi/lambda/function.ts:171:23)
at Function.get (/home/kenny/compute_software/infrastructure/pulumi-src/services/node_modules/@pulumi/lambda/function.ts:24:16)
at Object.<anonymous> (/home/kenny/compute_software/infrastructure/pulumi-src/services/index.ts:49:45)
at Module._compile (module.js:541:32)
at Module.m._compile (/home/kenny/compute_software/infrastructure/pulumi-src/services/node_modules/ts-node/src/index.ts:439:23)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/kenny/compute_software/infrastructure/pulumi-src/services/node_modules/ts-node/src/index.ts:442:12)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
error: an unhandled error occurred: Program exited with non-zero exit code: 1
white-balloon-205
.get
methods, you always need to provide an id
, and sometimes need to provide additional property values. What is required here is ultimately based on what the semantics of the underlying Terraform AWS provider Read
method, which is unfortunately not documented robustly. Most of the AWS resources don't require anything beyond the id
, but some do. In particular, aws_lambda_function
in Terraform does use the name
and optionally the qualifier
to look up the function instead of using the id
.
That error message doesn't look great though - and I suspect we can report a better error message in this case.brave-angle-33257
10/19/2018, 12:27 AM