Using same auto-generated value for multiple parameters
Use case?
Say you have two parameter inputs: Password and ConfirmPassword. If you generate a random value for Password, then the ConfirmPassword field must be passed the same randomly generated value.
We can use these getter/setter
https://github.com/aws-quickstart/taskcat/blob/master/taskcat/stacker.py#L349-L353
to store the generated password. I suggest adding a new runtime injection parameter maybe $[taskcat_confirm-genpass] which simply returns the last password that was generated. Easy enough to do if you @sshvans @agamzn @vsnyc concur. I can add it.
Will this work when there are two password (e.g. admin, user) and two confirm password fields? Reference to a generated value will be a more futureproof solution. i.e.
Key: MyPassword Value: taskcat-genpass
Key: ConfirmPassword Value: taskcat-getval-$MyPassword.
Where, the MyPassword itself is an evaluated token which must match a defined key in the input file.
Yep agree change _password to a dict and store the generated referencing the current parameter that is being processed.
Then add the get value method as @vsync suggested.
Agreed. Make it happen, captain!
Sent from my iPhone
On Jul 3, 2018, at 15:56, Tony Vattathil <[email protected]mailto:[email protected]> wrote:
Yep agree change _password to a dict and store the generated referencing the current parameter that is being processed.
Then add the get value method as @vsynchttps://github.com/vsync suggested.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/aws-quickstart/taskcat/issues/94#issuecomment-402289388, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AckEUXMrM3EU2Vy_k9m5v3xQNhvcHiTDks5uC9pbgaJpZM4U9fjD.
@sshvans https://github.com/aws-quickstart/taskcat/commit/a1a542d1a71daf1ba98c84a90dcdc4966b2fabcf should resolve this issue. When you get the chance can you pull the latest master and give it a spin?
Works!