Skip to content

Commit 6fe3f75

Browse files
feat: set backstage service-to-service auth key (#24)
1 parent c213357 commit 6fe3f75

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

examples/with-backstage/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Once you are finished with the reference architecture, you can remove all provis
113113
| [humanitec_application.backstage](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/application) | resource |
114114
| [humanitec_resource_definition_criteria.backstage_mysql](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource |
115115
| [humanitec_resource_definition_criteria.backstage_postgres](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource |
116+
| [humanitec_value.app_config_backend_auth_keys](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
116117
| [humanitec_value.backstage_cloud_provider](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
117118
| [humanitec_value.backstage_github_app_client_id](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
118119
| [humanitec_value.backstage_github_app_client_secret](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
@@ -122,6 +123,7 @@ Once you are finished with the reference architecture, you can remove all provis
122123
| [humanitec_value.backstage_github_org_id](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
123124
| [humanitec_value.backstage_humanitec_org](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
124125
| [humanitec_value.backstage_humanitec_token](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/value) | resource |
126+
| [random_bytes.backstage_service_to_service_auth_key](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/bytes) | resource |
125127
| [random_string.oidc_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
126128

127129
### Inputs

examples/with-backstage/backstage-humanitec.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ resource "humanitec_value" "backstage_cloud_provider" {
7777
is_secret = false
7878
}
7979

80+
resource "random_bytes" "backstage_service_to_service_auth_key" {
81+
length = 24
82+
}
83+
84+
resource "humanitec_value" "app_config_backend_auth_keys" {
85+
app_id = humanitec_application.backstage.id
86+
key = "APP_CONFIG_backend_auth_keys"
87+
description = "Backstage service-to-service-auth keys"
88+
value = jsonencode([{
89+
secret = random_bytes.backstage_service_to_service_auth_key.base64
90+
}])
91+
is_secret = true
92+
}
93+
8094
# Configure required resources for backstage
8195

8296
locals {

0 commit comments

Comments
 (0)