Via deployment manager template, I need to create a windows vm and have a user account created with password that end-user specifies as an input.
So far, I have following in my template:
resources:
- name: {{ properties["instance_name"] }}
type: compute.v1.instance
properties:
...
metadata:
items:
- key: windows-startup-script-cmd
value: |
net user {{ properties["user_name"] }} {{ properties["user_pwd"] }} /add
This works but disadvantage of this approach is that password leaks out in deployment detail (I see plain text password in "config", "expanded config" sections) and maybe elsewhere.
Is there another way to achieve adding the user in GDM template?
Thanks.