late-energy-66663
06/03/2021, 10:52 PMCreated/Selected stack "dev"
Successfully installed AWS plugin
Successfully set config
Starting refresh
Failed to refresh stack: failed to refresh stack: code: 1
, stdout:
, stderr: Error: unknown command "history" for "pulumi"
Run 'pulumi --help' for usage.
An error occurred: unknown command "history" for "pulumi"
: failed to get stack history: exit status 1
exit status 1
Any idea what is this error related tomysterious-lighter-33699
06/04/2021, 1:06 PMmigration-z6pw7
, how do I reference that entire name as an argument to another resource? using job.metadata.name
only results in `migration`; using job.id
results in my-system/migration
, and I just can't find where to get the concrete hex ID back.gorgeous-match-99659
06/04/2021, 3:23 PMechoing-zebra-28421
06/04/2021, 3:50 PMconst api = new awsx.apigateway.API(`airship-api-${NODE_ENV}`, {
routes: [
{
path: "/",
method: "GET",
eventHandler: async (event: APIGatewayProxyEvent) => ({
statusCode: HttpStatus.OK,
body: "Hello, API Gateway V4!",
}),
},
{
path: "/api/named_users/associate",
method: "POST",
eventHandler: async (event: APIGatewayProxyEvent): Promise<any> => ({
statusCode: HttpStatus.OK,
body: JSON.stringify(await handleSetNamedUser(event)),
isBase64Encoded: false,
}),
},
{
path: "/api/channels/tags",
method: "POST",
eventHandler: async (event: APIGatewayProxyEvent) => ({
statusCode: HttpStatus.OK,
body: JSON.stringify(await handleSetTags(event)),
isBase64Encoded: false,
}),
},
],
});
I want to make something ifmysterious-belgium-44686
06/05/2021, 9:23 PM$default
as a stage name, which will let you route via /
- I'd like to do that.
You can create a $default stage that is served from the base of your API's URL—for example, https://{api_id}.execute-api.{region}.<http://amazonaws.com/|amazonaws.com/>. You use this URL to invoke an API stage.
I set that in my pulumi code:
stage = aws.apigateway.Stage(
f"{self.rest_api._name}-prod-stage",
deployment=deployment.id,
rest_api=self.rest_api.id,
stage_name="$default",
opts=pulumi.ResourceOptions(parent=self),
)
but I get this error:
aws:apigateway:Stage (api-gateway-prod-stage):
error: 1 error occurred:
* Error creating API Gateway Stage: BadRequestException: Stage name only allows a-zA-Z0-9_
From the error + docs it looks like Pulumi doesn't seem to support this?
Each API Gateway deployment is associated with a so-called stage. A stage is simply a version of your API, such as stage, prod, v1, or v2. For simple APIs, you will likely just have one. You can always define a custom stage name, but if you leave it off, a default of stage will be chosen.
colossal-battery-24701
06/06/2021, 9:14 AMimport * as awsx from "@pulumi/awsx";
const api = new awsx.apigateway.API("example", {
routes: [{
path: "/",
method: "GET",
eventHandler: async (event) => {
const DB_NAME = process.env.DB_NAME;
return {
statusCode: 200,
body: "Hello! The database name is: ${DB_NAME}",
};
},
}],
})
export const url = api.url;
What are the ways that I can add DB_NAME
(or any) env variable?mysterious-belgium-44686
06/06/2021, 3:59 PMmelodic-car-16900
06/06/2021, 7:41 PMancient-oil-47691
06/07/2021, 5:47 AMbrave-winter-60074
06/07/2021, 9:24 AMbumpy-agent-19616
06/07/2021, 11:32 AMgorgeous-eye-54797
06/07/2021, 12:21 PMechoing-zebra-28421
06/07/2021, 7:07 PMechoing-zebra-28421
06/07/2021, 7:09 PMbored-table-20691
06/07/2021, 11:44 PMhappy-angle-19851
06/08/2021, 5:29 AMbored-planet-52144
06/08/2021, 12:45 PMwitty-airport-81009
06/08/2021, 1:28 PMechoing-zebra-28421
06/08/2021, 2:11 PMimport * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
// Look up an existing Lambda Function by ID, so that we can get its ARN. (If we knew the ARN ahead
// of time, this would not be necessary, we can just use it in the URI below.)
const handler = aws.lambda.Function.get("get-handler", "your_lambda_id");
// Define a GET endpoint that invokes our Lambda Function-based handler.
const api = new awsx.apigateway.API("example", {
swaggerString: handler.arn.apply(arn => JSON.stringify({
"swagger": "2.0",
"info": {
"title": "example",
"version": "1.0",
},
"paths": {
"/": {
"get": {
"x-amazon-apigateway-integration": {
"httpMethod": "POST",
"passthroughBehavior": "when_no_match",
"type": "aws_proxy",
"uri": `arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/${arn}/invocations`,
},
},
},
},
"x-amazon-apigateway-api-key-source": "HEADER",
"x-amazon-apigateway-binary-media-types": [ "*/*" ],
"x-amazon-apigateway-gateway-responses": {
"ACCESS_DENIED": {
"responseTemplates": {
"application/json": "{\"message\": \"404 Not found\" }",
},
"statusCode": 404,
},
"MISSING_AUTHENTICATION_TOKEN": {
"responseTemplates": {
"application/json": "{\"message\": \"404 Not found\" }",
},
"statusCode": 404,
},
},
})),
});
// Export the auto-generated AWS API Gateway base URL.
export const url = api.url;
boundless-analyst-51913
06/08/2021, 4:53 PMfailed to register new resource my-api-resource-name [awsapigateway/stageStage]: Resource monitor is terminating
at Object.registerResource (/node_modules/@pulumi/pulumi/runtime/resource.js21927)
at new Resource (/node_modules/@pulumi/pulumi/resource.js21524)
at new CustomResource (/node_modules/@pulumi/pulumi/resource.js3079)
at new Stage (/node_modules/@pulumi/apigateway/stage.ts2009)
at new API (/node_modules/@pulumi/apigateway/api.ts57122)
at new HttpDeployment (/node_modules/@pulumi/api.ts20020)
at API.publish (/node_modules/@pulumi/api.ts13127)
at Resource.output (own code, line points to this codeWhen I run it again, it successfully creates that missing resource. I tried to debug it but I can't find out what the issue could be. Any hints on where to look or how to debug would be very appreciated.)return { url: api.publish().url };
brash-kite-78002
06/08/2021, 5:09 PMmysterious-belgium-44686
06/09/2021, 12:45 AMkafkaContainer = docker.Container("kafka-container",
image=kafkaImage.name,
restart="on-failure",
networks_advanced=[{ 'name': network.name }],
start=True,
envs=[
"KAFKA_BROKER_ID=1",
"KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181",
"KAFKA_ADVERTISED_LISTENERS=<PLAINTEXT://kafka:29092>,PLAINTEXT_<HOST://localhost:9092>",
"KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT",
"KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT",
"KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1"
],
ports=[{
'internal': 9092,
}],
opts=pulumi.ResourceOptions(depends_on=[zkContainer])
)
topic = kafka.Topic("topic",
name="sample-topic",
replication_factor=1,
partitions=4,
opts=pulumi.ResourceOptions(depends_on=[kafkaContainer])
)
fresh-hospital-81544
06/09/2021, 1:38 AMcolossal-rainbow-39841
06/09/2021, 5:26 AMlemon-garage-82195
06/09/2021, 7:43 AMpulumi up
gives us the expect output, and the resources exist within Azure, however, we've noticed that running the pipeline again pulumi tries to delete a subnet even though there have been no changes made to the config of that subnet. Has anyone experienced a similar issue?quiet-laptop-25454
06/09/2021, 12:33 PMboundless-angle-56560
06/09/2021, 2:22 PMquiet-gold-81036
06/09/2021, 5:09 PMacceptable-army-69872
06/09/2021, 7:34 PMboundless-angle-56560
06/09/2021, 8:48 PM