Last active
August 12, 2019 19:22
-
-
Save duffney/3e9dae330f9f76ea65a744cfdfe43d7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resources: | |
Ec2Instance: | |
Type: AWS::EC2::Instance | |
Properties: | |
ImageId: ami-0a9ca0496f746e6e0 | |
InstanceType: t2.micro | |
Tags: | |
- Key: Name | |
Value: "WinTest01" | |
- Key: NameOfService | |
Value: "Lab Win VM" | |
SecurityGroups: | |
- !Ref MySecurityGroup | |
KeyName: awsPSKeyPair | |
UserData: | |
'Fn::Base64': | |
<powershell> | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); | |
</powershell> | |
MySecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupName: SimpleWinGroup | |
GroupDescription: Enable RDP traffic via port 3389 | |
SecurityGroupIngress: | |
- IpProtocol: tcp | |
FromPort: 3389 | |
ToPort: 3389 | |
CidrIp: 0.0.0.0/0 | |
Outputs: | |
ServerDns: | |
Value: !GetAtt | |
- Ec2Instance | |
- PublicDnsName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment