helpful-ice-5738
02/08/2019, 9:39 PMconst api = new aws.apigateway.x.API("name", {
stageName: "demo",
routes: [
{
path: "/",
method: "POST",
eventHandler: lambda,
},
{
path: "/",
method: "PUT",
eventHandler: lambda,
}
]
});
and am attempting to attach an api key…
const api_key = new aws.apigateway.ApiKey("demo", {
name: "demo",
stageKeys: [{
restApi: api.id,
stageName: api.stageName
}]
})
output from pulumi up is:
aws:apigateway:ApiKey (demo):
warning: urn:pulumi:pulumi_demo::webserver::aws:apigateway/apiKey:ApiKey::demo verification warning: "stage_key": [DEPRECATED] Since the API Gateway usage plans feature was launched on August 11, 2016, usage plans are now required to associate an API key with an API stage
error: aws:apigateway/apiKey:ApiKey resource 'demo' has a problem: "stage_key.0.stage_name": required field is not set
error: aws:apigateway/apiKey:ApiKey resource 'demo' has a problem: "stage_key.0.rest_api_id": required field is not set
with api.ts, I am able to set stageName per const stageName = args.stageName || "stage"; `
but apikey.ts doesn’t seem to ingest the var?exports.stagename = api.stageName;
must be undefined (returns no export) and exports.stagename = api.deployment.stageName;
returns an empty string (edited)api.stage.stageName
😄api.restApi.id