This message was deleted.
# general
s
This message was deleted.
s
Hi @gifted-island-55702! You can have multiple typescript files and then import the resources between them. Most of the examples in the examples repo don’t seem to show this but you could do something like:
Copy code
$ cat cluster.ts
import * as aws from "@pulumi/aws"

export const myCluster = new aws.ecs.Cluster("name", { /* opts */ });
Copy code
$ cat index.ts
import * as cluster from "./cluster";

/*
or for binding to particular names:

import { myCluster } from "./cluster";
*/
There’s a good example of how to do this in the
gcp-ts-gke
example, here: https://github.com/pulumi/examples/tree/master/gcp-ts-gke
g
Thank you @stocky-spoon-28903 - now it’s clear to me 🙂