logical.importCloudFormationfunctionno test imports itfunction importCloudFormation(source: string, text: string): ImportsThe resources of a template as assets and links.
CloudFormation: a template, as JSON or as YAML without the short-form tags (!Ref and the others are tags, which the YAML reader refuses; aws cloudformation get-template and cfn-flip --json give the JSON). Every resource becomes an asset (a cloud resource of the provider aws; the partition is told from the region where the template says one in a parameter's default), and the links are DependsOn, Ref and Fn::GetAtt. Only the type and the logical name are copied: the properties are not.
import { importCloudFormation } from "./cloudformation.ts";
importCloudFormation("t.json", JSON.stringify({ Resources: { Web: { Type: "AWS::EC2::Instance" } } })).assets.length; // 1logical.importCloudFormationfunctionno test imports itfunction importCloudFormation(source: string, text: string): ImportsThe resources of a template as assets and links.
importCloudFormationfunctionfunction importCloudFormation(source: string, text: string): ImportsThe resources of a template as assets and links.