@intentius/chant-lexicon-aws 0.18.37 → 0.19.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.
@@ -1053,7 +1053,7 @@ export const PinpointEventStream = createResource("AWS::Pinpoint::EventStream",
1053
1053
  export const PinpointSegment = createResource("AWS::Pinpoint::Segment", "aws", {"SegmentId":"SegmentId","Arn":"Arn"});
1054
1054
  export const Pipe = createResource("AWS::Pipes::Pipe", "aws", {"Arn":"Arn","CreationTime":"CreationTime","CurrentState":"CurrentState","LastModifiedTime":"LastModifiedTime","StateReason":"StateReason"});
1055
1055
  export const PlaceIndex = createResource("AWS::Location::PlaceIndex", "aws", {"CreateTime":"CreateTime","Arn":"Arn","IndexArn":"IndexArn","UpdateTime":"UpdateTime"});
1056
- export const PlacementGroup = createResource("AWS::EC2::PlacementGroup", "aws", {"GroupName":"GroupName"});
1056
+ export const PlacementGroup = createResource("AWS::EC2::PlacementGroup", "aws", {"GroupName":"GroupName","GroupId":"GroupId"});
1057
1057
  export const PlaybackConfiguration = createResource("AWS::MediaTailor::PlaybackConfiguration", "aws", {"SessionInitializationEndpointPrefix":"SessionInitializationEndpointPrefix","HlsConfiguration_ManifestEndpointPrefix":"HlsConfiguration.ManifestEndpointPrefix","DashConfiguration_ManifestEndpointPrefix":"DashConfiguration.ManifestEndpointPrefix","PlaybackConfigurationArn":"PlaybackConfigurationArn","PlaybackEndpointPrefix":"PlaybackEndpointPrefix"});
1058
1058
  export const PlaybackKeyPair = createResource("AWS::IVS::PlaybackKeyPair", "aws", {"Arn":"Arn","Fingerprint":"Fingerprint"});
1059
1059
  export const PlaybackRestrictionPolicy = createResource("AWS::IVS::PlaybackRestrictionPolicy", "aws", {"Arn":"Arn"});
@@ -1137,7 +1137,7 @@ export const RateBasedRule = createResource("AWS::WAFRegional::RateBasedRule", "
1137
1137
  export const RbinRule = createResource("AWS::Rbin::Rule", "aws", {"Arn":"Arn","Identifier":"Identifier","LockState":"LockState"});
1138
1138
  export const RDSDBClusterParameterGroup = createResource("AWS::RDS::DBClusterParameterGroup", "aws", {});
1139
1139
  export const RDSDBParameterGroup = createResource("AWS::RDS::DBParameterGroup", "aws", {});
1140
- export const RDSDBSubnetGroup = createResource("AWS::RDS::DBSubnetGroup", "aws", {});
1140
+ export const RDSDBSubnetGroup = createResource("AWS::RDS::DBSubnetGroup", "aws", {"DBSubnetGroupArn":"DBSubnetGroupArn"});
1141
1141
  export const RDSEventSubscription = createResource("AWS::RDS::EventSubscription", "aws", {});
1142
1142
  export const RDSGlobalCluster = createResource("AWS::RDS::GlobalCluster", "aws", {"GlobalEndpoint":"GlobalEndpoint"});
1143
1143
  export const RDSIntegration = createResource("AWS::RDS::Integration", "aws", {"IntegrationArn":"IntegrationArn","CreateTime":"CreateTime"});
@@ -3183,6 +3183,9 @@ export const ComputeEnvironmentOrder = createProperty("AWS::Batch::JobQueue.Comp
3183
3183
  export const ComputeLimits = createProperty("AWS::EMR::Cluster.ComputeLimits", "aws");
3184
3184
  export const ComputeNodeGroup_ErrorInfo = createProperty("AWS::PCS::ComputeNodeGroup.ErrorInfo", "aws");
3185
3185
  export const ComputeNodeGroup_InstanceConfig = createProperty("AWS::PCS::ComputeNodeGroup.InstanceConfig", "aws");
3186
+ export const ComputeNodeGroup_NodeLifecycleActions = createProperty("AWS::PCS::ComputeNodeGroup.NodeLifecycleActions", "aws");
3187
+ export const ComputeNodeGroup_NodeLifecycleScript = createProperty("AWS::PCS::ComputeNodeGroup.NodeLifecycleScript", "aws");
3188
+ export const ComputeNodeGroup_NodeLifecycleStages = createProperty("AWS::PCS::ComputeNodeGroup.NodeLifecycleStages", "aws");
3186
3189
  export const ComputeNodeGroupConfiguration = createProperty("AWS::PCS::Queue.ComputeNodeGroupConfiguration", "aws");
3187
3190
  export const ComputeOptimizerAutomationRule_Criteria = createProperty("AWS::ComputeOptimizer::AutomationRule.Criteria", "aws");
3188
3191
  export const ComputeOptimizerAutomationRule_OrganizationConfiguration = createProperty("AWS::ComputeOptimizer::AutomationRule.OrganizationConfiguration", "aws");
@@ -7398,6 +7401,9 @@ export const Nodegroup_UpdateConfig = createProperty("AWS::EKS::Nodegroup.Update
7398
7401
  export const Nodegroup_WarmPoolConfig = createProperty("AWS::EKS::Nodegroup.WarmPoolConfig", "aws");
7399
7402
  export const NodeGroupConfiguration = createProperty("AWS::ElastiCache::ReplicationGroup.NodeGroupConfiguration", "aws");
7400
7403
  export const NodeInterfaceMapping = createProperty("AWS::MediaLive::Node.NodeInterfaceMapping", "aws");
7404
+ export const NodeLifecycleActions = createProperty("AWS::PCS::ComputeNodeGroup.NodeLifecycleActions", "aws");
7405
+ export const NodeLifecycleScript = createProperty("AWS::PCS::ComputeNodeGroup.NodeLifecycleScript", "aws");
7406
+ export const NodeLifecycleStages = createProperty("AWS::PCS::ComputeNodeGroup.NodeLifecycleStages", "aws");
7401
7407
  export const NodeOption = createProperty("AWS::OpenSearchService::Domain.NodeOption", "aws");
7402
7408
  export const NodeProperties = createProperty("AWS::Batch::JobDefinition.NodeProperties", "aws");
7403
7409
  export const NodeRangeProperty = createProperty("AWS::Batch::JobDefinition.NodeRangeProperty", "aws");
@@ -17336,6 +17336,21 @@
17336
17336
  "kind": "property",
17337
17337
  "lexicon": "aws"
17338
17338
  },
17339
+ "ComputeNodeGroup_NodeLifecycleActions": {
17340
+ "resourceType": "AWS::PCS::ComputeNodeGroup.NodeLifecycleActions",
17341
+ "kind": "property",
17342
+ "lexicon": "aws"
17343
+ },
17344
+ "ComputeNodeGroup_NodeLifecycleScript": {
17345
+ "resourceType": "AWS::PCS::ComputeNodeGroup.NodeLifecycleScript",
17346
+ "kind": "property",
17347
+ "lexicon": "aws"
17348
+ },
17349
+ "ComputeNodeGroup_NodeLifecycleStages": {
17350
+ "resourceType": "AWS::PCS::ComputeNodeGroup.NodeLifecycleStages",
17351
+ "kind": "property",
17352
+ "lexicon": "aws"
17353
+ },
17339
17354
  "ComputeOptimizerAutomationRule": {
17340
17355
  "resourceType": "AWS::ComputeOptimizer::AutomationRule",
17341
17356
  "kind": "resource",
@@ -30411,13 +30426,10 @@
30411
30426
  "createOnly": [
30412
30427
  "ServiceType",
30413
30428
  "ServiceDetails/Dynatrace",
30414
- "ServiceDetails/MCPServer",
30415
30429
  "ServiceDetails/MCPServerSplunk",
30416
- "ServiceDetails/MCPServerNewRelic",
30417
30430
  "ServiceDetails/ServiceNow",
30418
30431
  "ServiceDetails/PagerDuty",
30419
30432
  "ServiceDetails/AzureIdentity",
30420
- "ServiceDetails/MCPServerGrafana",
30421
30433
  "KmsKeyArn"
30422
30434
  ],
30423
30435
  "writeOnly": [
@@ -65631,6 +65643,21 @@
65631
65643
  "kind": "property",
65632
65644
  "lexicon": "aws"
65633
65645
  },
65646
+ "NodeLifecycleActions": {
65647
+ "resourceType": "AWS::PCS::ComputeNodeGroup.NodeLifecycleActions",
65648
+ "kind": "property",
65649
+ "lexicon": "aws"
65650
+ },
65651
+ "NodeLifecycleScript": {
65652
+ "resourceType": "AWS::PCS::ComputeNodeGroup.NodeLifecycleScript",
65653
+ "kind": "property",
65654
+ "lexicon": "aws"
65655
+ },
65656
+ "NodeLifecycleStages": {
65657
+ "resourceType": "AWS::PCS::ComputeNodeGroup.NodeLifecycleStages",
65658
+ "kind": "property",
65659
+ "lexicon": "aws"
65660
+ },
65634
65661
  "NodeOption": {
65635
65662
  "resourceType": "AWS::OpenSearchService::Domain.NodeOption",
65636
65663
  "kind": "property",
@@ -71810,7 +71837,8 @@
71810
71837
  "kind": "resource",
71811
71838
  "lexicon": "aws",
71812
71839
  "attrs": {
71813
- "GroupName": "GroupName"
71840
+ "GroupName": "GroupName",
71841
+ "GroupId": "GroupId"
71814
71842
  },
71815
71843
  "createOnly": [
71816
71844
  "Tags",
@@ -77039,6 +77067,9 @@
77039
77067
  "resourceType": "AWS::RDS::DBSubnetGroup",
77040
77068
  "kind": "resource",
77041
77069
  "lexicon": "aws",
77070
+ "attrs": {
77071
+ "DBSubnetGroupArn": "DBSubnetGroupArn"
77072
+ },
77042
77073
  "createOnly": [
77043
77074
  "DBSubnetGroupName"
77044
77075
  ],
package/src/plugin.ts CHANGED
@@ -461,6 +461,44 @@ aws cloudformation wait stack-update-complete --stack-name my-app-prod`,
461
461
  },
462
462
  ],
463
463
  },
464
+ {
465
+ file: "chant-aws-carve-terraform.md",
466
+ name: "chant-aws-carve-terraform",
467
+ description: "Demo carving a resource out of Terraform into native chant — advise, emit, bridge, apply — fully offline",
468
+ triggers: [
469
+ { type: "context", value: "terraform" },
470
+ { type: "context", value: "carve" },
471
+ { type: "context", value: "migrate" },
472
+ { type: "file-pattern", value: "**/*.tf" },
473
+ { type: "file-pattern", value: "**/terraform.tfstate" },
474
+ ],
475
+ preConditions: [
476
+ "chant CLI is installed (chant --version succeeds)",
477
+ "@cdktf/hcl2json is installed (npm install -D @cdktf/hcl2json)",
478
+ ],
479
+ parameters: [
480
+ {
481
+ name: "address",
482
+ description: "Terraform address to carve, e.g. aws_s3_bucket.assets",
483
+ type: "string",
484
+ required: false,
485
+ },
486
+ ],
487
+ examples: [
488
+ {
489
+ title: "Run the offline demo",
490
+ description: "Demo the full advise → emit → bridge → apply loop with no cloud",
491
+ input: "Show me how chant carves a resource out of Terraform",
492
+ output: "cd examples/terraform-carve-out && ./demo.sh",
493
+ },
494
+ {
495
+ title: "Adopt a resource from state",
496
+ description: "Emit native chant source for a Terraform-managed resource, offline",
497
+ input: "Adopt aws_s3_bucket.assets into chant",
498
+ output: "chant carve emit --from ./terraform --select aws_s3_bucket.assets --state ./terraform/terraform.tfstate",
499
+ },
500
+ ],
501
+ },
464
502
  ]),
465
503
 
466
504
  completionProvider(ctx: CompletionContext): CompletionItem[] {
@@ -0,0 +1,102 @@
1
+ ---
2
+ skill: chant-aws-carve-terraform
3
+ description: Demo carving a resource out of Terraform into native chant — advise, emit, bridge, apply — fully offline
4
+ user-invocable: true
5
+ ---
6
+
7
+ # Carve a resource out of Terraform (demo)
8
+
9
+ Use this skill to cleanly demonstrate chant's Terraform carve-out flow for
10
+ someone. The whole demo runs **offline** — no cloud account, no Terraform
11
+ binary, no state backend. It carves an AWS S3 bucket out of a small Terraform
12
+ estate into native chant source, patches the survivors, and plans the
13
+ graduation.
14
+
15
+ ## When to use
16
+
17
+ - Someone asks "how does chant move things off Terraform?"
18
+ - You want to show the advise → emit → bridge → apply loop end to end.
19
+ - You are evaluating whether a Terraform estate is worth carving.
20
+
21
+ ## Preconditions
22
+
23
+ - `chant --version` succeeds.
24
+ - `@cdktf/hcl2json` is installed (the HCL parser). If a command reports it is
25
+ missing, run `npm install -D @cdktf/hcl2json` once.
26
+
27
+ ## The fastest path: run the bundled demo
28
+
29
+ The `examples/terraform-carve-out` example ships a runnable estate + state and a
30
+ script that runs all four steps with commentary:
31
+
32
+ ```bash
33
+ cd examples/terraform-carve-out
34
+ ./demo.sh
35
+ ```
36
+
37
+ Walk the person through the output. That is the whole demo.
38
+
39
+ ## Driving it step by step (to explain each stage)
40
+
41
+ From `examples/terraform-carve-out`, with `TF=./terraform`:
42
+
43
+ 1. **Advise — what is cheap to carve.**
44
+ ```bash
45
+ chant carve advise --from ./terraform
46
+ ```
47
+ Point out the three bands: clean leaves (carve now), carvable with edits,
48
+ and leave-in-Terraform. `aws_s3_bucket.assets` is a clean leaf held back one
49
+ notch by the Lambda that reads it; `random_pet` has no native mapping.
50
+
51
+ 2. **Emit — adopt the bucket into chant source, offline, from state.**
52
+ ```bash
53
+ chant carve emit --from ./terraform --select aws_s3_bucket.assets \
54
+ --state ./terraform/terraform.tfstate --output ./carveout
55
+ ```
56
+ Show `./carveout/assets.ts` — a real `new Bucket({ BucketName, Tags })` with
57
+ CloudFormation-style properties mapped from the Terraform state attributes.
58
+ Explain: a Terraform-managed resource is not in any CloudFormation stack, so
59
+ the correct source of its live shape is the state file, not a cloud read.
60
+
61
+ 3. **Lint the inherited resource — optional, offer it.**
62
+ ```bash
63
+ chant lint ./carveout --lexicon aws
64
+ ```
65
+ After emit, offer to lint the carved source. chant audits the resource you
66
+ inherited from Terraform against the AWS lexicon's rules. Findings have a
67
+ severity: `error` (must fix before `chant build` will emit — e.g. an S3
68
+ bucket with no public-access block) and `warning`/`info` (advisory — e.g.
69
+ DynamoDB point-in-time recovery). This is a feature of carving: chant
70
+ immediately tells the person what is wrong with what they adopted. Whether to
71
+ fix an advisory finding is their call; errors block the build until resolved.
72
+
73
+ 4. **Bridge — patch the surviving Terraform.**
74
+ ```bash
75
+ chant carve bridge --from ./terraform --select aws_s3_bucket.assets --output ./carveout
76
+ ```
77
+ Show the generated `data "aws_s3_bucket" "assets"` and the rewired survivor.
78
+ Emphasize it is dry-run: nothing in `./terraform` changed. `--apply-rewrites`
79
+ would edit it in place.
80
+
81
+ 5. **Apply — graduation plan.**
82
+ ```bash
83
+ chant carve apply --from ./terraform --select aws_s3_bucket.assets --env prod --stack assets
84
+ ```
85
+ Show the ownership marker (`chant:managed-by/stack/env`) and the finalized
86
+ runbook. Stress this makes no cloud call — the apply is the person's own
87
+ lifecycle; chant just plans it.
88
+
89
+ ## Key points to land
90
+
91
+ - Nothing is destroyed or applied; every step before graduation is reversible
92
+ with `terraform import`.
93
+ - You carve one resource at a time. The gnarly long tail stays in Terraform.
94
+ - `advise` and `bridge` work against **any** Terraform tree — offer to point
95
+ them at the person's own estate.
96
+
97
+ ## Going live (only if asked)
98
+
99
+ The real handoff adds three Terraform commands between bridge and apply:
100
+ `terraform state rm <addr>` (stops managing it, does not destroy), then
101
+ `terraform plan && terraform apply` to land the survivor patch. See the
102
+ generated runbook in `./carveout/<addr>-runbook.md`.