Skip to content

Commit 5582764

Browse files
authored
fix: Correct recommended var.name for auth0/app (#1108)
1 parent 53728bc commit 5582764

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

modules/auth0/app/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ client ID and client secret configured with the `auth0/tenant` component.
1717

1818
Here's an example snippet for how to use this component.
1919

20+
> [!IMPORTANT]
21+
>
22+
> Be sure that the context ID does not overlap with the context ID of other Auth0 components, such as `auth0/tenant`. We
23+
> use this ID to generate the SSM parameter names.
24+
2025
```yaml
2126
# stacks/catalog/auth0/app.yaml
2227
components:
2328
terraform:
2429
auth0/app:
2530
vars:
2631
enabled: true
27-
name: "auth0"
32+
name: "auth0-app"
2833

2934
# We can centralize plat-sandbox, plat-dev, and plat-staging all use a "nonprod" Auth0 tenant, which is deployed in plat-staging.
3035
auth0_tenant_stage_name: "plat-staging"
@@ -115,9 +120,9 @@ components:
115120
| <a name="input_name"></a> [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.<br>This is the only ID element not also included as a `tag`.<br>The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
116121
| <a name="input_namespace"></a> [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
117122
| <a name="input_oidc_conformant"></a> [oidc\_conformant](#input\_oidc\_conformant) | OIDC Conformant | `bool` | `true` | no |
118-
| <a name="input_provider_ssm_base_path"></a> [provider\_ssm\_base\_path](#input\_provider\_ssm\_base\_path) | The base path for the SSM parameters. If not defined, this is set to the module context ID. This is also required when `var.enabled` is set to `false` | `string` | `""` | no |
119123
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.<br>Characters matching the regex will be removed from the ID elements.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
120124
| <a name="input_region"></a> [region](#input\_region) | AWS Region | `string` | n/a | yes |
125+
| <a name="input_ssm_base_path"></a> [ssm\_base\_path](#input\_ssm\_base\_path) | The base path for the SSM parameters. If not defined, this is set to the module context ID. This is also required when `var.enabled` is set to `false` | `string` | `""` | no |
121126
| <a name="input_sso"></a> [sso](#input\_sso) | Single Sign-On for the Auth0 app | `bool` | `true` | no |
122127
| <a name="input_stage"></a> [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
123128
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |

modules/auth0/app/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ variable "jwt_alg" {
6363
default = "RS256"
6464
}
6565

66-
variable "provider_ssm_base_path" {
66+
variable "ssm_base_path" {
6767
type = string
6868
description = "The base path for the SSM parameters. If not defined, this is set to the module context ID. This is also required when `var.enabled` is set to `false`"
6969
default = ""

modules/auth0/tenant/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ components:
1616
auth0/tenant:
1717
vars:
1818
enabled: true
19+
# Make sure this name does not conflict with other Auth0 components, such as `auth0/app`
1920
name: auth0
2021
support_email: "[email protected]"
2122
support_url: "https://acme.com"
@@ -61,6 +62,11 @@ auth0_client_secret_ssm_path = "/${module.this.id}/client_secret"
6162
For example, if we're deploying `auth0/tenant` into `plat-gbl-prod` and my default region is `us-west-2`, then I would
6263
add the following parameters to the `plat-prod` account in `us-west-2`:
6364

65+
> [!IMPORTANT]
66+
>
67+
> Be sure that this AWS SSM parameter path does not conflict with SSM parameters used by other Auth0 components, such as
68+
> `auth0/app`. In both components, the SSM parameter paths are defined by the component deployment's context ID.
69+
6470
```
6571
/acme-plat-gbl-prod-auth0/domain
6672
/acme-plat-gbl-prod-auth0/client_id

0 commit comments

Comments
 (0)