Skip to content

Commit

Permalink
separate files, create workspaces later
Browse files Browse the repository at this point in the history
  • Loading branch information
jodok committed Dec 23, 2022
1 parent b05db5a commit 9b55f7c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 101 deletions.
3 changes: 3 additions & 0 deletions bootstrap/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "tfe_organization" "mastodonpro" {
name = "mastodonpro"
}
43 changes: 43 additions & 0 deletions bootstrap/tfc-variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### VARIABLE SETS
# staging
resource "tfe_variable_set" "aws_staging" {
name = "AWS Credentials - staging"
description = "AWS Access Key ID and Secret Access Key."
organization = data.tfe_organization.mastodonpro.name
}
resource "tfe_variable" "aws_access_key_id_staging" {
key = "AWS_ACCESS_KEY_ID"
description = "AWS Access Key ID - staging"
value = aws_iam_access_key.terraform_staging.id
category = "env"
variable_set_id = tfe_variable_set.aws_staging.id
}
resource "tfe_variable" "aws_secret_access_key_staging" {
key = "AWS_SECRET_ACCESS_KEY"
description = "AWS Secret Access Key - staging"
value = aws_iam_access_key.terraform_staging.secret
category = "env"
sensitive = true
variable_set_id = tfe_variable_set.aws_staging.id
}
# production
resource "tfe_variable_set" "aws_production" {
name = "AWS Credentials - production"
description = "AWS Access Key ID and Secret Access Key."
organization = data.tfe_organization.mastodonpro.name
}
resource "tfe_variable" "aws_access_key_id_production" {
key = "AWS_ACCESS_KEY_ID"
description = "AWS Access Key ID - production"
value = aws_iam_access_key.terraform_production.id
category = "env"
variable_set_id = tfe_variable_set.aws_production.id
}
resource "tfe_variable" "aws_secret_access_key_production" {
key = "AWS_SECRET_ACCESS_KEY"
description = "AWS Secret Access Key - production"
value = aws_iam_access_key.terraform_production.secret
category = "env"
sensitive = true
variable_set_id = tfe_variable_set.aws_production.id
}
101 changes: 0 additions & 101 deletions bootstrap/tfc.tf

This file was deleted.

0 comments on commit 9b55f7c

Please sign in to comment.