You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Config: `profiles.filter_by_tags: true` (enables by default)
472
+
- Default: Disabled (backward compatible - show all resources)
473
+
474
+
**TR2a.5**: Tag filtering examples:
475
+
476
+
```yaml
477
+
# profiles/developer/_metadata.yaml
478
+
metadata:
479
+
name: developer
480
+
tags: ["developer", "local"]
481
+
482
+
# When --profile developer --filter-by-profile-tags active:
483
+
# Only shows identities/stacks/components with tags: ["developer"] or ["local"]
484
+
```
485
+
486
+
```bash
487
+
# List only developer identities when developer profile active
488
+
atmos auth list identities --profile developer --filter-by-profile-tags
489
+
490
+
# Output: Only shows identities tagged with "developer" or "local"
491
+
```
492
+
493
+
**TR2a.6**: Multiple profiles with tag filtering:
494
+
- When multiple profiles active: `--profile developer,ci`
495
+
- Tags are **unioned**: `["developer", "local", "ci", "github-actions"]`
496
+
- Resources matching **any** tag are shown
497
+
498
+
**TR2a.7**: Tag filtering MUST work with:
499
+
- Identity listing: `atmos auth list identities`
500
+
- Component listing: `atmos list components`
501
+
- Stack listing: `atmos describe stacks`
502
+
- Future: Any resource with `tags` field
503
+
411
504
#### TR3: Performance
412
505
413
506
**TR3.1**: Profile loading MUST complete within 100ms for typical profiles (<10 files)
@@ -757,6 +850,17 @@ Note: Provenance annotations show the source file and line number where each val
757
850
**Note:** This example uses `auth.defaults.identity` from the [Auth Default Settings PRD](./auth-default-settings.md) to provide deterministic identity selection in non-interactive (CI) environments.
758
851
759
852
```yaml
853
+
# profiles/ci/_metadata.yaml (or in auth.yaml as first file)
854
+
metadata:
855
+
name: ci
856
+
description: "GitHub Actions CI/CD environment for production deployments"
857
+
version: "2.1.0"
858
+
tags:
859
+
- ci
860
+
- github-actions
861
+
- production
862
+
- non-interactive
863
+
760
864
# profiles/ci/auth.yaml
761
865
auth:
762
866
# Use auth.defaults.identity for deterministic selection in CI (no TTY needed)
**Note:** This example shows how profiles can use `auth.defaults.identity` to set a sensible default while still allowing multiple identities for quick switching.
832
936
833
937
```yaml
938
+
# profiles/developer/_metadata.yaml
939
+
metadata:
940
+
name: developer
941
+
description: "Developer workstation configuration with AWS SSO"
942
+
version: "1.5.0"
943
+
tags:
944
+
- development
945
+
- local
946
+
- interactive
947
+
- aws-sso
948
+
834
949
# profiles/developer/auth.yaml
835
950
auth:
836
951
# Selected default for developer profile
@@ -903,6 +1018,15 @@ atmos terraform plan vpc -s dev --profile developer --identity developer-prod
903
1018
#### Debug Profile Example
904
1019
905
1020
```yaml
1021
+
# profiles/debug/_metadata.yaml
1022
+
metadata:
1023
+
name: debug
1024
+
description: "Debug logging and CPU profiling for troubleshooting"
1025
+
tags:
1026
+
- debug
1027
+
- troubleshooting
1028
+
- verbose
1029
+
906
1030
# profiles/debug/logging.yaml
907
1031
logs:
908
1032
level: Trace
@@ -1007,15 +1131,141 @@ settings:
1007
1131
3. Later profiles override earlier ones for conflicting settings
1008
1132
4. In this example: `debug/logging.yaml` overrides `developer/logging.yaml` for `logs.level`
1009
1133
1134
+
#### Tag-Based Resource Filtering
1135
+
1136
+
**Use Case:** Automatically show only relevant resources when a profile is active.
1137
+
1138
+
**Configuration:**
1139
+
1140
+
```yaml
1141
+
# profiles/developer/_metadata.yaml
1142
+
metadata:
1143
+
name: developer
1144
+
tags:
1145
+
- developer
1146
+
- local
1147
+
- development
1148
+
1149
+
# atmos.yaml - Identity configuration with tags
1150
+
auth:
1151
+
identities:
1152
+
developer-sandbox:
1153
+
kind: aws/permission-set
1154
+
tags: ["developer", "sandbox"] # Matches "developer" tag from profile
1155
+
via:
1156
+
provider: aws-sso-dev
1157
+
principal:
1158
+
account_id: "999888777666"
1159
+
permission_set: DeveloperAccess
1160
+
1161
+
developer-prod:
1162
+
kind: aws/permission-set
1163
+
tags: ["developer", "production"] # Matches "developer" tag from profile
1164
+
via:
1165
+
provider: aws-sso-prod
1166
+
principal:
1167
+
account_id: "123456789012"
1168
+
permission_set: ReadOnlyAccess
1169
+
1170
+
platform-admin:
1171
+
kind: aws/permission-set
1172
+
tags: ["admin", "production"] # Does NOT match profile tags
1173
+
via:
1174
+
provider: aws-sso-prod
1175
+
principal:
1176
+
account_id: "123456789012"
1177
+
permission_set: AdministratorAccess
1178
+
1179
+
ci-github-oidc:
1180
+
kind: aws/assume-role
1181
+
tags: ["ci", "github-actions"] # Does NOT match profile tags
1182
+
via:
1183
+
provider: github-oidc-provider
1184
+
```
1185
+
1186
+
**Usage with Tag Filtering:**
1187
+
1188
+
```bash
1189
+
# List identities with tag filtering enabled
1190
+
atmos auth list identities --profile developer --filter-by-profile-tags
1191
+
```
1192
+
1193
+
**Output (filtered):**
1194
+
```
1195
+
Available Identities (filtered by profile tags: developer, local, development)
0 commit comments