This repo contains a Terraform configuration that creates an S3 bucket for state management and integrates it with a VCS-driven HCP Workspace. Manage your infrastructure like a pro with seamless version control and reliable state storage! 🛠️📦
- ☁️ HCP Workspace Integration: Centralized workspace for managing Terraform runs via HashiCorp Cloud Platform.
- 🔗 VCS-Driven Workflow: Push code to your favorite version control platform to trigger changes.
- 🟢 Terraform: Version
>= 1.5 - 🟡 AWS Credentials: Configured locally or via IAM roles.
- 🟣 HCP Account: Permissions to create/manage workspaces required.
- 🟠 VCS Provider: GitHub, GitLab, or other HCP-supported providers.
-
Clone the Repository:
git clone https://github.com/TerraformTestLab/HelloS3Vcs.git cd your-repo-name -
Initialize Terraform: 🛠️ Start your journey here!
Run this to fetch required providers/modules:
terraform init
📥 Modules incoming!
-
Review and Apply Configuration:
- 🧐Preview your changes:
terraform plan
- ✅ Apply your configuration:
terraform apply
-
Connect HCP Workspace:
- 🌐 Login to the HCP portal and link your workspace to the VCS repo.
- 🎯 Configure it to use the S3 bucket for backend state.
| 📛 Name | 📖 Description |
|---|---|
bucket_arn |
🪣 ARN of the created S3 bucket |
bucket_name |
🏷️ Name of the created S3 bucket |
hcp_workspace_id |
🆔 ID of the created HCP workspace |
-
🎉 Contributions welcome! Submit issues or pull requests to make this even better. 💪
This project is licensed under the MIT License. 🪪
🖱️ @sujaysamanta(https://github.com/sujaysamanta)