CodeYourFuture / CodeYourFuture/Module-Cloud
[TECH ED] Using Terraform Modules and Remote State
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 0
- Forks
- 6
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Link to the coursework
https://developer.hashicorp.com/terraform/docs
### Why are we doing this?
#### Objective
In this exercise, you will utilize a Terraform module to create a reusable configuration for S3 buckets. Additionally, you'll implement remote state management using an S3 bucket.
#### Steps
1. **Create a Terraform Module for S3 Buckets**
- Create a new directory named `s3_module` and place a new Terraform file inside it, e.g., `main.tf`.
- Define the Terraform code for an S3 bucket inside this file.
2. **Implement Remote State in S3**
- In your main Terraform configuration (`main.tf`), configure the backend for remote state using S3.
3. **Initialize and Apply**
- Initialize your Terraform project.
- Apply the configuration to create the S3 bucket using the module and configure remote state.
#### Validation
- Confirm that the S3 bucket was created as expected.
- Check the S3 bucket where you store the remote state to ensure that the `terraform.tfstate` file is present.
#### References
- [Terraform Modules](https://developer.hashicorp.com/terraform/language/modules)
- [Terraform S3 Backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3)
### Maximum time in hours
n/a stretch
### How to get help
Ask calm, curious questions with links, code samples, and no screenshots.
https://curriculum.codeyourfuture.io/guides/asking-questions/
### How to submit
Demo your progress in class.
Beitragsleitfaden
Rechercherichtung
Beginne mit den Links zur Terraform-Dokumentation, sieh dir dann die vorhandene main.tf an und erstelle das angeforderte Verzeichnis und die Datei s3_module/main.tf. Initialisiere und wende die Konfiguration an. Überprüfe anschließend, dass der S3-Bucket erstellt wurde und terraform.tfstate im Remote-State-Bucket vorhanden ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, terraform
- Bereich
- cloud, infrastructure
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 48/100