We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure how to implement Fn::GetAZs function so that i can have something like
AvailabilityZone: !Select [ 0, !GetAZs '' ]
or
AvailabilityZone: Fn::Select: - '0' - {'Fn::GetAZs': ''}
Tried this one
(s/def ::get-azs (s/keys :req [::values/type ::region])) (defmethod values/value-type ::get-azs [_] ::get-azs) (defmethod values/encode-value ::get-azs [{:keys [::region]}] {"Fn::GetAZs" region}) (defn get-azs [region] {::values/type ::get-azs ::region region}) :subnet-a (ec2/subnet { ::ec2/availability-zone (select 0 (get-azs "")) ::ec2/vpc-id (xref :vpc) ::ec2/cidr-block (cidr-block 28) ::ec2/map-public-ip-on-launch "true"})
but getting this error
Invalid resource properties-- Spec failed -------------------- {:crucible.aws.ec2/availability-zone {:crucible.values/type :crucible.values/select, :crucible.values/index 0, :crucible.values/fn-values {:crucible.values/type :infra.ecs/get-azs, :infra.ecs/region ""}}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :crucible.aws.ec2/vpc-id ..., :crucible.aws.ec2/cidr-block ..., :crucible.aws.ec2/map-public-ip-on-launch ...} should satisfy string? or value {:crucible.aws.ec2/availability-zone {:crucible.values/type ..., :crucible.values/index ..., :crucible.values/fn-values {:crucible.values/type :infra.ecs/get-azs, :infra.ecs/region ""}}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :crucible.aws.ec2/vpc-id ..., :crucible.aws.ec2/cidr-block ..., :crucible.aws.ec2/map-public-ip-on-launch ...} should satisfy vector?
However it doesn't fail if i change subnet code to
:subnet-a (ec2/subnet { ::ec2/availability-zone (select 0 [(get-azs "")]) ::ec2/vpc-id (xref :vpc) ::ec2/cidr-block (cidr-block 28) ::ec2/map-public-ip-on-launch "true"})
but in that case it produces code like
AvailabilityZone: Fn::Select: - '0' - - {'Fn::GetAZs': ''}
which is not correct.
The text was updated successfully, but these errors were encountered:
For now made it work with this temporary fix:
(s/def ::get-azs (s/keys :req [::values/type ::index])) (defmethod values/value-type ::get-azs [_] ::get-azs) (defmethod values/encode-value ::get-azs [{:keys [::index]}] {"Fn::Select" [index {"Fn::GetAZs" ""}]}) (defn get-azs [index] {::values/type ::get-azs ::index index})
but obviously there should be some better way.
Sorry, something went wrong.
Hey there @bizm sorry I didn't see your issue. I'll give you a shout when I've had a proper look.
No branches or pull requests
Not sure how to implement Fn::GetAZs function so that i can have something like
or
Tried this one
but getting this error
However it doesn't fail if i change subnet code to
but in that case it produces code like
which is not correct.
The text was updated successfully, but these errors were encountered: