Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set backstage service-to-service auth key #23

Merged
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
4 changes: 4 additions & 0 deletions examples/with-backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Once you are finished with the reference architecture, you can remove all provis
| aws | ~> 5.17 |
| github | ~> 5.38 |
| humanitec | ~> 1.0 |
| random | ~> 3.5 |

### Providers

Expand All @@ -84,6 +85,7 @@ Once you are finished with the reference architecture, you can remove all provis
| aws | ~> 5.17 |
| github | ~> 5.38 |
| humanitec | ~> 1.0 |
| random | ~> 3.5 |

### Modules

Expand Down Expand Up @@ -118,6 +120,7 @@ Once you are finished with the reference architecture, you can remove all provis
| [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_resource_definition_criteria.backstage_workload](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.aws_default_region](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 |
Expand All @@ -128,6 +131,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 |

### 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 @@ -85,6 +85,20 @@ resource "humanitec_value" "aws_default_region" {
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
4 changes: 4 additions & 0 deletions examples/with-backstage/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ terraform {
source = "integrations/github"
version = "~> 5.38"
}
random = {
source = "hashicorp/random"
version = "~> 3.5"
}
}
required_version = ">= 1.3.0"
}
Expand Down
Loading