@suss/terraform-aws 0.9.0 → 0.10.0
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 +8 -0
- package/dist/index.cjs +31 -0
- package/dist/index.js +31 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,12 +21,20 @@ terraformFileToSummaries("infra/terraform/dynamodb", { packs: [awsTerraform()] }
|
|
|
21
21
|
| --- | --- |
|
|
22
22
|
| `aws_dynamodb_table` | a store, keyed by `hash_key` and `range_key`, with each `global_secondary_index` and `local_secondary_index` as its own way in |
|
|
23
23
|
| `aws_s3_bucket` | a store whose objects have no fields to compare against |
|
|
24
|
+
| `aws_elasticache_cluster` | a Redis store, when `engine` is `redis` or `valkey`; a Memcached cluster is skipped |
|
|
25
|
+
| `aws_elasticache_replication_group` | a Redis store |
|
|
24
26
|
| `aws_sqs_queue` | a channel |
|
|
25
27
|
| `aws_sns_topic` | a channel |
|
|
26
28
|
| `aws_cloudwatch_event_bus` | a channel |
|
|
27
29
|
|
|
28
30
|
Everything else a configuration declares, a security group, a subnet, an IAM policy, is how the deployment is wired rather than something a caller addresses, so nothing reads it.
|
|
29
31
|
|
|
32
|
+
## Why a Redis cluster pairs with nothing
|
|
33
|
+
|
|
34
|
+
Code addresses Redis by key namespace: `@suss/framework-redis` reads `session:{id}` and records the container `session`. A cluster declares no namespaces; its `cluster_id` is a deployment name, and code never spells it. The two sides share no name either can state, so the entry says so: the summary declares the store exists, with no container name, and the storage check claims no access for it. A pair between a cluster called `session` and the `session` namespace would be a coincidence between a deployment name and a key prefix, so the entry refuses it rather than reporting it.
|
|
35
|
+
|
|
36
|
+
What you get from the entry is visibility: `suss contract --from terraform` shows the cluster, and `suss check` reports it as a declared store nothing paired with. Namespace-level pairing stays between the code's own readers and writers of the same keys.
|
|
37
|
+
|
|
30
38
|
## Why every entry states a version range
|
|
31
39
|
|
|
32
40
|
The provider moves things between releases. Version 4 split a bucket's settings into resources of their own, 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 that describes the v4 shape says so, and a configuration pinned to v3 is read by the entries written for v3 and by none of the others.
|
package/dist/index.cjs
CHANGED
|
@@ -71,6 +71,37 @@ function awsTerraform() {
|
|
|
71
71
|
fieldSet: "none"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
resource: "aws_elasticache_cluster",
|
|
76
|
+
providerVersions: CURRENT,
|
|
77
|
+
// A cluster with no engine of its own joins a replication
|
|
78
|
+
// group, which always runs one of the two Redis-protocol
|
|
79
|
+
// engines, so an unset engine is read.
|
|
80
|
+
appliesWhen: {
|
|
81
|
+
attribute: "engine",
|
|
82
|
+
equals: ["redis", "valkey"],
|
|
83
|
+
whenUnset: "read"
|
|
84
|
+
},
|
|
85
|
+
boundary: {
|
|
86
|
+
kind: "storage",
|
|
87
|
+
storageSystem: "redis",
|
|
88
|
+
// Code addresses key namespaces, which no attribute of a
|
|
89
|
+
// cluster lists, so the cluster declares the store and
|
|
90
|
+
// claims no access. The README says how the sides meet.
|
|
91
|
+
declares: "store",
|
|
92
|
+
fieldSet: "none"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
resource: "aws_elasticache_replication_group",
|
|
97
|
+
providerVersions: CURRENT,
|
|
98
|
+
boundary: {
|
|
99
|
+
kind: "storage",
|
|
100
|
+
storageSystem: "redis",
|
|
101
|
+
declares: "store",
|
|
102
|
+
fieldSet: "none"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
74
105
|
{
|
|
75
106
|
resource: "aws_sqs_queue",
|
|
76
107
|
providerVersions: CURRENT,
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,37 @@ function awsTerraform() {
|
|
|
46
46
|
fieldSet: "none"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
+
{
|
|
50
|
+
resource: "aws_elasticache_cluster",
|
|
51
|
+
providerVersions: CURRENT,
|
|
52
|
+
// A cluster with no engine of its own joins a replication
|
|
53
|
+
// group, which always runs one of the two Redis-protocol
|
|
54
|
+
// engines, so an unset engine is read.
|
|
55
|
+
appliesWhen: {
|
|
56
|
+
attribute: "engine",
|
|
57
|
+
equals: ["redis", "valkey"],
|
|
58
|
+
whenUnset: "read"
|
|
59
|
+
},
|
|
60
|
+
boundary: {
|
|
61
|
+
kind: "storage",
|
|
62
|
+
storageSystem: "redis",
|
|
63
|
+
// Code addresses key namespaces, which no attribute of a
|
|
64
|
+
// cluster lists, so the cluster declares the store and
|
|
65
|
+
// claims no access. The README says how the sides meet.
|
|
66
|
+
declares: "store",
|
|
67
|
+
fieldSet: "none"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
resource: "aws_elasticache_replication_group",
|
|
72
|
+
providerVersions: CURRENT,
|
|
73
|
+
boundary: {
|
|
74
|
+
kind: "storage",
|
|
75
|
+
storageSystem: "redis",
|
|
76
|
+
declares: "store",
|
|
77
|
+
fieldSet: "none"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
49
80
|
{
|
|
50
81
|
resource: "aws_sqs_queue",
|
|
51
82
|
providerVersions: CURRENT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/terraform-aws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "What AWS's Terraform provider declares, for the Terraform contract reader.",
|
|
6
6
|
"keywords": [
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typecheck": "tsc --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@suss/contract-terraform": "0.
|
|
47
|
+
"@suss/contract-terraform": "0.10.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@suss/behavioral-ir": "*",
|