@suss/terraform-aws 0.33.1 → 0.34.1
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/README.md +9 -9
- package/dist/index.cjs +4 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @suss/terraform-aws
|
|
2
2
|
|
|
3
|
-
Part of [suss](https://github.com/nimbuscloud-ai/suss), which reads both sides of every call in a repository and
|
|
3
|
+
Part of [suss](https://github.com/nimbuscloud-ai/suss), which reads both sides of every call in a repository and reports where the two disagree.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This pack declares what the AWS Terraform provider's resources are, for `@suss/contract-terraform` to read.
|
|
6
6
|
|
|
7
7
|
## What this package is
|
|
8
8
|
|
|
9
|
-
A pack, and nothing
|
|
9
|
+
A pack, made of data and nothing else. The reader walks HCL and has no knowledge of any provider. This pack declares that `aws_dynamodb_table` is a store keyed by `hash_key` and `range_key`, that `aws_sqs_queue` is a channel, and which provider versions each of those declarations applies to.
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
12
|
import { terraformFileToSummaries } from "@suss/contract-terraform";
|
|
@@ -37,13 +37,13 @@ terraformFileToSummaries("infra/terraform/dynamodb", { packs: [awsTerraform()] }
|
|
|
37
37
|
| `aws_lambda_function` | a deployable, with the variables it sets and the handler it calls |
|
|
38
38
|
| `aws_ecs_task_definition` | a deployable per container, with that container's variables, secrets and image |
|
|
39
39
|
|
|
40
|
-
Everything else a configuration declares, a security group, a subnet
|
|
40
|
+
Everything else a configuration declares, such as a security group, a subnet or an IAM policy, is part of how the deployment is wired and is not something a caller addresses. So nothing reads it.
|
|
41
41
|
|
|
42
|
-
A database instance and a Redis cluster are the two that pair with
|
|
42
|
+
A database instance and a Redis cluster are the two that do not pair with anything. Code addresses tables and key namespaces inside them, and no attribute of either lists those, so each one declares the store and claims no access. Kinesis does not pair with anything yet either, since no code pack records a send to a stream. [Why each entry reads what it reads](./DESIGN.md) explains each of these, and what an alarm and a metric filter have in common.
|
|
43
43
|
|
|
44
44
|
## Why every entry states a version range
|
|
45
45
|
|
|
46
|
-
The provider moves things between releases. Version 4 split a bucket's settings into resources
|
|
46
|
+
The provider moves things around between releases. Version 4 split a bucket's settings into separate resources, so `aws_s3_bucket_server_side_encryption_configuration` is a separate resource in a v4 configuration and an inline block in a v3 one. An entry written for the v4 layout declares that, and a configuration pinned to v3 is read only by the entries written for v3.
|
|
47
47
|
|
|
48
48
|
A configuration states its own pin:
|
|
49
49
|
|
|
@@ -55,7 +55,7 @@ terraform {
|
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
The reader takes that pin and
|
|
58
|
+
The reader takes that pin and passes it to the pack. A configuration with no pin is read by every entry, since nothing rules any of them out.
|
|
59
59
|
|
|
60
60
|
Every entry here was written against `>=4 <7`, from these pages of the provider's own documentation:
|
|
61
61
|
|
|
@@ -68,10 +68,10 @@ Every entry here was written against `>=4 <7`, from these pages of the provider'
|
|
|
68
68
|
|
|
69
69
|
## Where it fits in suss
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
The pack depends on `@suss/contract-terraform` for the type of an entry, and on `@suss/ir-core` for the variables each deployment target injects by itself. A pack for another provider, such as `google` or `cloudflare`, is the same file with different entries.
|
|
72
72
|
|
|
73
73
|
## More
|
|
74
74
|
|
|
75
|
-
- [
|
|
75
|
+
- [Why each entry reads what it reads](./DESIGN.md)
|
|
76
76
|
- [Documentation](https://suss.sh/)
|
|
77
77
|
- [Source and issues](https://github.com/nimbuscloud-ai/suss)
|
package/dist/index.cjs
CHANGED
|
@@ -113,8 +113,8 @@ function awsTerraform() {
|
|
|
113
113
|
kind: "storage",
|
|
114
114
|
storageSystem: CACHE_ENGINES,
|
|
115
115
|
// Code addresses key namespaces, which no attribute of a
|
|
116
|
-
// cluster lists, so the cluster declares the store and
|
|
117
|
-
//
|
|
116
|
+
// cluster lists, so the cluster declares the store and claims
|
|
117
|
+
// no access. DESIGN.md explains why.
|
|
118
118
|
declares: "store",
|
|
119
119
|
fieldSet: "none"
|
|
120
120
|
}
|
|
@@ -182,9 +182,8 @@ function awsTerraform() {
|
|
|
182
182
|
boundary: {
|
|
183
183
|
kind: "metric",
|
|
184
184
|
metricSystem: METRIC_SYSTEM,
|
|
185
|
-
// CloudWatch identifies a metric by its namespace and its
|
|
186
|
-
//
|
|
187
|
-
// identity the two sides share.
|
|
185
|
+
// CloudWatch identifies a metric by its namespace and its name
|
|
186
|
+
// together, and an alarm writes both, so the identity uses both.
|
|
188
187
|
metricTypeTemplate: "{metric_transformation.namespace}/{metric_transformation.name}"
|
|
189
188
|
}
|
|
190
189
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -3,11 +3,11 @@ import { TerraformPack } from '@suss/contract-terraform';
|
|
|
3
3
|
/**
|
|
4
4
|
* What AWS's Terraform provider declares, as far as suss reads it.
|
|
5
5
|
*
|
|
6
|
-
* Every entry
|
|
6
|
+
* Every entry lists the provider versions it describes. The provider
|
|
7
7
|
* moves things between releases, so a configuration pinned to one major
|
|
8
|
-
* is read by the entries written for it
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* version is read only by the entries written for it. Version 4 split a
|
|
9
|
+
* bucket's settings into resources of their own, so the bucket entry
|
|
10
|
+
* starts there. DESIGN.md explains why each entry reads what it reads.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
declare function awsTerraform(): TerraformPack;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { TerraformPack } from '@suss/contract-terraform';
|
|
|
3
3
|
/**
|
|
4
4
|
* What AWS's Terraform provider declares, as far as suss reads it.
|
|
5
5
|
*
|
|
6
|
-
* Every entry
|
|
6
|
+
* Every entry lists the provider versions it describes. The provider
|
|
7
7
|
* moves things between releases, so a configuration pinned to one major
|
|
8
|
-
* is read by the entries written for it
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* version is read only by the entries written for it. Version 4 split a
|
|
9
|
+
* bucket's settings into resources of their own, so the bucket entry
|
|
10
|
+
* starts there. DESIGN.md explains why each entry reads what it reads.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
declare function awsTerraform(): TerraformPack;
|
package/dist/index.js
CHANGED
|
@@ -88,8 +88,8 @@ function awsTerraform() {
|
|
|
88
88
|
kind: "storage",
|
|
89
89
|
storageSystem: CACHE_ENGINES,
|
|
90
90
|
// Code addresses key namespaces, which no attribute of a
|
|
91
|
-
// cluster lists, so the cluster declares the store and
|
|
92
|
-
//
|
|
91
|
+
// cluster lists, so the cluster declares the store and claims
|
|
92
|
+
// no access. DESIGN.md explains why.
|
|
93
93
|
declares: "store",
|
|
94
94
|
fieldSet: "none"
|
|
95
95
|
}
|
|
@@ -157,9 +157,8 @@ function awsTerraform() {
|
|
|
157
157
|
boundary: {
|
|
158
158
|
kind: "metric",
|
|
159
159
|
metricSystem: METRIC_SYSTEM,
|
|
160
|
-
// CloudWatch identifies a metric by its namespace and its
|
|
161
|
-
//
|
|
162
|
-
// identity the two sides share.
|
|
160
|
+
// CloudWatch identifies a metric by its namespace and its name
|
|
161
|
+
// together, and an alarm writes both, so the identity uses both.
|
|
163
162
|
metricTypeTemplate: "{metric_transformation.namespace}/{metric_transformation.name}"
|
|
164
163
|
}
|
|
165
164
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/terraform-aws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "What the AWS Terraform provider declares, so suss can check your code against the infrastructure you deploy.",
|
|
6
6
|
"keywords": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
15
|
"author": "Nimbus Cloud AI LLC",
|
|
16
|
-
"homepage": "https://
|
|
16
|
+
"homepage": "https://suss.sh",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/nimbuscloud-ai/suss.git",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typecheck": "tsc --noEmit"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@suss/contract-terraform": "0.
|
|
49
|
+
"@suss/contract-terraform": "0.34.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@suss/behavioral-ir": "*",
|