lemon-agent-27707
03/30/2021, 4:38 PMpulumi.yaml
that exists on disk there is currently a bug. Basically, if you don't specify a projectSettings
then we will overwrite anything in the workdir with a default project (just for inline programs) https://github.com/pulumi/pulumi/issues/6632prehistoric-nail-50687
03/31/2021, 8:42 AMimportStack
, same as the CLI - does the automation API also generate the code for the imported resource, as the CLI does?plain-quill-22197
03/31/2021, 9:20 AMlimited-rainbow-51650
04/01/2021, 7:30 PMresource_types:
- name: pulumi
type: docker-image
source:
repository: <http://ghcr.io/ringods/pulumi-resource|ghcr.io/ringods/pulumi-resource>
tag: v0.0.6
resources:
- name: myinfracode
type: pulumi
source:
organization: companyname
project: network
stack: staging
token: pul-XXXXXXXXXXXXXXXXX
jobs:
- name: nextstack
plan:
- task: build-artifact
...
- put: myinfracode
params:
aws:region: eu-west-1
network:cidr: 'x.x.x.x'
In my Concourse resource, I want to allow anything in the params
section above which is valid Pulumi stack config (nested et all). In my resource implementation, I get this passed as JSON though:
{
"source": {
"organization": "company",
"project": "network",
"stack": "staging",
"token": "pul-XXXXXXXXXXXXXXXXX"
},
"params": {
"aws:region": "eu-west-1",
"network:cidr": "x.x.x.x"
}
}
The source
section is specific to Pulumi, but the params
is the JSON equivalent of what I configured as YAML in my pipeline. Is there any function in the Pulumi code base that can Unmarshal this to a Pulumi type representing this Config?fresh-summer-65887
04/05/2021, 8:54 PMfile://~
)
- A stack with a single resource, a simple dynamodb table.
- So everything is local and should not be making any external network calls.
Non-scientific performance numbers:
- WorkspaceStack.CreateOrSelectAsync
~ 1.4s
- WorkspaceStack.SetConfigAsync
~ 0.7s
- WorkspaceStack.UpAsync
~ 6.5s
Overall each test has ~9s overhead. Not bad to be honest but it'll add up as the test count increases.
If I use the AWSSDK directly to deploy a table it is significantly faster (<1s). However with this approach I'd have to maintain some sort of table definition abstraction that would be used both in the test fixtures and pulumi component to achieve alignment / re-use. This would add a complexity cost.
Thought I'd mention the above in the hope that there could be some performance improvements made to the Automation API.
In any case, it's really nice stuff :)better-shampoo-48884
04/07/2021, 6:47 AMbetter-shampoo-48884
04/09/2021, 10:47 AMlimited-rainbow-51650
04/09/2021, 11:17 AMPATH
used by pulumi to find the language runtime binaries (e.g. node
), given I mount a NodeJS docker image as volume /volume
?
stack.Workspace().SetEnvVar("PATH", os.Getenv("PATH")+":/volume/bin:/volume/usr/bin:/volume/usr/local/bin")
proud-pizza-80589
04/11/2021, 9:07 PM+ kubernetes:core/v1:Namespace aaa-7f creating error: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: Get "...": getting credentials: exec: fork/exec /usr/local/bin/aws: no such file or directory
Pulumi running in a docker container. First i thought it was because I was using alpine, but in a debian image it does the same thing. Manually running the aws cli works fine
root@alpha-launchpad-5d89b45bdc-nz5pp:/usr/src/app# aws --version
aws-cli/2.1.36 Python/3.8.8 Linux/5.4.89+ exe/x86_64.debian.9 prompt/off
root@alpha-launchpad-5d89b45bdc-nz5pp:/usr/src/app# /usr/local/bin/aws --version
aws-cli/2.1.36 Python/3.8.8 Linux/5.4.89+ exe/x86_64.debian.9 prompt/off
I’ve seen similar things happen before when shelling out from node for other apps if I did not force the shelled out command to use bash as a shell.clever-cartoon-41433
04/19/2021, 6:46 PMlimited-rainbow-51650
04/21/2021, 5:05 PMstack.Workspace().SetEnvVar("PULUMI_ACCESS_TOKEN", req.Source.Token)
But I still get this error:
error: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions
busy-soccer-65968
04/21/2021, 10:45 PMaverage-businessperson-33238
04/23/2021, 12:52 PMdazzling-scientist-80826
04/26/2021, 12:05 AMLocalWorkspace
works, but it's not quite clear how one would go about implementing a custom workspace. In particular, it looks like there is some machinery around a "language runtime service" and other things that is necessary to make refresh/up implementations. Is there a guide or example for how to do this?little-orange-65618
04/26/2021, 9:09 PM**creating failed** error: Duplicate resource URN
Thoughts? (using azure-native 1.0.1 for reference)
The equivalent AZ CLI command for E would be:
az storage account update
--name <storage-account> \
--resource-group <resource_group> \
--encryption-key-name <key> \
--encryption-key-source Microsoft.Keyvault \
--encryption-key-vault $key_vault_uri
handsome-state-59775
05/02/2021, 8:27 AMpulumi.Run()
?
2. Can I overlay configuration and secrets on top of a default stack's imported configuration? This would let me check in common secrets/config for a project, and have the CI/CD set env vars to provide optional overrides.wooden-animal-34285
05/03/2021, 5:46 PMcreateOrSelectStack()
blocks indefinitly. It does not timeout or writes any errors to the console.
export async function createInstance(): Promise<UpResult> {
const program = programs.getProgram()
// Create our stack
const args: InlineProgramArgs = {
stackName: "dev",
projectName: "inlineNode",
program,
};
// create (or select if one already exists) a stack that uses our local program
<http://console.info|console.info>("initializing stack...");
const stack = await pulumiAutoAPI.LocalWorkspace.createOrSelectStack(args, {
});
<http://console.info|console.info>("successfully initialized stack");
<http://console.info|console.info>("setting up config");
await stack.setConfig("aws:region", { value: "us-east-2" });
<http://console.info|console.info>("config set");
// is this step necessary because of the config step?
// possible to setup config as part of create stack?
<http://console.info|console.info>("refreshing stack...");
await stack.refresh({ onOutput: <http://console.info|console.info> });
<http://console.info|console.info>("refresh complete");
<http://console.info|console.info>("updating stack...");
const upRes = await stack.up({ onOutput: <http://console.info|console.info> });
<http://console.info|console.info>(`update summary object: ${JSON.stringify(upRes.summary)}`);
console.log(`update summary: \n${JSON.stringify(upRes.summary.resourceChanges, null, 4)}`);
console.log(`outputs: ${JSON.stringify(upRes.outputs)}`);
return upRes
}
I couldn't find any reference for such behaviour. Has anybody an idea what the cause could be? Thanks!
System:
NodeJS: "14.16.1"
Pulumi: "3.1.0"
tall-scientist-89115
05/03/2021, 11:50 PMpulumi logs -f -s
simultaneously maybe?)
FEATURE=staging PROJECT_NAME=qa npm run create-db-seed destroy
> qa@ create-db-seed /Users/daniel/code/RedJade/infra/scripts
> tsc && node ./bin/scripts/create-db-seed.js "destroy"
project name qa
feature name staging
(node:74675) ExperimentalWarning: Conditional exports is an experimental feature. This feature could change at any time
CommandError: code: 255
stdout:
stderr: error: invalid character 'y' after top-level value
err?:
at Object.createCommandError (/Users/daniel/code/RedJade/infra/scripts/node_modules/@pulumi/pulumi/automation/errors.js:71:17)
at ChildProcess.<anonymous> (/Users/daniel/code/RedJade/infra/scripts/node_modules/@pulumi/pulumi/automation/cmd.js:63:40)
at ChildProcess.emit (events.js:321:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) {
commandResult: CommandResult {
stdout: '',
stderr: "error: invalid character 'y' after top-level value\n",
code: 255,
err: undefined
},
name: 'CommandError'
}
Same thing happened to me yesterday but I was able to get around it by moving my automation code out of a folder shared with another stack, so was able to hand wave it away -- but then it popped up again today. It was working, working, then not working. Has anyone seen this before?little-orange-65618
05/05/2021, 12:42 AMauto.LocalWorkspace()
little-orange-65618
05/05/2021, 8:53 AMhandsome-state-59775
05/06/2021, 6:25 AMstack_1 = auto.select_stack(...)
stack_2 = auto.create_or_select_stack(...) # currently selected stack
stack_1.refresh_config() # ok to do this now?
stack_1_config = stack1.get_all_config() # ok to do this now?
colossal-plastic-46140
05/07/2021, 12:23 AMlimited-rain-96205
05/07/2021, 1:16 AMstderr: error: passphrase must be set with PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE environment variables
This error doesn't make sense because those environment variables are not required for Stacks that use the gcpkms secrets provider.colossal-plastic-46140
05/07/2021, 1:08 PMechoing-angle-67526
05/08/2021, 1:55 PMlemon-agent-27707
05/09/2021, 4:47 PMminiature-leather-70472
05/11/2021, 2:02 PMlimited-rain-96205
05/12/2021, 3:21 AMbored-oyster-3147
05/12/2021, 7:11 PMerror: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions
message. Trying to use a self-managed backend so I don't think I should be hitting this, or may be missing something. I currently have the backend set both in the project settings and in PULUM_BACKEND_URL
limited-rain-96205
05/12/2021, 7:55 PMLocalWorkspace.selectStack()
would delete the encryptedkey:
section of the stack's yaml file?