colossal-quill-8119
07/18/2022, 10:15 AMpowerful-art-87860
07/19/2022, 7:59 AMpropagateTags
property from the aws.ecs.Service:
1. setting it's value for the first time triggers a Service create-replacement.
2. changing it afterwards also triggers a Service create-replacement.
The pulumi up detail shows the name
, id
and propagateTags
changing. The name
and id
change is due to the ending randomId from pulumi changing.
Tried TASK_DEFINITION, SERVICE, NONE and removing the property, it always requires a replacement.
I understand that changing the name triggers a replacement but why does propagateTags
change the ending randomId from name
?
Has anyone had this issue?brave-scientist-99340
07/20/2022, 8:55 PM@pulumi/google-native
I am getting the following change on a non-modified `artifactregistry/v1:Repository`:
~ name: "projects/***/locations/us/repositories/my-repo-822c5d8" => "projects/***/locations/us/repositories/my-repo-5637933"
(only the ID changes). When I apply it I get the following error:
google-native:artifactregistry/v1:Repository (***):
error: error sending request: googleapi: Error 400: Repository mode cannot be changed: "<https://artifactregistry.googleapis.com/v1/projects/***/locations/us/repositories/my-repo>" map[format:DOCKER name:projects/***/locations/us/repositories/my-repo-ee37a82]
Now this does not make sense to me because according to the GCP docs this name should just be projects/***/locations/us/repositories/my-repo
and not have any random ID suffix (also I am pretty sure its immutable).
Seems like a bug to me but I just wanted to check in if I missed something?polite-napkin-90098
07/20/2022, 9:13 PMexport const publicSubnetIds = cluster.core.publicSubnetIds;
and then import them into another stack with
const pubsub = stackMon.getOutput("publicSubnetIds");
I then need to use them to annotate an ingress in a helm chart something like
ingress: {
annotations: {
'<http://alb.ingress.kubernetes.io/subnets|alb.ingress.kubernetes.io/subnets>': `${pubsub[0]}, ${pubsub[1]}`
or
'<http://alb.ingress.kubernetes.io/subnets|alb.ingress.kubernetes.io/subnets>': `${pubsub.join(',')}`
but this results in
Property 'join' does not exist on type 'OutputInstance<any>'.
or a similar error saying I can't index an Output<any> with 0 or 1
What am I getting wrong here? Can I not export an array?
Do I need some apply magic on the gotten output before Typescript will accept it is and array and can be joined?square-ability-48831
07/21/2022, 7:53 PM// Create a repository.
const repo = new awsx.ecr.Repository("cicd", {
name: "cicd",
});
the docs show a name param is available to be set, but I get:
index.ts(5,3): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type 'RepositoryArgs'.
Object literal may only specify known properties, and 'name' does not exist in type 'RepositoryArgs'.
big-notebook-65054
07/22/2022, 6:57 PMpassword.result
but that doesn't seem to ever change from a pulumi.Output<string>
type.
const password = new random.RandomPassword(`random-password-${stack}`, { length: 16 });
To get into the specifics more, I am trying to place this password output into a config file on an EC2 instance by inserting it into the userData script. Every time I check the new EC2 server I get this error in the logs:
To get the value of an Output<T> as an Output<string> consider either:
1: o.apply(v => `prefix${v}suffix`)
2: pulumi.interpolate `prefix${v}suffix`
See <https://pulumi.io/help/outputs> for more details.
This function may throw in a future version of @pulumi/pulumi./"
In the docs it says Because outputs are asynchronous, their actual raw values are not immediately available.
which makes sense, but I cannot use apply()
or any of the other options to get a readable string value on the password.result
output.
What am I missing here? Is there some sort of async/await functionality I can use to wait for it to resolve? Thanks!strong-megabyte-18664
07/23/2022, 2:07 AMimport * as awsClassic from "@pulumi/aws";
const vpc = awsClassic.ec2.getVpcs({
tags: {
env: "staging"
}
});
// Export a few interesting fields to make them easy to use:
export const vpcId = vpc.??
I get any properties on the vpc
const. I think it’s because ec2.getVpcs()
is returning a Promise<GetVpcsResult>
. I have zero Typescript experience and I’m not sure how to handle the Promise return so I can retrieve Vpc properties from it. Maybe an await
or something? Help!able-hair-32695
07/28/2022, 2:18 AMaws.cloudwatch.onSchedule
handler argument which is an EventRuleEventHandler
has the below doc on it referencing a createCallbackFunction
but I can’t find any docs referencing that anywhere(Other than in the pulumi-cloud
repo). As it stands now it seems like the inline function definitions always default to iam.AWSLambda_FullAccess
. I’m hoping to be able to define my own role for the function
https://github.com/pulumi/pulumi-aws/blob/914003a7a1d16b8389529420a2a91200bc250d7e/sdk/nodejs/lambda/lambdaMixins.ts#L141-L148
Pulumi Doc I based my code on: https://www.pulumi.com/blog/scheduling-serverless/big-notebook-65054
07/28/2022, 5:26 PMcommand.remote.Command
issues/questions that I would love some insight on if possible:
1. The first command I try to run on the server is a combination sudo apt-get update && sudo apt-get install redis-server -y
. The weird part is that it works maybe 50-60% of the time but when it fails it gives me an error message which indicates that apt-get update
didnt run: E: Unable to locate package redis-server error: Process exited with status 100
2. Later on in the list of commands I try to set the redis password via the redis-cli interactive shell with this command: sudo redis-cli <<<"CONFIG SET requirepass ${result.secretString}"
. stdout returns and OK
which typically indicates success when done manually, however when I try to log into the server remotely there is no password set. Very strange behavior.brief-helicopter-28120
08/04/2022, 9:31 AMk8s.yaml.ConfigFile
to deploy CRDs into my EKS cluster (typescript) and I run into issues. Btw I'm new to typescript and as well to pulumi. So please kindly bare with me 🙏
Code:
import * as k8s from "@pulumi/kubernetes";
import * as eks from "@pulumi/eks";
export default {
install_crds(cluster: eks.Cluster){
new k8s.yaml.ConfigFile("argocd_namespace", {
file: "kubernetes_cluster_components/namespaces/argocd-namespace.yaml",
}, {providers: { "kubernetes": cluster.provider }});
}
};
Error:
pulumi:pulumi:Stack k8s-moralis-aws-dev-argo-test running. error: an unhandled error occurred: Program exited with non-zero exit code: -1
I0804 09:23:53.878138 22054 deployment_executor.go:162] deploymentExecutor.Execute(...): exiting provider canceller
Type Name Plan Info
pulumi:pulumi:Stack k8s-moralis-aws-dev-argo-test 1 error; 39 messages
Diagnostics:
pulumi:pulumi:Stack (k8s-moralis-aws-dev-argo-test):
Cloud Provider: aws Stack: aws-dev-argo-test
error: an unhandled error occurred: Program exited with non-zero exit code: -1
The error message is not very descriptive, hence difficult to troubleshoot. Can someone please help me here 🙏white-chef-55657
08/04/2022, 12:10 PMgorgeous-country-43026
08/15/2022, 11:48 AMindex.ts
to be in the root of the project. Basically this limits me from creating several index.ts
files into different folders and still retain the flexibility to jump between those via pulumi stack select whatever
. If I model this via different projects then I need to do a separate login every time I switch project (not using Pulumi Service for now). I wonder if there is a way to tell Pulumi to use a different index.ts
per stack?freezing-accountant-92268
08/16/2022, 1:17 PMlate-lizard-19909
08/16/2022, 2:10 PMlate-lizard-19909
08/16/2022, 2:10 PMconst domainSecretGet = azure_native.keyvault.getSecret({
secretName: "secret1",
vaultName: "AZVault1",
resourceGroupName: "AZVault"
});
export const domainSecretGetValue = domainSecretGet.then(domainSecretGet => domainSecretGet.properties.value);
console.log(domainSecretGetValue)
late-lizard-19909
08/16/2022, 2:10 PMlate-lizard-19909
08/16/2022, 4:24 PMsquare-ability-48831
08/17/2022, 3:34 AMStackReference
type conversion help, or maybe it's the standard Output/Input handling stuff that I need?
I'm accessing the details of a VPC from a StackReference, and I need the subnetId
as an Input
to an ec2
- whats the best way to be able to treat the subnet output from the StackReference into an array? Or even better - can I grab the full vpc Output object and then interrogate it to get the subnetId I need?
const devopsVpc = vpcStack.getOutput("devopsVpc"); // Full VPC output - can I get this and use it like it was created in this stack?
const devopsVpcPublicSubnetIds = vpcStack.getOutput("devopsVpcPublicSubnetIds"); // Output<any> - can I coerce this to an array?
// output in this stack is Array:
// Outputs:
// + subnetIds: [
// + [0]: "subnet-06a**********3fe0"
// + [1]: "subnet-036**********c6b7"
// ]
// but how to access as an array as input to EC2 creation?
// just need a single subnetId
const host = new ec2.Instance("bastionHost", {
ami: ubuntuAmi,
tags: { "Name": "hostthemost" },
instanceType: "t2.medium",
subnetId: devopsVpcPublicSubnetIds[0], // <-- throws since not an array type
// ...other props...
})
export const subnetIds = devopsVpcPublicSubnetIds; // show sup as an array Output (see above)
rapid-spoon-72613
08/17/2022, 5:08 PMsquare-ability-48831
08/17/2022, 10:33 PMtsconfig.pulumi.json
file instead of the default tsconfig.json
- something other than setting PULUMI_NODEJS_TSCONFIG_PATH
? Isn't there a config I can add to Pulumi.yaml to point to it? Can't find in the docs what that should be...late-lizard-19909
08/19/2022, 2:44 PMicy-controller-6092
08/22/2022, 5:42 PMimport type { Provider } from '@pulumi/aws'
seems like it doesn’t work. Easy workaround though (just use aws.Provider
instead through a regular import). but I’m curious to know why it doesn’t work?alert-plumber-27645
08/23/2022, 3:21 PMalert-plumber-27645
08/23/2022, 3:23 PMthousands-psychiatrist-31710
08/23/2022, 7:37 PMlittle-cartoon-10569
08/23/2022, 10:34 PMicy-controller-6092
08/24/2022, 10:24 PMgorgeous-painting-25877
08/25/2022, 2:22 PMsquare-hair-965
08/25/2022, 8:37 PMOutput<string>
to play nice with the aws.ec2.LaunchTemplate
userData
attribute. I've tried quite a few different approaches but I always seem to wind up with this in my aws console:
Calling [toString] on an [Output<T>] is not supported.
To get the value of an Output<T> as an Output<string> consider either:
1: o.apply(v => `prefix${v}suffix`)
2: pulumi.interpolate `prefix${v}suffix`
See <https://pulumi.io/help/outputs> for more details.
This function may throw in a future version of @pulumi/pulumi.
The userData script is a fairly large bash script that is created by interpolating numerous outputs from other resources. When I export it it's correct in the Pulumi console.
Full component code to follow in the thread ->fresh-keyboard-13188
08/26/2022, 12:40 PM