Skip to content

Commit 2fe1ce9

Browse files
raypapparaypappa
authored andcommitted
feat(pulumi): implement pulumi deploy iam user
Adopting pulumi as an alternative to terraform or cdk. With changes to cloudflare, it's better to use tf or pulumi to manage the tunnels. I'd rather not use tf on this, so I'm migrating to pulumi and deprecating aws cdk in the repo
1 parent 316ff5d commit 2fe1ce9

File tree

15 files changed

+374
-1
lines changed

15 files changed

+374
-1
lines changed

.cspell-dictionaries/pulumi.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pulumi

.cspell.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313
"node",
1414
"k8s-local",
1515
"ansible",
16-
"linux"
16+
"linux",
17+
"pulumi"
1718
],
1819
"dictionaryDefinitions": [
20+
{
21+
"name": "pulumi",
22+
"path": "./.cspell-dictionaries/pulumi.txt"
23+
},
1924
{
2025
"name": "sphinx",
2126
"path": "./.cspell-dictionaries/sphinx.txt"

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
pulumi = "latest"

.taskfiles/pulumi/Taskfile.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
version: "3"
3+
tasks:
4+
up:
5+
desc: Pulumi up
6+
cmds:
7+
- uv run pulumi up {{.CLI_ARGS}}
8+
preview:
9+
desc: Pulumi preview
10+
cmds:
11+
- uv run pulumi preview {{.CLI_ARGS}}
12+
destroy:
13+
desc: Pulumi destroy
14+
cmds:
15+
- uv run pulumi destroy {{.CLI_ARGS}}

Taskfile.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ includes:
1212
argocd:
1313
taskfile: .taskfiles/argocd/Taskfile.yaml
1414
dir: kubernetes
15+
pulumi:
16+
taskfile: .taskfiles/pulumi/Taskfile.yaml
17+
dir: pulumi
1518
tasks:
1619
default:
1720
desc: "List tasks"

pulumi/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
venv/

pulumi/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

pulumi/Pulumi.prod.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
config:
3+
aws:region: us-west-2

pulumi/Pulumi.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: faerun
3+
description: A minimal AWS Python Pulumi program
4+
runtime:
5+
name: python
6+
options:
7+
toolchain: uv
8+
config:
9+
pulumi:tags:
10+
value:
11+
pulumi:template: aws-python

pulumi/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Pulumi
2+
3+
Deploying resource using pulumi
4+
5+
## Overview
6+
7+
### AWS
8+
9+
- Create IAM user for home-assistant integration for managing r53 records.
10+
11+
## Getting Started
12+
13+
### Preview the planned changes
14+
15+
```bash
16+
task pulumi:preview
17+
```
18+
19+
### Deploy the stack
20+
21+
```bash
22+
task pulumi:up
23+
```
24+
25+
### Tear down when finished
26+
27+
```bash
28+
task pulumi:destroy
29+
```
30+
31+
## Project Layout
32+
33+
After running `pulumi new`, your directory will look like:
34+
35+
```
36+
├── __main__.py # Entry point of the Pulumi program
37+
├── Pulumi.yaml # Project metadata and template configuration
38+
└── Pulumi.<stack>.yaml # Stack-specific configuration (e.g., Pulumi.dev.yaml)
39+
```
40+
41+
## Configuration
42+
43+
This template defines the following config value:
44+
45+
- `aws:region` (string)
46+
The AWS region to deploy resources into.
47+
Default: `us-east-1`
48+
49+
View or update configuration with:
50+
51+
```bash
52+
pulumi config get aws:region
53+
pulumi config set aws:region us-west-2
54+
```
55+
56+
## Outputs
57+
58+
Once deployed, the stack exports:
59+
60+
### Retrieve outputs
61+
62+
```bash
63+
pulumi stack output bucket_name
64+
```
65+
66+
if the output is a secret then use
67+
68+
```bash
69+
pulumi stack output bucket_name --show-secrets
70+
```

0 commit comments

Comments
 (0)