Skip to content

Commit

Permalink
feat: set backstage service-to-service auth key (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach authored Apr 23, 2024
1 parent c213357 commit 6fe3f75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/with-backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Once you are finished with the reference architecture, you can remove all provis
| [humanitec_application.backstage](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/application) | resource |
| [humanitec_resource_definition_criteria.backstage_mysql](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource |
| [humanitec_resource_definition_criteria.backstage_postgres](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource |
| [humanitec_value.app_config_backend_auth_keys](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
| [humanitec_value.backstage_cloud_provider](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
| [humanitec_value.backstage_github_app_client_id](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
| [humanitec_value.backstage_github_app_client_secret](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
Expand All @@ -122,6 +123,7 @@ Once you are finished with the reference architecture, you can remove all provis
| [humanitec_value.backstage_github_org_id](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
| [humanitec_value.backstage_humanitec_org](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
| [humanitec_value.backstage_humanitec_token](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
| [random_bytes.backstage_service_to_service_auth_key](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/bytes) | resource |
| [random_string.oidc_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |

### Inputs
Expand Down
14 changes: 14 additions & 0 deletions examples/with-backstage/backstage-humanitec.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ resource "humanitec_value" "backstage_cloud_provider" {
is_secret = false
}

resource "random_bytes" "backstage_service_to_service_auth_key" {
length = 24
}

resource "humanitec_value" "app_config_backend_auth_keys" {
app_id = humanitec_application.backstage.id
key = "APP_CONFIG_backend_auth_keys"
description = "Backstage service-to-service-auth keys"
value = jsonencode([{
secret = random_bytes.backstage_service_to_service_auth_key.base64
}])
is_secret = true
}

# Configure required resources for backstage

locals {
Expand Down

0 comments on commit 6fe3f75

Please sign in to comment.