Skip to content

Commit 14eb1ce

Browse files
committed
Update README
1 parent 54bd403 commit 14eb1ce

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# hw-lambda-api
2-
Example of creating and deploying an API with Lambda and Terraform on AWS
2+
Example of creating and deploying a Lambda API with OpenTofu on AWS
33

44
## Prerequisites
55

6-
* Install [Terraform](https://www.terraform.io/downloads.html)
6+
* Install [OpenTofu](https://opentofu.org/docs/intro/install/)
77
* Install the [AWS CLI](https://aws.amazon.com/cli/)
88
* Log into your `dev` account (with [`aws sso login`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sso/login.html))
9-
* Ensure your account has a [Terraform State S3 Backend](https://github.com/byu-oit/terraform-aws-backend-s3) deployed
9+
* Ensure your account has a [Terraform/OpenTofu State S3 Backend](https://github.com/byu-oit/terraform-aws-backend-s3) deployed
1010
* If you're outside the [`byu-oit` GitHub organization](https://github.com/byu-oit):
1111
* Obtain a DivvyCloud username and password from the Cloud Office at [email protected]
12-
* Install [the GitHub App used for auto-merging Dependabot pull requests](https://github.com/apps/dependabot-merge-action) to your organization
1312

1413
## Setup
1514
* Create a new repo [using this template](https://github.com/byu-oit/hw-lambda-api/generate).
@@ -47,9 +46,9 @@ git commit -am "Update template with repo specific details"
4746
### Deploy the "one time setup" resources
4847

4948
```sh
50-
cd terraform-iac/dev/setup/
51-
terraform init
52-
terraform apply
49+
cd iac/dev/setup/
50+
tofu init
51+
tofu apply
5352
```
5453

5554
In the AWS Console, see if you can find the resources from `setup.tf` (SSM Param).
@@ -68,11 +67,11 @@ If you look at [`.github/workflows/deploy.yml`](.github/workflows/deploy.yml), y
6867

6968
### View the deployed application
7069

71-
Anytime after the `Terraform Apply` step succeeds:
70+
Anytime after the `Tofu Apply` step succeeds:
7271
```sh
7372
cd ../app/
74-
terraform init
75-
terraform output
73+
tofu init
74+
tofu output
7675
```
7776

7877
This will output a DNS Name. Enter this in a browser. You should get a JSON response. Between `index.js` and `main.tf`, can you find what pieces are necessary to make this data available to the app?
@@ -98,8 +97,8 @@ In GitHub Actions, watch the deploy steps run (you have a new push, so you'll ha
9897
9998
## Learn what was built
10099

101-
By digging through the `.tf` files, you'll see what resources are being created. You should spend some time searching through the AWS Console for each of these resources. The goal is to start making connections between the Terraform syntax and the actual AWS resources that are created.
100+
By digging through the `.tf` files, you'll see what resources are being created. You should spend some time searching through the AWS Console for each of these resources. The goal is to start making connections between the OpenTofu syntax and the actual AWS resources that are created.
102101

103-
Several OIT created Terraform modules are used. You can look these modules up in our GitHub Organization. There you can see what resources each of these modules creates. You can look those up in the AWS Console too.
102+
Several OIT created Terraform/OpenTofu modules are used. You can look these modules up in our GitHub Organization. There you can see what resources each of these modules creates. You can look those up in the AWS Console too.
104103

105104
<!--TODO add some architecture docs and diagrams -->

0 commit comments

Comments
 (0)