shy-garden-33724
05/30/2023, 4:12 AMnumerous-judge-71563
05/30/2023, 6:02 AMCreateOrSelectStackAsync
function. Our application is hosted on Kubernetes (K8s), and we keep encountering the following error message:
"errorMessage": "An error occurred trying to start process 'pulumi' with working directory '/tmp/pulumi'. No such file or directory".
However, we have verified that the folder path exists in the pod, and the "tmp" folder has the necessary permissions. We have set up the working directory as follows:
var stackArgs = new InlineProgramArgs(PulumiConfigurationConstants.ProjectName, environment, program)
{
StackSettings = new Dictionary<string, StackSettings>
{
[environment] = new() { SecretsProvider = PulumiConfigurationConstants.SecretsProvider }
},
SecretsProvider = PulumiConfigurationConstants.SecretsProvider,
ProjectSettings = new ProjectSettings(PulumiConfigurationConstants.ProjectName, ProjectRuntimeName.Dotnet)
{
Backend = new ProjectBackend { Url = PulumiConfigurationConstants.PulumiProjectBackendUrl }
},
WorkDir = Path.Combine("..", "tmp", "pulumi")
};
var stack = await LocalWorkspace.CreateOrSelectStackAsync(stackArgs);
I have also confirmed that the file is generated in the /tmp/pulumi
directory.
We would greatly appreciate any assistance you can provide in resolving this issue.
Thank you for your attention to this matter.big-psychiatrist-43588
05/30/2023, 12:28 PMArgument of type 'Output<string>' is not assignable to parameter of type 'string'
able-flag-79751
05/30/2023, 12:38 PMpulumi destroy -s <my-stack>
), I can’t get them destroyed as it can’t successfully delete those resources that I’ve manually deleted on the aws console. I also tried to delete the stack entirely (pulumi stack rm <my-stack>
), and it’s the same error I’m getting. Please see image below for more info:thankful-pencil-91096
05/30/2023, 1:36 PMbroad-lifeguard-10744
05/30/2023, 3:01 PMrapid-belgium-4304
05/30/2023, 6:16 PMicy-controller-6092
05/31/2023, 4:45 AMpolite-sandwich-68547
05/31/2023, 9:29 AMpulumi stack rename org/projectOLD/sand
to: pulumi stack rename org/projectNEW/sand
but then the /prod stack disappeared though I still see it in Pulumi webUI
I tried importing it back w/ pulumi -v 3 stack import -s org/projectOLD/prod
though the CLI just hangs and displays no logs. anyone has any suggestions?able-policeman-41860
05/31/2023, 11:08 AMgifted-cat-49297
05/31/2023, 1:21 PMglamorous-van-95411
05/31/2023, 2:55 PMmicroscopic-afternoon-22702
05/31/2023, 4:52 PMblue-pharmacist-31672
06/01/2023, 9:49 AMFlags
listed seem to do it.chilly-tailor-89151
06/01/2023, 12:44 PMimport * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Delete the default VPC
const defaultVpc = new aws.ec2.DefaultVpc("defaultVpc", {
forceDestroy: true,
});
and run pulumi up
, the result is nothing happen.
try to run pulumi destroy
throw and error dependencies
what I do wrong please?purple-dress-65045
06/01/2023, 2:25 PMclean-winter-65267
06/01/2023, 6:33 PMpulumi up
I still get the same warnings.
The state file still has the values in the same place, so I'm wondering if this is just stale data in the state?
tried doing pulumi up --refresh
hoping this will pull in fresh data without those values, but they seem to just stay there..
Is there a way to clear these warnings for resources that have been migrated?freezing-kitchen-80795
06/01/2023, 7:02 PMPulumi.yaml
which creates 100 aws providers, and 100 aws buckets based off those providers - as I have this usecase, and I would like to see how Pulumi handles it - pulumi up
seems like it will take hours to run - it starts off by slowly (once every 10 seconds) creating each of the 100 providers in sequence - is this what you would expect? Am I missing some parallelism or "go faster" flag?great-receptionist-19570
06/01/2023, 9:56 PMSQL compilation error: An active warehouse is required for creating Python UDFs
but I don’t see where a warehouse can be specified in the Snowflake Function code:
class Function(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
arguments: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['FunctionArgumentArgs']]]]] = None,
comment: Optional[pulumi.Input[str]] = None,
database: Optional[pulumi.Input[str]] = None,
handler: Optional[pulumi.Input[str]] = None,
imports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
language: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
null_input_behavior: Optional[pulumi.Input[str]] = None,
packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
return_behavior: Optional[pulumi.Input[str]] = None,
return_type: Optional[pulumi.Input[str]] = None,
runtime_version: Optional[pulumi.Input[str]] = None,
schema: Optional[pulumi.Input[str]] = None,
statement: Optional[pulumi.Input[str]] = None,
target_path: Optional[pulumi.Input[str]] = None,
__props__=None):
how can I set a warehouse for this case?icy-controller-6092
06/02/2023, 3:06 AM@pulumi/cloudflare
package and a couple of things I noticed:
• for a WorkerScript, the full content
of the script is stored in the state. Shouldn't this be a digest?
• It keeps detecting a diff on secretTextBindings
on each up
Is this a pulumi issue, or something to be raised upstream? Thanks 🙏enough-mechanic-81927
06/02/2023, 4:25 AMfew-elephant-12795
06/02/2023, 7:02 AMimportant-sugar-9877
06/02/2023, 7:58 AMwarning: Found legacy stack files in state store:
- dev
Please run 'pulumi state upgrade' to migrate them to the new format.
Set PULUMI_SELF_MANAGED_STATE_NO_LEGACY_WARNING=1 to disable this warning.
if both users working on a repo containing the .pulumi folder use the same version of pulumi (3.63.0).
user A created and pushed to the repo and can deploy and view resources just fine.
user B cloned the repo and gets the above error whenever trying to interact with any stack.
i have no idea where a legacy stack file could could be coming from.blue-monkey-49376
06/02/2023, 10:35 AMworried-queen-62794
06/02/2023, 10:41 AMwooden-queen-36575
06/02/2023, 3:14 PMpulumi stack select dev --create
is creating a legacy stack, though my pulumi version is v3.69.0
and I am deleting my ~/.pulumi
folder between runs. Is there a way to force always using the multi-project backend and never use the legacy style?better-dentist-3207
06/03/2023, 7:32 PMindex.ts
entry point. With CDK I was able to copy paste a class and change it's inputs to create an entirely different environment. With Pulumi I need to use multiple projects + envs and use stack references? (which seems weakly typed in terms of outputs)broad-lifeguard-10744
06/04/2023, 1:07 PMpulumi stack
command to view the information of a stack created through Pulumi Automation API? I'm able to remove/delete the stack, but when I want to select or view history of the stack, the command is failing expecting for a Pulumi.yaml
file.wooden-queen-36575
06/04/2023, 3:47 PMCustomResource
? https://github.com/pulumi/pulumi-kubernetes/issues/1833full-plastic-13568
06/05/2023, 2:04 AMcat __main__.py
"""An AWS Python Pulumi program"""
import json
import iam
import pulumi
import pulumi_aws as aws
#region = 'us-west-2'
region = aws.config.region
custom_stage_name = 'example'
##################
## Lambda Function
##################
# Create a Lambda function, using code from the `./app` folder.
lambda_func = aws.lambda_.Function("mylambda",
role=iam.lambda_role.arn,
runtime="python3.7",
handler="hello.handler",
code=pulumi.AssetArchive({
'.': pulumi.FileArchive('./hello_lambda')
})
)
####################################################################
##
## API Gateway REST API (API Gateway V1 / original)
## /{proxy+} - passes all requests through to the lambda function
##
####################################################################
# Create a single Swagger spec route handler for a Lambda function.
def swagger_route_handler(arn):
return ({
"x-amazon-apigateway-any-method": {
"x-amazon-apigateway-integration": {
"uri": pulumi.Output.format('arn:aws:apigateway:{0}:lambda:path/2015-03-31/functions/{1}/invocations', region, arn),
"passthroughBehavior": "when_no_match",
"httpMethod": "POST",
"type": "aws_proxy",
},
},
})
# Create the API Gateway Rest API, using a swagger spec.
rest_api = aws.apigateway.RestApi("api",
body=pulumi.Output.json_dumps({
"swagger": "2.0",
"info": {"title": "api", "version": "1.0"},
"paths": {
"/{proxy+}": swagger_route_handler(lambda_func.arn),
},
}))
# Create a deployment of the Rest API.
deployment = aws.apigateway.Deployment("api-deployment",
rest_api=rest_api.id,
# Note: Set to empty to avoid creating an implicit stage, we'll create it
# explicitly below instead.
stage_name="",
)
# Create a stage, which is an addressable instance of the Rest API. Set it to point at the latest deployment.
stage = aws.apigateway.Stage("api-stage",
rest_api=rest_api.id,
deployment=deployment.id,
stage_name=custom_stage_name,
)
# Give permissions from API Gateway to invoke the Lambda
rest_invoke_permission = aws.lambda_.Permission("api-rest-lambda-permission",
action="lambda:invokeFunction",
function=lambda_func.name,
principal="<http://apigateway.amazonaws.com|apigateway.amazonaws.com>",
source_arn=deployment.execution_arn.apply(lambda arn: arn + "*/*"),
)
#########################################################################
# Create an HTTP API and attach the lambda function to it
## /{proxy+} - passes all requests through to the lambda function
##
#########################################################################
http_endpoint = aws.apigatewayv2.Api("http-api-pulumi-example",
protocol_type="HTTP"
)
http_lambda_backend = aws.apigatewayv2.Integration("example",
api_id=http_endpoint.id,
integration_type="AWS_PROXY",
connection_type="INTERNET",
description="Lambda example",
integration_method="POST",
integration_uri=lambda_func.arn,
passthrough_behavior="WHEN_NO_MATCH"
)
url = http_lambda_backend.integration_uri
http_route = aws.apigatewayv2.Route("example-route",
api_id=http_endpoint.id,
route_key="ANY /{proxy+}",
target=http_lambda_backend.id.apply(lambda targetUrl: "integrations/" + targetUrl)
)
http_stage = aws.apigatewayv2.Stage("example-stage",
api_id=http_endpoint.id,
route_settings= [
{
"route_key": http_route.route_key,
"throttling_burst_limit": 1,
"throttling_rate_limit": 0.5,
}
],
auto_deploy=True
)
# Give permissions from API Gateway to invoke the Lambda
http_invoke_permission = aws.lambda_.Permission("api-http-lambda-permission",
action="lambda:invokeFunction",
function=lambda_func.name,
principal="<http://apigateway.amazonaws.com|apigateway.amazonaws.com>",
source_arn=http_endpoint.execution_arn.apply(lambda arn: arn + "*/*"),
)
# Export the https endpoint of the running Rest API
pulumi.export("apigateway-rest-endpoint", deployment.invoke_url.apply(lambda url: url + custom_stage_name + '/{proxy+}'))
# See "Outputs" for (Inputs and Outputs)[<https://www.pulumi.com/docs/intro/concepts/inputs-outputs/>] the usage of the pulumi.Output.all function to do string concatenation
pulumi.export("apigatewayv2-http-endpoint", pulumi.Output.all(http_endpoint.api_endpoint, http_stage.name).apply(lambda values: values[0] + '/' + values[1] + '/'))
cat iam.py
# Copyright 2016-2018, Pulumi Corporation. All rights reserved.
from pulumi_aws import iam
lambda_role = iam.Role('lambdaRole',
assume_role_policy="""{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "<http://lambda.amazonaws.com|lambda.amazonaws.com>"
},
"Effect": "Allow",
"Sid": ""
}
]
}"""
)
lambda_role_policy = iam.RolePolicy('lambdaRolePolicy',
role=lambda_role.id,
policy="""{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
}]
}"""
)
Any one has idea?