handsome-actor-1155
06/04/2019, 6:27 PMconst kafkaBucket = new aws.s3.Bucket("stream-demo-kafka-bucket");
export const bucketName = kafkaBucket.bucket;
....
#newProject
const infraStack = new pulumi.StackReference("fqdn-stackname");
const bucketName = infraStack.getOutput("bucketName");
In this case, bucketName is of type Output<any>
and I want to turn it into a string to use in a K8s ReplicaSet deployment.
I’ve tried:
const bucketName = infraStack.getOutput("bucketName").apply(bucket => bucket);
but that is still type Output<any>
The closest I’ve gotten is setting the parameter type of my ReplicaSet function to type Output<any>
then when using it in my config, I do
... }, {
name: "S3_BUCKET_NAME",
value: pulumi.interpolate `${bucketName}`
}...
Pulumi actually renders this as an update (I previously hardcoded the string) shown as:
~ value: "steam-demo-kafka-bucket-339079d" => "stream-demo-kafka-bucket-339079d"
I’m assuming that is really the same value?
Is there a better way of getting the output?