@intentius/terragucci 0.4.34 → 0.4.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit.schema.json +7 -5
- package/dist/estate.schema.json +14 -0
- package/dist/estates.schema.json +27 -0
- package/dist/report-index.schema.json +1 -1
- package/dist/report.schema.json +56 -1
- package/dist/run.schema.json +1 -1
- package/dist/state-versions.schema.json +1 -0
- package/dist/terragucci.mjs +959 -727
- package/dist/terragucci.mjs.map +4 -4
- package/dist/terragucci.schema.json +304 -4
- package/dist/types.d.ts +109 -4
- package/package.json +1 -1
|
@@ -93,6 +93,47 @@
|
|
|
93
93
|
],
|
|
94
94
|
"description": "What counts as a waiting wave's approval: the mode, or a map with the mode and require_signed."
|
|
95
95
|
},
|
|
96
|
+
"approval_rules": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"minItems": 1,
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"properties": {
|
|
102
|
+
"roots": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"minItems": 1,
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "^[^\\s,;=']+$"
|
|
108
|
+
},
|
|
109
|
+
"description": "Root globs: a wave with a root one matches takes the rule."
|
|
110
|
+
},
|
|
111
|
+
"count": {
|
|
112
|
+
"type": "integer",
|
|
113
|
+
"minimum": 1,
|
|
114
|
+
"description": "How many distinct people approve the wave's set digest. Default 1."
|
|
115
|
+
},
|
|
116
|
+
"roles": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"minItems": 1,
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
122
|
+
},
|
|
123
|
+
"description": "Each approver counted holds one of these roles in .chant/trust.json at base."
|
|
124
|
+
},
|
|
125
|
+
"not_author": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"description": "At least one approver counted is not the change's author."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": [
|
|
132
|
+
"roots"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"description": "More approvers, or approvers with a role, for the waves whose roots a glob names."
|
|
136
|
+
},
|
|
96
137
|
"apply": {
|
|
97
138
|
"type": "object",
|
|
98
139
|
"properties": {
|
|
@@ -1034,8 +1075,69 @@
|
|
|
1034
1075
|
"type": "array",
|
|
1035
1076
|
"minItems": 1,
|
|
1036
1077
|
"items": {
|
|
1037
|
-
"
|
|
1038
|
-
|
|
1078
|
+
"anyOf": [
|
|
1079
|
+
{
|
|
1080
|
+
"type": "string",
|
|
1081
|
+
"pattern": "^[^\\r\\n]*\\S[^\\r\\n]*$"
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"type": "object",
|
|
1085
|
+
"properties": {
|
|
1086
|
+
"roots": {
|
|
1087
|
+
"type": "array",
|
|
1088
|
+
"minItems": 1,
|
|
1089
|
+
"items": {
|
|
1090
|
+
"type": "string",
|
|
1091
|
+
"pattern": "^[^\\s,;=']+$"
|
|
1092
|
+
},
|
|
1093
|
+
"description": "Root globs: the entry covers a denial of a root one matches."
|
|
1094
|
+
},
|
|
1095
|
+
"who": {
|
|
1096
|
+
"type": "array",
|
|
1097
|
+
"minItems": 1,
|
|
1098
|
+
"items": {
|
|
1099
|
+
"type": "string",
|
|
1100
|
+
"pattern": "^[^\\r\\n]*\\S[^\\r\\n]*$"
|
|
1101
|
+
},
|
|
1102
|
+
"description": "The forge identities or signers who may override such a denial."
|
|
1103
|
+
},
|
|
1104
|
+
"roles": {
|
|
1105
|
+
"type": "array",
|
|
1106
|
+
"minItems": 1,
|
|
1107
|
+
"items": {
|
|
1108
|
+
"type": "string",
|
|
1109
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
1110
|
+
},
|
|
1111
|
+
"description": "Roles in .chant/trust.json at base whose holders may override such a denial (approval: sealed)."
|
|
1112
|
+
},
|
|
1113
|
+
"rules": {
|
|
1114
|
+
"type": "array",
|
|
1115
|
+
"minItems": 1,
|
|
1116
|
+
"items": {
|
|
1117
|
+
"type": "string",
|
|
1118
|
+
"pattern": "^\\S+$"
|
|
1119
|
+
},
|
|
1120
|
+
"description": "Only an override of these rule ids, every one of them."
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
"additionalProperties": false,
|
|
1124
|
+
"required": [
|
|
1125
|
+
"roots"
|
|
1126
|
+
]
|
|
1127
|
+
}
|
|
1128
|
+
]
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
"outcomes": {
|
|
1132
|
+
"type": "array",
|
|
1133
|
+
"minItems": 1,
|
|
1134
|
+
"uniqueItems": true,
|
|
1135
|
+
"items": {
|
|
1136
|
+
"enum": [
|
|
1137
|
+
"deny",
|
|
1138
|
+
"hold",
|
|
1139
|
+
"allow_unattended"
|
|
1140
|
+
]
|
|
1039
1141
|
}
|
|
1040
1142
|
}
|
|
1041
1143
|
},
|
|
@@ -1348,6 +1450,11 @@
|
|
|
1348
1450
|
"pattern": "^[a-z]{2}(-[a-z]+)+-\\d+$",
|
|
1349
1451
|
"description": "The AWS region whose CloudTrail drift attribution reads."
|
|
1350
1452
|
},
|
|
1453
|
+
"audit_log_group": {
|
|
1454
|
+
"type": "string",
|
|
1455
|
+
"pattern": "^[A-Za-z0-9._\\-/#]{1,512}$",
|
|
1456
|
+
"description": "The CloudWatch Logs group a CloudTrail trail delivers the state buckets' S3 data events to; terragucci audit reads it to name who wrote a state version no wave or migration recorded."
|
|
1457
|
+
},
|
|
1351
1458
|
"dashboards": {
|
|
1352
1459
|
"anyOf": [
|
|
1353
1460
|
{
|
|
@@ -1442,6 +1549,49 @@
|
|
|
1442
1549
|
],
|
|
1443
1550
|
"description": "Roots each pull request gets a copy of."
|
|
1444
1551
|
},
|
|
1552
|
+
"secrets": {
|
|
1553
|
+
"type": "array",
|
|
1554
|
+
"minItems": 1,
|
|
1555
|
+
"items": {
|
|
1556
|
+
"type": "object",
|
|
1557
|
+
"properties": {
|
|
1558
|
+
"roots": {
|
|
1559
|
+
"type": "array",
|
|
1560
|
+
"minItems": 1,
|
|
1561
|
+
"items": {
|
|
1562
|
+
"type": "string",
|
|
1563
|
+
"pattern": "\\S"
|
|
1564
|
+
}
|
|
1565
|
+
},
|
|
1566
|
+
"from": {
|
|
1567
|
+
"enum": [
|
|
1568
|
+
"aws",
|
|
1569
|
+
"gcp",
|
|
1570
|
+
"azure"
|
|
1571
|
+
]
|
|
1572
|
+
},
|
|
1573
|
+
"values": {
|
|
1574
|
+
"type": "object",
|
|
1575
|
+
"minProperties": 1,
|
|
1576
|
+
"propertyNames": {
|
|
1577
|
+
"type": "string",
|
|
1578
|
+
"pattern": "^(?!(?:[Gg][Ii][Tt][Hh][Uu][Bb]_|[Gg][Ii][Tt][Ee][Aa]_|[Ff][Oo][Rr][Gg][Ee][Jj][Oo]_|[Tt][Gg]_|[Tt][Ee][Rr][Rr][Aa][Gg][Uu][Cc][Cc][Ii]_|[Aa][Ww][Ss]_|[Aa][Rr][Mm]_|[Aa][Zz][Uu][Rr][Ee]_|[Gg][Oo][Oo][Gg][Ll][Ee]_|[Cc][Ll][Oo][Uu][Dd][Ss][Dd][Kk]_))(?!(?:TF_IN_AUTOMATION|TF_INPUT)$)[A-Za-z_][A-Za-z0-9_]*$"
|
|
1579
|
+
},
|
|
1580
|
+
"additionalProperties": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"pattern": "^[^\\s]+$"
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
},
|
|
1586
|
+
"additionalProperties": false,
|
|
1587
|
+
"required": [
|
|
1588
|
+
"roots",
|
|
1589
|
+
"from",
|
|
1590
|
+
"values"
|
|
1591
|
+
]
|
|
1592
|
+
},
|
|
1593
|
+
"description": "Values a root's binary gets from a cloud's secret store, fetched at job time with the root's own identity."
|
|
1594
|
+
},
|
|
1445
1595
|
"environments": {
|
|
1446
1596
|
"type": "object",
|
|
1447
1597
|
"minProperties": 1,
|
|
@@ -1776,6 +1926,47 @@
|
|
|
1776
1926
|
],
|
|
1777
1927
|
"description": "What counts as a waiting wave's approval: the mode, or a map with the mode and require_signed."
|
|
1778
1928
|
},
|
|
1929
|
+
"approval_rules": {
|
|
1930
|
+
"type": "array",
|
|
1931
|
+
"minItems": 1,
|
|
1932
|
+
"items": {
|
|
1933
|
+
"type": "object",
|
|
1934
|
+
"properties": {
|
|
1935
|
+
"roots": {
|
|
1936
|
+
"type": "array",
|
|
1937
|
+
"minItems": 1,
|
|
1938
|
+
"items": {
|
|
1939
|
+
"type": "string",
|
|
1940
|
+
"pattern": "^[^\\s,;=']+$"
|
|
1941
|
+
},
|
|
1942
|
+
"description": "Root globs: a wave with a root one matches takes the rule."
|
|
1943
|
+
},
|
|
1944
|
+
"count": {
|
|
1945
|
+
"type": "integer",
|
|
1946
|
+
"minimum": 1,
|
|
1947
|
+
"description": "How many distinct people approve the wave's set digest. Default 1."
|
|
1948
|
+
},
|
|
1949
|
+
"roles": {
|
|
1950
|
+
"type": "array",
|
|
1951
|
+
"minItems": 1,
|
|
1952
|
+
"items": {
|
|
1953
|
+
"type": "string",
|
|
1954
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
1955
|
+
},
|
|
1956
|
+
"description": "Each approver counted holds one of these roles in .chant/trust.json at base."
|
|
1957
|
+
},
|
|
1958
|
+
"not_author": {
|
|
1959
|
+
"type": "boolean",
|
|
1960
|
+
"description": "At least one approver counted is not the change's author."
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
"additionalProperties": false,
|
|
1964
|
+
"required": [
|
|
1965
|
+
"roots"
|
|
1966
|
+
]
|
|
1967
|
+
},
|
|
1968
|
+
"description": "More approvers, or approvers with a role, for the waves whose roots a glob names."
|
|
1969
|
+
},
|
|
1779
1970
|
"apply": {
|
|
1780
1971
|
"type": "object",
|
|
1781
1972
|
"properties": {
|
|
@@ -2709,8 +2900,69 @@
|
|
|
2709
2900
|
"type": "array",
|
|
2710
2901
|
"minItems": 1,
|
|
2711
2902
|
"items": {
|
|
2712
|
-
"
|
|
2713
|
-
|
|
2903
|
+
"anyOf": [
|
|
2904
|
+
{
|
|
2905
|
+
"type": "string",
|
|
2906
|
+
"pattern": "^[^\\r\\n]*\\S[^\\r\\n]*$"
|
|
2907
|
+
},
|
|
2908
|
+
{
|
|
2909
|
+
"type": "object",
|
|
2910
|
+
"properties": {
|
|
2911
|
+
"roots": {
|
|
2912
|
+
"type": "array",
|
|
2913
|
+
"minItems": 1,
|
|
2914
|
+
"items": {
|
|
2915
|
+
"type": "string",
|
|
2916
|
+
"pattern": "^[^\\s,;=']+$"
|
|
2917
|
+
},
|
|
2918
|
+
"description": "Root globs: the entry covers a denial of a root one matches."
|
|
2919
|
+
},
|
|
2920
|
+
"who": {
|
|
2921
|
+
"type": "array",
|
|
2922
|
+
"minItems": 1,
|
|
2923
|
+
"items": {
|
|
2924
|
+
"type": "string",
|
|
2925
|
+
"pattern": "^[^\\r\\n]*\\S[^\\r\\n]*$"
|
|
2926
|
+
},
|
|
2927
|
+
"description": "The forge identities or signers who may override such a denial."
|
|
2928
|
+
},
|
|
2929
|
+
"roles": {
|
|
2930
|
+
"type": "array",
|
|
2931
|
+
"minItems": 1,
|
|
2932
|
+
"items": {
|
|
2933
|
+
"type": "string",
|
|
2934
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
2935
|
+
},
|
|
2936
|
+
"description": "Roles in .chant/trust.json at base whose holders may override such a denial (approval: sealed)."
|
|
2937
|
+
},
|
|
2938
|
+
"rules": {
|
|
2939
|
+
"type": "array",
|
|
2940
|
+
"minItems": 1,
|
|
2941
|
+
"items": {
|
|
2942
|
+
"type": "string",
|
|
2943
|
+
"pattern": "^\\S+$"
|
|
2944
|
+
},
|
|
2945
|
+
"description": "Only an override of these rule ids, every one of them."
|
|
2946
|
+
}
|
|
2947
|
+
},
|
|
2948
|
+
"additionalProperties": false,
|
|
2949
|
+
"required": [
|
|
2950
|
+
"roots"
|
|
2951
|
+
]
|
|
2952
|
+
}
|
|
2953
|
+
]
|
|
2954
|
+
}
|
|
2955
|
+
},
|
|
2956
|
+
"outcomes": {
|
|
2957
|
+
"type": "array",
|
|
2958
|
+
"minItems": 1,
|
|
2959
|
+
"uniqueItems": true,
|
|
2960
|
+
"items": {
|
|
2961
|
+
"enum": [
|
|
2962
|
+
"deny",
|
|
2963
|
+
"hold",
|
|
2964
|
+
"allow_unattended"
|
|
2965
|
+
]
|
|
2714
2966
|
}
|
|
2715
2967
|
}
|
|
2716
2968
|
},
|
|
@@ -3023,6 +3275,11 @@
|
|
|
3023
3275
|
"pattern": "^[a-z]{2}(-[a-z]+)+-\\d+$",
|
|
3024
3276
|
"description": "The AWS region whose CloudTrail drift attribution reads."
|
|
3025
3277
|
},
|
|
3278
|
+
"audit_log_group": {
|
|
3279
|
+
"type": "string",
|
|
3280
|
+
"pattern": "^[A-Za-z0-9._\\-/#]{1,512}$",
|
|
3281
|
+
"description": "The CloudWatch Logs group a CloudTrail trail delivers the state buckets' S3 data events to; terragucci audit reads it to name who wrote a state version no wave or migration recorded."
|
|
3282
|
+
},
|
|
3026
3283
|
"dashboards": {
|
|
3027
3284
|
"anyOf": [
|
|
3028
3285
|
{
|
|
@@ -3117,6 +3374,49 @@
|
|
|
3117
3374
|
],
|
|
3118
3375
|
"description": "Roots each pull request gets a copy of."
|
|
3119
3376
|
},
|
|
3377
|
+
"secrets": {
|
|
3378
|
+
"type": "array",
|
|
3379
|
+
"minItems": 1,
|
|
3380
|
+
"items": {
|
|
3381
|
+
"type": "object",
|
|
3382
|
+
"properties": {
|
|
3383
|
+
"roots": {
|
|
3384
|
+
"type": "array",
|
|
3385
|
+
"minItems": 1,
|
|
3386
|
+
"items": {
|
|
3387
|
+
"type": "string",
|
|
3388
|
+
"pattern": "\\S"
|
|
3389
|
+
}
|
|
3390
|
+
},
|
|
3391
|
+
"from": {
|
|
3392
|
+
"enum": [
|
|
3393
|
+
"aws",
|
|
3394
|
+
"gcp",
|
|
3395
|
+
"azure"
|
|
3396
|
+
]
|
|
3397
|
+
},
|
|
3398
|
+
"values": {
|
|
3399
|
+
"type": "object",
|
|
3400
|
+
"minProperties": 1,
|
|
3401
|
+
"propertyNames": {
|
|
3402
|
+
"type": "string",
|
|
3403
|
+
"pattern": "^(?!(?:[Gg][Ii][Tt][Hh][Uu][Bb]_|[Gg][Ii][Tt][Ee][Aa]_|[Ff][Oo][Rr][Gg][Ee][Jj][Oo]_|[Tt][Gg]_|[Tt][Ee][Rr][Rr][Aa][Gg][Uu][Cc][Cc][Ii]_|[Aa][Ww][Ss]_|[Aa][Rr][Mm]_|[Aa][Zz][Uu][Rr][Ee]_|[Gg][Oo][Oo][Gg][Ll][Ee]_|[Cc][Ll][Oo][Uu][Dd][Ss][Dd][Kk]_))(?!(?:TF_IN_AUTOMATION|TF_INPUT)$)[A-Za-z_][A-Za-z0-9_]*$"
|
|
3404
|
+
},
|
|
3405
|
+
"additionalProperties": {
|
|
3406
|
+
"type": "string",
|
|
3407
|
+
"pattern": "^[^\\s]+$"
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
},
|
|
3411
|
+
"additionalProperties": false,
|
|
3412
|
+
"required": [
|
|
3413
|
+
"roots",
|
|
3414
|
+
"from",
|
|
3415
|
+
"values"
|
|
3416
|
+
]
|
|
3417
|
+
},
|
|
3418
|
+
"description": "Values a root's binary gets from a cloud's secret store, fetched at job time with the root's own identity."
|
|
3419
|
+
},
|
|
3120
3420
|
"environments": {
|
|
3121
3421
|
"type": "object",
|
|
3122
3422
|
"minProperties": 1,
|
package/dist/types.d.ts
CHANGED
|
@@ -36,12 +36,49 @@ export interface ApprovalSettings {
|
|
|
36
36
|
export declare function approvalModeOf(v: Approval | ApprovalSettings | undefined): Approval | undefined;
|
|
37
37
|
/** Whether an `approval:` value refuses unsigned ledger approvals. */
|
|
38
38
|
export declare function requireSignedOf(v: Approval | ApprovalSettings | undefined): boolean;
|
|
39
|
+
/** The keys of a scoped `policy.override` entry. */
|
|
40
|
+
export declare const OVERRIDE_ENTRY_KEYS: readonly ["roots", "who", "roles", "rules"];
|
|
41
|
+
/**
|
|
42
|
+
* A scoped `policy.override` entry (./override.ts): `who` (forge identities
|
|
43
|
+
* or signers) and the holders of `roles` in `.chant/trust.json` at base may
|
|
44
|
+
* override a denial of a root a glob of `roots` matches, for any rule, or
|
|
45
|
+
* with `rules` only when every rule the override names is one of them.
|
|
46
|
+
*/
|
|
47
|
+
export interface OverrideEntry {
|
|
48
|
+
roots: string[];
|
|
49
|
+
who?: string[];
|
|
50
|
+
roles?: string[];
|
|
51
|
+
rules?: string[];
|
|
52
|
+
}
|
|
53
|
+
/** The keys of one `approval_rules` entry. */
|
|
54
|
+
export declare const APPROVAL_RULE_KEYS: readonly ["roots", "count", "roles", "not_author"];
|
|
55
|
+
/**
|
|
56
|
+
* One `approval_rules` entry (./approval-rules.ts): a wave with a root a glob
|
|
57
|
+
* of `roots` matches waits for `count` distinct approvers of its set digest
|
|
58
|
+
* (default 1), each holding one of `roles` in `.chant/trust.json` at base when
|
|
59
|
+
* `roles` is set, and with `not_author` at least one who is not the change's
|
|
60
|
+
* author. Read at base, like `approval:`.
|
|
61
|
+
*/
|
|
62
|
+
export interface ApprovalRuleSettings {
|
|
63
|
+
roots: string[];
|
|
64
|
+
count?: number;
|
|
65
|
+
roles?: string[];
|
|
66
|
+
not_author?: boolean;
|
|
67
|
+
}
|
|
39
68
|
/** Every stage runs on the forge's CI. */
|
|
40
69
|
export declare const RUNTIMES: readonly ["forge"];
|
|
41
70
|
export declare const DEPENDENTS: readonly ["follow", "plan"];
|
|
42
71
|
/** What a pull request does with the dependents of a changed unit when terragrunt.dependents is unset. */
|
|
43
72
|
export declare const DEFAULT_DEPENDENTS: Dependents;
|
|
44
73
|
export declare const POLICY_ENGINES: readonly ["conftest", "opa"];
|
|
74
|
+
/**
|
|
75
|
+
* What a policy rule can do to a root's wave (./report/policy.ts): `deny`
|
|
76
|
+
* fails the root, `hold` makes its wave wait for an approval whatever `gate`
|
|
77
|
+
* says, `allow_unattended` lets a wave whose every changing root it allows
|
|
78
|
+
* apply without one.
|
|
79
|
+
*/
|
|
80
|
+
export declare const POLICY_OUTCOMES: readonly ["deny", "hold", "allow_unattended"];
|
|
81
|
+
export type PolicyOutcome = (typeof POLICY_OUTCOMES)[number];
|
|
45
82
|
export declare const POLICY_INPUTS: readonly ["plan", "hcp"];
|
|
46
83
|
/**
|
|
47
84
|
* When a pull request takes its root locks (`locks:`). `apply` (the default):
|
|
@@ -177,10 +214,19 @@ export interface PolicySettings {
|
|
|
177
214
|
input?: PolicyInput;
|
|
178
215
|
/**
|
|
179
216
|
* Who may override a denial: the forge identities or signers whose recorded
|
|
180
|
-
* override (`terragucci override`) lets `tf-apply` apply one denied plan
|
|
181
|
-
*
|
|
217
|
+
* override (`terragucci override`) lets `tf-apply` apply one denied plan,
|
|
218
|
+
* each for every root and rule, or scoped entries (OverrideEntry) for the
|
|
219
|
+
* roots a glob names. Read at base, like `approval:`. Unset, no override
|
|
220
|
+
* counts.
|
|
221
|
+
*/
|
|
222
|
+
override?: (string | OverrideEntry)[];
|
|
223
|
+
/**
|
|
224
|
+
* The rule outcomes the policy has: `deny` always, and `hold` and
|
|
225
|
+
* `allow_unattended` when listed, read from `hold`, `hold_*`,
|
|
226
|
+
* `allow_unattended` and `allow_unattended_*` rules (engine `opa`). Read
|
|
227
|
+
* at base. Default `[deny]`.
|
|
182
228
|
*/
|
|
183
|
-
|
|
229
|
+
outcomes?: PolicyOutcome[];
|
|
184
230
|
}
|
|
185
231
|
/**
|
|
186
232
|
* The jobs' cloud identities over the forge's OIDC token. `plan_role` and
|
|
@@ -394,6 +440,8 @@ export interface ProjectSettings {
|
|
|
394
440
|
gate?: GateName;
|
|
395
441
|
/** What counts as a waiting wave's approval; see APPROVALS, or a map with the mode and `require_signed` (ApprovalSettings). Read from the config at base, never the applied commit's own. */
|
|
396
442
|
approval?: Approval | ApprovalSettings;
|
|
443
|
+
/** More approvers, or approvers with a role, for the waves whose roots a glob names; see ApprovalRuleSettings. Read from the config at base. */
|
|
444
|
+
approval_rules?: ApprovalRuleSettings[];
|
|
397
445
|
/** When a change applies; see ApplySettings. */
|
|
398
446
|
apply?: ApplySettings;
|
|
399
447
|
/** When a pull request takes its root locks; see LOCKS. */
|
|
@@ -507,6 +555,13 @@ export interface ProjectSettings {
|
|
|
507
555
|
* every job its CI/CD variables already, so there the key changes nothing.
|
|
508
556
|
*/
|
|
509
557
|
pass?: PassSettings;
|
|
558
|
+
/**
|
|
559
|
+
* Values fetched at job time from a cloud's secret store, by root glob,
|
|
560
|
+
* with the identity the root plans or applies with (./root-secrets.ts), and
|
|
561
|
+
* set in that root's binary environment alone. Read from the project's
|
|
562
|
+
* terragucci.yml by the stage.
|
|
563
|
+
*/
|
|
564
|
+
secrets?: SecretSource[];
|
|
510
565
|
/**
|
|
511
566
|
* The secret holding `OTEL_EXPORTER_OTLP_HEADERS`, such as a collector's API
|
|
512
567
|
* key, and `trace_url`: a link to a run's trace with `{trace_id}` in it
|
|
@@ -560,6 +615,13 @@ export interface ProjectSettings {
|
|
|
560
615
|
decide?: DecideSettings;
|
|
561
616
|
/** The AWS region whose CloudTrail drift attribution reads. Default: the region the aws CLI already uses. */
|
|
562
617
|
audit_region?: string;
|
|
618
|
+
/**
|
|
619
|
+
* The CloudWatch Logs group a CloudTrail trail delivers the state buckets'
|
|
620
|
+
* S3 data events to, in `audit_region`: `terragucci audit` reads it to name
|
|
621
|
+
* who wrote a state version no wave or migration recorded. Read by the
|
|
622
|
+
* audit job where it runs; no project's jobs read it.
|
|
623
|
+
*/
|
|
624
|
+
audit_log_group?: string;
|
|
563
625
|
/** Dashboards and alert rules written next to the pipeline. Off unless set. */
|
|
564
626
|
dashboards?: boolean | DashboardSettings;
|
|
565
627
|
/**
|
|
@@ -666,6 +728,43 @@ export interface PassSettings {
|
|
|
666
728
|
secrets?: string[];
|
|
667
729
|
vars?: string[];
|
|
668
730
|
}
|
|
731
|
+
/** The clouds whose secret store `secrets` reads. */
|
|
732
|
+
export declare const SECRET_STORES: readonly ["aws", "gcp", "azure"];
|
|
733
|
+
export type SecretStore = (typeof SECRET_STORES)[number];
|
|
734
|
+
/** The keys of one `secrets` entry. */
|
|
735
|
+
export declare const SECRET_SOURCE_KEYS: string[];
|
|
736
|
+
/**
|
|
737
|
+
* One `secrets` entry: the roots its globs match get each of `values`, an
|
|
738
|
+
* environment variable name mapped to where the value is in `from`'s secret
|
|
739
|
+
* store, with `#<key>` to take one key of a JSON secret:
|
|
740
|
+
*
|
|
741
|
+
* aws a Secrets Manager secret's name or ARN: `prod/app/db#password`
|
|
742
|
+
* gcp a Secret Manager secret, its version `latest` unless named:
|
|
743
|
+
* `projects/<project>/secrets/<secret>[/versions/<version>]`
|
|
744
|
+
* azure a Key Vault secret, its current version unless named:
|
|
745
|
+
* `<vault>/<secret>[/<version>]`, the vault a name or a host
|
|
746
|
+
*/
|
|
747
|
+
export interface SecretSource {
|
|
748
|
+
roots: string[];
|
|
749
|
+
from: SecretStore;
|
|
750
|
+
values: Record<string, string>;
|
|
751
|
+
}
|
|
752
|
+
/** Where a value is in each store, as `secrets` takes it. */
|
|
753
|
+
export declare const SECRET_PATH: Record<SecretStore, string>;
|
|
754
|
+
/** Names `secrets` refuses beside `pass`'s: the variables a root's binary takes its cloud identity from. */
|
|
755
|
+
export declare const SECRET_IDENTITY_PREFIXES: string[];
|
|
756
|
+
/** Why `secrets` is refused beside `waves.compose`: a composed run plans its roots in one binary environment. */
|
|
757
|
+
export declare const SECRETS_COMPOSE = "a composed run plans and applies its roots in one run, and secrets sets each value in its own root's binary environment alone; leave waves.compose unset";
|
|
758
|
+
/** Why `secrets` is refused beside `ephemeral`: a pull request's copies plan and apply without the store's values. */
|
|
759
|
+
export declare const SECRETS_EPHEMERAL = "an ephemeral copy plans and applies without the values secrets fetches; leave ephemeral unset, or keep the copies' values in pass.secrets";
|
|
760
|
+
/**
|
|
761
|
+
* The problems with `secrets`: a list of entries, each with root globs, a
|
|
762
|
+
* store and names mapped to paths in it. `whole` when `s` is a repo's own
|
|
763
|
+
* file: then a name `pass` or `env` sets too, a store whose cloud `oidc`
|
|
764
|
+
* does not configure, and the keys that plan or apply a root without its
|
|
765
|
+
* values are refused as well.
|
|
766
|
+
*/
|
|
767
|
+
export declare function secretsProblems(v: unknown, where: string, s: ProjectSettings, whole: boolean): string[];
|
|
669
768
|
/** Whether `runner` is a map of stage to runner, rather than one runner. */
|
|
670
769
|
export declare function runnerByStage(v: RunnerSettings): v is Partial<Record<RunnerStage | "default", RunnerSpec>>;
|
|
671
770
|
export declare const JOB_LABEL: RegExp;
|
|
@@ -705,7 +804,7 @@ export declare const BUILT_IN: ResolvedSettings;
|
|
|
705
804
|
* own clone URL and `rollouts` belongs to a single repo, so `defaults`
|
|
706
805
|
* refuses both.
|
|
707
806
|
*/
|
|
708
|
-
export declare const PROJECT_FILE_KEYS: readonly ["policy", "sources", "reports", "approval", "gate", "roots", "waves", "parallelism", "synth", "steps", "drift", "cost", "tips", "runtime", "telemetry", "respond", "review", "decide", "audit_region", "modules", "terragrunt", "token_env", "generate", "ephemeral", "environments"];
|
|
807
|
+
export declare const PROJECT_FILE_KEYS: readonly ["policy", "sources", "reports", "approval", "approval_rules", "gate", "roots", "waves", "parallelism", "synth", "steps", "drift", "cost", "tips", "runtime", "telemetry", "respond", "review", "decide", "audit_region", "modules", "terragrunt", "token_env", "generate", "ephemeral", "environments", "secrets"];
|
|
709
808
|
export declare class ConfigError extends Error {
|
|
710
809
|
/** Every problem found, when the error is a validation failure. */
|
|
711
810
|
readonly problems?: string[];
|
|
@@ -865,6 +964,12 @@ export declare const POINT_NAME: RegExp;
|
|
|
865
964
|
export declare const APPLY_BRANCH: RegExp;
|
|
866
965
|
/** Why `apply.branches` is refused with `apply.when: pull-request`. */
|
|
867
966
|
export declare const BRANCHES_NOT_PR_APPLY = "apply.when: pull-request applies an open pull request into the default branch, and a push applies nothing, so no branch could apply its roots; leave apply.branches unset";
|
|
967
|
+
/** A role name, as `.chant/trust.json` names one under `roles`. */
|
|
968
|
+
export declare const TRUST_ROLE: RegExp;
|
|
969
|
+
/** Why `roles` and `not_author` need a mode that proves who approved. */
|
|
970
|
+
export declare const LEDGER_PROVES_NOBODY = "approval: ledger does not prove who wrote an approval, so it cannot tell a role or the author; set approval to sealed or pr-review";
|
|
971
|
+
/** Why an override's role needs `approval: sealed`. */
|
|
972
|
+
export declare const OVERRIDE_ROLE_NEEDS_SEALED = "an override names whoever wrote it, and only approval: sealed proves who that was, so a role cannot be checked; set approval to sealed, or name the people in who";
|
|
868
973
|
/** Where a shared policy is fetched from: the git URL and the ref. */
|
|
869
974
|
export interface PolicySource {
|
|
870
975
|
url: string;
|
package/package.json
CHANGED