Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is the rest of the CloudFormation template for deploying Active Directory Domain Services
Properties:
DisableApiTermination: 'false'
AvailabilityZone: !Sub "${AvailabilityZone}"
InstanceInitiatedShutdownBehavior: stop
IamInstanceProfile: !Ref Profile
ImageId: !FindInMap [ AMIMap, !Ref OS, ImageId ]
InstanceType: !Sub "${InstanceSize}"
KeyName: !Sub "${KeyPair}"
UserData: !Base64
'Fn::Join':
- ''
- - "<powershell>\n"
- "cfn-init.exe "
- " --stack "
- "Ref": "AWS::StackId"
- " --resource Instance"
- " --region "
- "Ref": "AWS::Region"
- " --configsets config"
- " -v \n"
- "cfn-signal.exe "
- " ---exit-code 0"
- " --region "
- "Ref": "AWS::Region"
- " --resource Instance"
- " --stack "
- "Ref": "AWS::StackName"
- "\n"
- "</powershell>\n"
Tags:
- Key: Environment
Value: !Sub "${Environment}"
- Key: Application
Value: !Sub "${Application}"
- Key: Name
Value: !Sub "${Hostname}"
- Key: Owner
Value: !Sub "${Owner}"
- Key: OS
Value: !Sub "${OS}"
- Key: Project
Value: !Sub "${Project}"
NetworkInterfaces:
- DeleteOnTermination: 'true'
Description: Primary network interface
DeviceIndex: 0
SubnetId: !FindInMap [SubnetMap, !Ref AvailabilityZone, !Ref Environment]
GroupSet:
- sg-b15634f9
Outputs:
InstanceId:
Description: 'InstanceId'
Value: !Ref Instance
Export:
Name: !Sub '${Hostname}-${Environment}-InstanceId'
InstancePrivateIP:
Description: 'InstancePrivateIP'
Value: !GetAtt Instance.PrivateIp
Export:
Name: !Sub '${Hostname}-${Environment}-InstancePrivateIP'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.