Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ericzbeard committed May 31, 2024
1 parent 1c49dfa commit 0fd0d2f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 14 deletions.
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,38 @@ Output a chart to an HTML file that you can view with a browser to look at how l
### Pkl

You can now write CloudFormation templates in Apple's new configuration
language, pkl. Rain commands that accept input as JSON or YAML now also accept
files with the `.pkl` extension. We host a Pkl package called `cloudformation`
is created at https://github.com/aws-cloudformation/cloudformation-pkl. This
package has classes that can be imported for each registry resource type, in
addition to higher level patterns. This allows you to write a type-safe
template and create your own client-side modules, in a way that is similar to
CDK, but with declarative code.
language, Pkl. Rain commands that accept input as JSON or YAML now also accept
files with the `.pkl` extension. We host a Pkl package in a [separate
repo](https://github.com/aws-cloudformation/cloudformation-pkl) that is
generated based on the CloudFormation registry. This package has classes that
can be imported for each registry resource type, in addition to higher level
patterns. This allows you to write a type-safe template and create your own
client-side modules, in a way that is similar to CDK, but with declarative
code.

Example Pkl template:

```pkl
amends "package://github.com/aws-cloudformation/cloudformation-pkl/releases/download/[email protected]/[email protected]#/template.pkl"
import "package://github.com/aws-cloudformation/cloudformation-pkl/releases/download/[email protected]/[email protected]#/cloudformation.pkl" as cfn
import "package://github.com/aws-cloudformation/cloudformation-pkl/releases/download/[email protected]/[email protected]#/aws/s3/bucket.pkl" as bucket
Description = "Create a bucket"
Parameters {
["Name"] {
Type = "String"
Default = "baz"
}
}
Resources {
["MyBucket"] = new bucket.Bucket {
BucketName = cfn.Ref("Name")
}
}
```

## Other CloudFormation tools

Expand Down
39 changes: 32 additions & 7 deletions docs/README.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,38 @@ Output a chart to an HTML file that you can view with a browser to look at how l
### Pkl

You can now write CloudFormation templates in Apple's new configuration
language, pkl. Rain commands that accept input as JSON or YAML now also accept
files with the `.pkl` extension. We host a Pkl package called `cloudformation`
is created at https://github.com/aws-cloudformation/cloudformation-pkl. This
package has classes that can be imported for each registry resource type, in
addition to higher level patterns. This allows you to write a type-safe
template and create your own client-side modules, in a way that is similar to
CDK, but with declarative code.
language, Pkl. Rain commands that accept input as JSON or YAML now also accept
files with the `.pkl` extension. We host a Pkl package in a [separate
repo](https://github.com/aws-cloudformation/cloudformation-pkl) that is
generated based on the CloudFormation registry. This package has classes that
can be imported for each registry resource type, in addition to higher level
patterns. This allows you to write a type-safe template and create your own
client-side modules, in a way that is similar to CDK, but with declarative
code.

Example Pkl template:

```pkl
amends "package://github.com/aws-cloudformation/cloudformation-pkl/releases/download/[email protected]/[email protected]#/template.pkl"
import "package://github.com/aws-cloudformation/cloudformation-pkl/releases/download/[email protected]/[email protected]#/cloudformation.pkl" as cfn
import "package://github.com/aws-cloudformation/cloudformation-pkl/releases/download/[email protected]/[email protected]#/aws/s3/bucket.pkl" as bucket

Description = "Create a bucket"

Parameters {
["Name"] {
Type = "String"
Default = "baz"
}
}

Resources {
["MyBucket"] = new bucket.Bucket {
BucketName = cfn.Ref("Name")
}
}

```

## Other CloudFormation tools

Expand Down

0 comments on commit 0fd0d2f

Please sign in to comment.