🚢 SSM Parameters #75
jamie-lynch
started this conversation in
Ideas
Replies: 2 comments
-
I think generics might be of use here, will need to experiment a little. |
Beta Was this translation helpful? Give feedback.
0 replies
-
#141 adds SSM support for all parameter constructs extending |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Many stacks use parameters to allow values to be defined at deploy time. The
GuParameter
construct, built on top of theCfnParameter
, allows these parameters to be defined. It takes atype
value as an input, to denote the type of the expected value.These parameters can either be provided directly or by reference to a path in Parameter Store. Where parameter values are to be resolved from Parameter Store, the type provided should be the type of the expected value wrapped with
AWS::SSM::Parameter::Value
- e.g.AWS::SSM::Parameter::Value<String>
. Any valid type can be provided.Currently we provide the
GuSSMParameter
which sets the type toAWS::SSM::Parameter::Value<String>
. Clearly this means that only string values can be provided through parameter store without providing the entire type to theGuParameter
construct.Can we do better?!
Option 1
We could rename the
GuSSMParameter
toGuSSMStringParameter
and also provide a number of other helper classes such asGuSSMStringListParameter
which would implement the correct type in each case. This is likely to lead to the vast majority of the parameter classes being duplicated however.Option 2
Provide a
GuSSMParameter
which takes the value type as a prop and wraps it withAWS::SSM:Parameter::Value
for you. For example:Option 3
For all supported parameters, the construct could take a boolean prop to denote whether the value is provided directly or resolved from parameter store. Using this parameter would then look something like:
Option 4
Some other option as-yet-unthought-of option!
Beta Was this translation helpful? Give feedback.
All reactions