Skip to content

Commit ef58314

Browse files
author
Adetokunbo Ige
committed
chore: update the pulumi stack name
Signed-off-by: Adetokunbo Ige <[email protected]>
1 parent a0caf11 commit ef58314

File tree

7 files changed

+22
-16
lines changed

7 files changed

+22
-16
lines changed

.github/workflows/pulumi-deploy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
jobs:
1111
pulumi-deploy:
1212
runs-on: ubuntu-latest
13-
env:
14-
AWS_REGION: ${{ secrets.AWS_REGION }}
1513

1614
permissions:
1715
id-token: write
@@ -36,16 +34,18 @@ jobs:
3634
run: |
3735
pip install -r requirements.txt
3836
39-
- uses: pulumi/actions@v3
40-
with:
41-
command: preview
42-
stack-name: dev
37+
- name: Configure Pulumi
38+
working-directory: todo-app
39+
run: |
40+
pulumi stack select ExitoLab/todo-app/dev --non-interactive || pulumi stack init ExitoLab/todo-app/dev
4341
env:
4442
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
4543

46-
- uses: pulumi/actions@v3
47-
with:
48-
command: up
49-
stack-name: dev
44+
45+
- name: Pulumi Preview
46+
working-directory: todo-app
47+
run: |
48+
pulumi stack select ExitoLab/todo-app/dev
49+
pulumi preview
5050
env:
5151
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Building and Deploying a Serverless Todo App on AWS with Docker, Lambda, API Gateway, and GitHub Actions using Pulumi in Python
1+
# Building and Deploying a Serverless Todo App on AWS using Pulumi in Python
22

33
## Overview
44

todo-app/.gitignore

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

todo-app/Pulumi.dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
config:
2-
todo-app:location: eastus
2+
todo-app:docker_image: 289940214902.dkr.ecr.us-east-1.amazonaws.com/todo-app:v1.1

todo-app/Pulumi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ config:
99
pulumi:tags:
1010
value:
1111
pulumi:template: aws-python
12+

todo-app/__main__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
from pulumi_docker import Image, DockerBuild
44
import pulumi_docker as docker
55

6-
# Step 1: Create an ECR repository
7-
docker_image = "289940214902.dkr.ecr.us-east-1.amazonaws.com/todo-app:v1.1"
6+
from pulumi import Config
7+
8+
# Create a config object to access configuration values
9+
config = pulumi.Config()
10+
11+
docker_image = config.get("docker_image")
812

913
# Create an IAM Role for the Lambda function
1014
lambda_role = aws.iam.Role("lambdaExecutionRole",

todo-app/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
pulumi>=3.0.0,<4.0.0
22
pulumi-aws>=6.0.2,<7.0.0
33
pulumi_docker==3.4.0
4-
setuptools
4+
setuptools
5+
6+

0 commit comments

Comments
 (0)