Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ jobs:
--header "Content-Type: application/vnd.api+json" \
--request POST \
--data "{\"data\":{\"attributes\":{\"name\":\"${{ env.WS_NAME }}\",\"execution-mode\":\"local\"},\"type\":\"workspaces\"}}" \
https://app.terraform.io/api/v2/organizations/kenf-hcp-org/workspaces || true
https://app.terraform.io/api/v2/organizations/${{ vars.TF_ORGANIZATION }}/workspaces || true

sed -i "s/TF_ORGANIZATION_PLACEHOLDER/${{ vars.TF_ORGANIZATION }}/g" main.tf
sed -i "s/RESUME_HOSTING_WORKSPACE_PLACEHOLDER/${{ env.WS_NAME }}/g" main.tf
terraform init
terraform apply --auto-approve
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ jobs:
--header "Content-Type: application/vnd.api+json" \
--request POST \
--data "{\"data\":{\"attributes\":{\"name\":\"${{ env.WS_NAME }}\",\"execution-mode\":\"local\"},\"type\":\"workspaces\"}}" \
https://app.terraform.io/api/v2/organizations/kenf-hcp-org/workspaces || true
https://app.terraform.io/api/v2/organizations/${{ vars.TF_ORGANIZATION }}/workspaces || true

sed -i "s/TF_ORGANIZATION_PLACEHOLDER/${{ vars.TF_ORGANIZATION }}/g" main.tf
sed -i "s/RESUME_HOSTING_WORKSPACE_PLACEHOLDER/${{ env.WS_NAME }}/g" main.tf
terraform init
terraform destroy --auto-approve
Expand All @@ -54,5 +55,5 @@ jobs:
--header "Authorization: Bearer ${{ secrets.TF_API_TOKEN }}" \
--header "Content-Type: application/vnd.api+json" \
--request DELETE \
"https://app.terraform.io/api/v2/organizations/kenf-hcp-org/workspaces/${{ env.WS_NAME }}" || echo "Workspace deletion failed or already deleted"
"https://app.terraform.io/api/v2/organizations/${{ vars.TF_ORGANIZATION }}/workspaces/${{ env.WS_NAME }}" || echo "Workspace deletion failed or already deleted"
working-directory: ./terraform
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Fork this repo and add the following to **Settings -> Secrets and variables -> A
**Variables:**
- `DOMAIN_NAME`: e.g., `resume.kenf.dev`
- `PROJECT_NAME`: e.g., `resume-hosting`
- `TF_ORGANIZATION`: Your HCP Terraform Organization name.

### 3. Deploy
- **Production**: Push to `main`. The system will automatically create your HCP Terraform workspace and deploy to your domain.
Expand Down
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
cloud {
organization = "kenf-hcp-org"
organization = "TF_ORGANIZATION_PLACEHOLDER"

workspaces {
name = "RESUME_HOSTING_WORKSPACE_PLACEHOLDER"
Expand Down