Closed mfischer-zd closed 6 years ago
having the same problem and they don't work in update
s
Is --interactive-parameters working at all? I tried False/false/FALSE/no/NO nothing works!
For --compile-parameters
does the same format as --parameters
not work? eg.
sfn … --compile-parameters Key1:Value1,Key2:Value2,etc
Regarding --interactive-parameters
the valid values should be either true
or false
.
I have been trying a sfn print command, but that doesn't seem to be working
sfn print --file template -w output.json --compile-parameters environment_name:dev
:compile_time_parameters => {
:environment_name => {
:type => :string,
:default => 'dev',
:allowed_values => ['dev','int'],
:description => 'Default env value'
}
}
Hi! Sorry for the delay in responding to this. Boolean flags do not take a value. So to enable interactive parameters, the flag is --interactive-parameters
. To disable it, it is --no-interactive-parameters
.
So, given this template:
SparkleFormation.new(:test, compile_time_parameters: {environment_name: {type: 'string', allowed_values: ['dev', 'prod'], default: 'dev'}}) do
parameter.environment.value state!(:environment_name)
end
we can run:
$ sfn print --file test --no-interactive-parameters
{
"Parameter": {
"Environment": {
"Value": "dev"
}
},
"Outputs": {
"CompileState": {
"Value": "{\"environment_name\":\"dev\"}"
}
}
}
and to define update the value on the CLI:
$ sfn print --file test --no-interactive-parameters --compile-parameters environment_name:prod
{
"Parameter": {
"Environment": {
"Value": "prod"
}
},
"Outputs": {
"CompileState": {
"Value": "{\"environment_name\":\"prod\"}"
}
}
}
If you're still having problems, just let me know and we can re-open this. Cheers!
I cannot figure out what format the operands of the
--compile-parameters
and--interative-parameters
options are supposed to be, and there are no examples in the documentation.