Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert changes to Resource for rain modules #20

Merged
merged 7 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions package/cloudformation.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ typealias RefString = String|Mapping
///
/// Any property that conflicts will be suffixed with `Property`.
open class Resource {

// A Type is a Mapping when it's a Rain module
Type: String(matches(Regex(#"^.*::.*::.*$"#)))|Any
Type: String(matches(Regex(#"^.*::.*::.*$"#)))
Properties: Any?
CreationPolicy: Mapping?
DeletionPolicy: String?
Expand All @@ -24,9 +22,6 @@ open class Resource {
UpdatePolicy: Mapping?
UpdateReplacePolicy: String?
Condition: String?

// Overrides is specific to Rain modules
Overrides: Mapping?
}

/// A CloudFormation Parameter
Expand Down
17 changes: 17 additions & 0 deletions test/type-module.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Represents a CloudFormation template that creates buckets
// in several different ways, with and without the use of modules

amends "modules/template.pkl"
import "modules/cloudformation.pkl" as cfn
import "modules/aws/s3/bucket.pkl" as bucket
import "modules/patterns/bucket.pkl" as pattern

Resources {

["Mod"] {
Type {
["!Rain::Module"] = "Something"
}
}
}