hello

one simple way to do this is to get this into 2 steps

one that renames what you need and you grab this new AMI info
one that does the provisioning on this new ami with packer.

Alvaro

On Thu, May 17, 2018 at 1:03 PM, Sayantan Choudhury <[email protected]>
wrote:

> Hi,
>
> I have a requirement where I need to build a Windows AMI in AWS and as per
> CIS recommendations, I need to rename the default windows Administrator
> username. I have multiple powershell provisioners in my build template and
> in one of the provisioners, I am changing the default windows Administrator
> username. I also have a requirement that I need to run provisioners after
> changing the default windows Administrator username. I am using winrm to
> connect to the EC2 machine and from the start, I am using the default
> windows Administrator username to connect.
>
> After I change the default windows Administrator username, I need to
> somehow change the username to the new one. I was trying to use
> https://www.packer.io/docs/templates/provisioners.html#
> build-specific-overrides to override the "winrm_username" parameter, but
> that does not seem to work. Error: "* unknown configuration key:
> "winrm_username"". Same with any other configuration key that I use.
>
> Please suggest if there is any other way to meet my requirements.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/1cc25d83-8c4d-45e8-9312-4c7fa46bb7ed%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/1cc25d83-8c4d-45e8-9312-4c7fa46bb7ed%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAHqq0ez6NygJHUarppH7-cwxYTe-scK9ogv390KEc0pXVQxP%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to