Skip to content

Commit

Permalink
fix: remove Heroku workspace from terraform cloud (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakuboskera authored Mar 8, 2023
1 parent f86fbbc commit d466e9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 71 deletions.
32 changes: 0 additions & 32 deletions terraform-cloud/heroku.tf

This file was deleted.

29 changes: 1 addition & 28 deletions terraform-cloud/terraform-cloud.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,8 @@ resource "tfe_workspace" "terraform-cloud" {
}

# These vars are needed to be part of terraform-cloud workspace in
# order create these vars in other workspaces like cloudflare, heroku etc.
# order create these vars in other workspaces like cloudflare, etc.
# and then used by this workspaces
resource "tfe_variable" "terraform-cloud-heroku_email" {
key = "heroku_email"
value = var.heroku_email
category = "terraform"
sensitive = true
workspace_id = tfe_workspace.terraform-cloud.id
description = "Heroku email"
}

resource "tfe_variable" "terraform-cloud-heroku_api_key" {
key = "heroku_api_key"
value = var.heroku_api_key
category = "terraform"
sensitive = true
workspace_id = tfe_workspace.terraform-cloud.id
description = "Heroku api key"
}

resource "tfe_variable" "terraform-cloud-tfe_token" {
key = "tfe_token"
value = var.tfe_token
Expand Down Expand Up @@ -61,15 +43,6 @@ resource "tfe_variable" "terraform-cloud-icloud_dns_token" {
description = "iCloud DNS token"
}

resource "tfe_variable" "terraform-cloud-heroku_should-be-done_api_key" {
key = "heroku_should-be-done_api_key"
value = var.heroku_should-be-done_api_key
category = "terraform"
sensitive = true
workspace_id = tfe_workspace.terraform-cloud.id
description = "API key for https://todo.jakuboskera.dev application"
}

resource "tfe_variable" "terraform-cloud-todo_api_key" {
key = "todo_api_key"
value = var.todo_api_key
Expand Down
13 changes: 5 additions & 8 deletions terraform-cloud/terraform.auto.EXAMPLE.tfvars
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
tfe_token = "xxx" # Create a token here https://app.terraform.io/app/settings/tokens
heroku_email = "xxx"
heroku_api_key = "xxx" # Create a token here https://dashboard.heroku.com/account
cloudflare_email = "xxx"
cloudflare_api_key = "xxx" # Create a token here https://dash.cloudflare.com/profile/api-tokens
icloud_dns_token = "xxx"
heroku_should-be-done_api_key = "xxx"
todo_api_key = "xxx"
tfe_token = "xxx" # Create a token here https://app.terraform.io/app/settings/tokens
cloudflare_email = "xxx"
cloudflare_api_key = "xxx" # Create a token here https://dash.cloudflare.com/profile/api-tokens
icloud_dns_token = "xxx"
todo_api_key = "xxx"
3 changes: 0 additions & 3 deletions terraform-cloud/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
variable "tfe_token" {}
variable "heroku_email" {}
variable "heroku_api_key" {}
variable "cloudflare_email" {}
variable "cloudflare_api_key" {}
variable "icloud_dns_token" {}
variable "heroku_should-be-done_api_key" {}
variable "todo_api_key" {}

0 comments on commit d466e9b

Please sign in to comment.