|
| 1 | + # AWS TypeScript Pulumi Template |
| 2 | + |
| 3 | + A minimal Pulumi template for provisioning AWS infrastructure using TypeScript. This template creates an Amazon S3 bucket and exports its name. |
| 4 | + |
| 5 | + ## Prerequisites |
| 6 | + |
| 7 | + - Pulumi CLI (>= v3): https://www.pulumi.com/docs/get-started/install/ |
| 8 | + - Node.js (>= 14): https://nodejs.org/ |
| 9 | + - AWS credentials configured (e.g., via `aws configure` or environment variables) |
| 10 | + |
| 11 | + ## Getting Started |
| 12 | + |
| 13 | + 1. Initialize a new Pulumi project: |
| 14 | + |
| 15 | + ```bash |
| 16 | + pulumi new aws-typescript |
| 17 | + ``` |
| 18 | + |
| 19 | + Follow the prompts to set your: |
| 20 | + - Project name |
| 21 | + - Project description |
| 22 | + - AWS region (defaults to `us-east-1`) |
| 23 | + |
| 24 | + 2. Preview and deploy your infrastructure: |
| 25 | + |
| 26 | + ```bash |
| 27 | + pulumi preview |
| 28 | + pulumi up |
| 29 | + ``` |
| 30 | + |
| 31 | + 3. When you're finished, tear down your stack: |
| 32 | +
|
| 33 | + ```bash |
| 34 | + pulumi destroy |
| 35 | + pulumi stack rm |
| 36 | + ``` |
| 37 | +
|
| 38 | + ## Project Layout |
| 39 | +
|
| 40 | + - `Pulumi.yaml` — Pulumi project and template metadata |
| 41 | + - `index.ts` — Main Pulumi program (creates an S3 bucket) |
| 42 | + - `package.json` — Node.js dependencies |
| 43 | + - `tsconfig.json` — TypeScript compiler options |
| 44 | +
|
| 45 | + ## Configuration |
| 46 | +
|
| 47 | + | Key | Description | Default | |
| 48 | + | ------------- | --------------------------------------- | ----------- | |
| 49 | + | `aws:region` | The AWS region to deploy resources into | `us-east-1` | |
| 50 | +
|
| 51 | + Use `pulumi config set <key> <value>` to customize configuration. |
| 52 | +
|
| 53 | + ## Next Steps |
| 54 | +
|
| 55 | + - Extend `index.ts` to provision additional resources (e.g., VPCs, Lambda functions, DynamoDB tables). |
| 56 | + - Explore [Pulumi AWSX](https://www.pulumi.com/docs/reference/pkg/awsx/) for higher-level AWS components. |
| 57 | + - Consult the [Pulumi documentation](https://www.pulumi.com/docs/) for more examples and best practices. |
| 58 | +
|
| 59 | + ## Getting Help |
| 60 | +
|
| 61 | + If you encounter any issues or have suggestions, please open an issue in this repository. |
0 commit comments