-
I'm aiming to use Pkl to better template our current ECS Task Definitions. My idea was to have the following:
Note: A service called The following works as expected.
It was easy enough to follow the docs for updating the I've messed around with Member Predicates ([[…]]) but I can't figure out how to get the nested Listings in scope. EDIT: I figured out how to update a nested Listing by referencing the index but I still can't figure out the syntax for using the Member Predicates so I can update a specific element:
The latter doesn't update the LOG_LEVEL name value pair. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In that member predicate, For example: amends "Bar.pkl"
taskDefinition = (barTaskDefinition) {
image = "bar:1.0.0"
containerDefinitions {
[0] {
name = "web"
image = "app:latest"
cpu = 512
memory = 1024
environment {
[[this.name == "LOG_LEVEL"]] {
value = "DEBUG"
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
In that member predicate,
name
is resolving to the outername
. You'll need to qualify it withthis.name
.For example: