Skip to content

Commit 939877c

Browse files
committed
chore: update auth variable names to match minimized variable names
1 parent 4028c74 commit 939877c

File tree

3 files changed

+46
-47
lines changed

3 files changed

+46
-47
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ No modules.
170170
| Name | Description | Type | Default | Required |
171171
|------|-------------|------|---------|:--------:|
172172
| <a name="input_appmesh_name"></a> [appmesh\_name](#input\_appmesh\_name) | Name of the AWS App Mesh | `string` | `""` | no |
173-
| <a name="input_auth_azure_ad_id"></a> [auth\_azure\_ad\_id](#input\_auth\_azure\_ad\_id) | The application (client) ID of the app registration | `string` | `""` | no |
174-
| <a name="input_auth_azure_ad_tenant_id"></a> [auth\_azure\_ad\_tenant\_id](#input\_auth\_azure\_ad\_tenant\_id) | The directory (tenant) ID of the azure ad/entra instance | `string` | `""` | no |
175-
| <a name="input_auth_keycloak_id"></a> [auth\_keycloak\_id](#input\_auth\_keycloak\_id) | The id to identify the client in key cloak | `string` | `""` | no |
176-
| <a name="input_auth_keycloak_issuer"></a> [auth\_keycloak\_issuer](#input\_auth\_keycloak\_issuer) | The url issuer to keycloak. This should inclue the realm - e.g. https://my-keycloak-domain.com/realms/My_Realm | `string` | `""` | no |
173+
| <a name="input_auth_client_id"></a> [auth\_client\_id](#input\_auth\_client\_id) | The application/client id used to idenitfy the client | `string` | `""` | no |
174+
| <a name="input_auth_issuer"></a> [auth\_issuer](#input\_auth\_issuer) | Used for keycloak only. The url issuer for the authentication provider. This should include the realm - e.g. https://my-keycloak-domain.com/realms/My_Realm | `string` | `""` | no |
175+
| <a name="input_auth_provider"></a> [auth\_provider](#input\_auth\_provider) | The authentication provider used. Either keycloak or ad. | `string` | `""` | no |
176+
| <a name="input_auth_tenant_id"></a> [auth\_tenant\_id](#input\_auth\_tenant\_id) | Used for azure ad/entra only. The directory (tenant) ID of the azure ad/entra instance | `string` | `""` | no |
177+
| <a name="input_auth_url"></a> [auth\_url](#input\_auth\_url) | Optional. The full URL of the auth api. By default https://your-site.com/ecr-viewer/api/auth. | `string` | `""` | no |
177178
| <a name="input_certificate_arn"></a> [certificate\_arn](#input\_certificate\_arn) | ARN of the SSL certificate that enables ssl termination on the ALB | `string` | `""` | no |
178179
| <a name="input_cloudmap_namespace_name"></a> [cloudmap\_namespace\_name](#input\_cloudmap\_namespace\_name) | Name of the AWS Cloud Map namespace | `string` | `""` | no |
179180
| <a name="input_cw_retention_in_days"></a> [cw\_retention\_in\_days](#input\_cw\_retention\_in\_days) | Retention period in days for CloudWatch logs | `number` | `30` | no |
@@ -199,8 +200,8 @@ No modules.
199200
| <a name="input_region"></a> [region](#input\_region) | The AWS region where resources are created | `string` | n/a | yes |
200201
| <a name="input_s3_viewer_bucket_name"></a> [s3\_viewer\_bucket\_name](#input\_s3\_viewer\_bucket\_name) | Name of the S3 bucket for the viewer | `string` | `""` | no |
201202
| <a name="input_s3_viewer_bucket_role_name"></a> [s3\_viewer\_bucket\_role\_name](#input\_s3\_viewer\_bucket\_role\_name) | Name of the IAM role for the ecr-viewer bucket | `string` | `""` | no |
202-
| <a name="input_secrets_manager_auth_azure_ad_secret_version"></a> [secrets\_manager\_auth\_azure\_ad\_secret\_version](#input\_secrets\_manager\_auth\_azure\_ad\_secret\_version) | n/a | `string` | `""` | no |
203-
| <a name="input_secrets_manager_auth_keycloak_secret_version"></a> [secrets\_manager\_auth\_keycloak\_secret\_version](#input\_secrets\_manager\_auth\_keycloak\_secret\_version) | n/a | `string` | `""` | no |
203+
| <a name="input_secrets_manager_auth_client_secret"></a> [secrets\_manager\_auth\_client\_secret](#input\_secrets\_manager\_auth\_client\_secret) | The location of the secret containing the auth client secret. This is the secret that comes from the authentication provider. | `string` | `""` | no |
204+
| <a name="input_secrets_manager_auth_secret"></a> [secrets\_manager\_auth\_secret](#input\_secrets\_manager\_auth\_secret) | The location of the secret containing the auth secret. This is used by eCR viewer to encrypt authentication. This can be generated by running `openssl rand -base64 32`. | `string` | `""` | no |
204205
| <a name="input_secrets_manager_postgresql_connection_string_version"></a> [secrets\_manager\_postgresql\_connection\_string\_version](#input\_secrets\_manager\_postgresql\_connection\_string\_version) | n/a | `string` | `""` | no |
205206
| <a name="input_secrets_manager_sqlserver_host_version"></a> [secrets\_manager\_sqlserver\_host\_version](#input\_secrets\_manager\_sqlserver\_host\_version) | n/a | `string` | `""` | no |
206207
| <a name="input_secrets_manager_sqlserver_password_version"></a> [secrets\_manager\_sqlserver\_password\_version](#input\_secrets\_manager\_sqlserver\_password\_version) | n/a | `string` | `""` | no |

_local.tf

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ locals {
2929
name = "DB_CIPHER",
3030
value = var.db_cipher
3131
} : null
32+
auth_provider = var.auth_provider != "" ? { name = "AUTH_PROVIDER", value = var.auth_provider } : null
33+
auth_client_id = var.auth_client_id != "" ? { name = "AUTH_CLIENT_ID", value = var.auth_client_id } : null
34+
auth_client_secret = var.secrets_manager_auth_client_secret != "" ? { name = "AUTH_CLIENT_SECRET", value = var.secrets_manager_auth_client_secret } : null
35+
auth_issuer = var.auth_issuer != "" ? { name = "AUTH_ISSUER", value = var.auth_issuer } : null
36+
auth_tenant_id = var.auth_tenant_id != "" ? { name = "AUTH_TENANT_ID", value = var.auth_tenant_id } : null
37+
auth_url = var.auth_url != "" ? { name = "NEXTAUTH_URL", value = var.auth_url } : null
38+
auth_secret = var.secrets_manager_auth_secret != "" ? { name = "NEXTAUTH_SECRET", value = var.secrets_manager_auth_secret } : null
3239
service_data = length(var.service_data) > 0 ? var.service_data : {
3340
ecr-viewer = {
3441
short_name = "ecrv",
@@ -66,35 +73,18 @@ locals {
6673
name = "NBS_PUB_KEY",
6774
value = var.ecr_viewer_auth_pub_key
6875
},
69-
{
70-
name = "AUTH_AZURE_AD_ID",
71-
value = var.auth_azure_ad_id
72-
},
73-
{
74-
name = "AUTH_AZURE_AD_TENANT_ID",
75-
value = var.auth_azure_ad_tenant_id
76-
},
77-
{
78-
name = "AUTH_AZURE_AD_SECRET",
79-
value = var.secrets_manager_auth_azure_ad_secret_version
80-
},
81-
{
82-
name = "AUTH_KEYCLOAK_ID",
83-
value = var.auth_keycloak_id
84-
},
85-
{
86-
name = "AUTH_KEYCLOAK_ISSUER",
87-
value = var.auth_keycloak_issuer
88-
},
89-
{
90-
name = "AUTH_KEYCLOAK_SECRET",
91-
value = var.secrets_manager_auth_keycloak_secret_version
92-
},
9376
local.database_url,
9477
local.sqlserver_user,
9578
local.sqlserver_password,
9679
local.sqlserver_host,
97-
local.db_cipher
80+
local.db_cipher,
81+
local.auth_provider,
82+
local.auth_client_id,
83+
local.auth_client_secret,
84+
local.auth_issuer,
85+
local.auth_tenant_id,
86+
local.auth_url,
87+
local.auth_secret
9888
]
9989
},
10090
fhir-converter = {

_variable.tf

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -152,40 +152,48 @@ variable "secrets_manager_sqlserver_host_version" {
152152
sensitive = true
153153
}
154154

155-
variable "auth_azure_ad_id" {
155+
variable "auth_provider" {
156156
type = string
157157
default = ""
158-
description = "The application (client) ID of the app registration"
158+
description = "The authentication provider used. Either keycloak or ad."
159159
}
160160

161-
variable "auth_azure_ad_tenant_id" {
161+
variable "auth_client_id" {
162162
type = string
163163
default = ""
164-
description = "The directory (tenant) ID of the azure ad/entra instance"
164+
description = "The application/client id used to idenitfy the client"
165165
}
166166

167-
variable "secrets_manager_auth_azure_ad_secret_version" {
168-
type = string
169-
default = ""
170-
sensitive = true
167+
variable "secrets_manager_auth_client_secret" {
168+
type = string
169+
default = ""
170+
description = "The location of the secret containing the auth client secret. This is the secret that comes from the authentication provider."
171+
sensitive = true
171172
}
172173

173-
variable "auth_keycloak_id" {
174+
variable "auth_tenant_id" {
174175
type = string
175176
default = ""
176-
description = "The id to identify the client in key cloak"
177+
description = "Used for azure ad/entra only. The directory (tenant) ID of the azure ad/entra instance"
177178
}
178179

179-
variable "auth_keycloak_issuer" {
180+
variable "auth_issuer" {
180181
type = string
181182
default = ""
182-
description = "The url issuer to keycloak. This should inclue the realm - e.g. https://my-keycloak-domain.com/realms/My_Realm"
183+
description = "Used for keycloak only. The url issuer for the authentication provider. This should include the realm - e.g. https://my-keycloak-domain.com/realms/My_Realm"
183184
}
184185

185-
variable "secrets_manager_auth_keycloak_secret_version" {
186-
type = string
187-
default = ""
188-
sensitive = true
186+
variable "auth_url" {
187+
type = string
188+
default = ""
189+
description = "Optional. The full URL of the auth api. By default https://your-site.com/ecr-viewer/api/auth."
190+
}
191+
192+
variable "secrets_manager_auth_secret" {
193+
type = string
194+
default = ""
195+
description = "The location of the secret containing the auth secret. This is used by eCR viewer to encrypt authentication. This can be generated by running `openssl rand -base64 32`."
196+
sensitive = true
189197
}
190198

191199
variable "certificate_arn" {

0 commit comments

Comments
 (0)