aws and awsx namespaces... I'm defining container ...
# aws
a
aws and awsx namespaces... I'm defining container registries and there are 2 ecr.Repository classes, one from aws and one from awsx, each taking a subset of possible arguments. From awsx I can get lifecyclepolicy and from aws I can have imageScanningConfiguration and imageTagImmutability but not both. Am I doing something stupid?
f
Not at all!
awsx
is a higher-level abstraction library that provides a convenient, opinionated way on using
aws
a
Thanks @faint-table-42725 This much I’ve understood. What I’m asking is how can I have all 3 of lifecyclePolicy, imageScanningConfiguration and imageTagMutablility when choosing either library. Or how can I use both for defining a single resource?
f
You have a couple options here. You can wire this up in
aws
and if you did that, then you’d use
Repository
for the scanning and tag immutability along with the
LifecyclePolicy
resource to handle the lifecycle part (https://www.pulumi.com/docs/reference/pkg/aws/ecr/)
👍 1
Alternatively, if you wanted to use
awsx
, you can pass a
transformation
(https://www.pulumi.com/docs/intro/concepts/programming-model/#transformations) to the
awsx.Repository
to modify the underlying
aws.Repository
resource to include the
imageScanningConfiguration
and
imageTagImmutability
properties.
👍 1