aws:aws-cloudformation_mappings_outputs
Differences
This shows you the differences between two versions of the page.
| aws:aws-cloudformation_mappings_outputs [15/02/2024 10:20] – created - external edit 127.0.0.1 | aws:aws-cloudformation_mappings_outputs [30/05/2025 09:43] (current) – removed andrew | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Cloud Formation Mappings ====== | ||
| - | |||
| - | |||
| - | Adding in Mappings, Parameters, UserData and an Outputs section. | ||
| - | |||
| - | <code yaml> | ||
| - | Parameters: | ||
| - | ServiceName: | ||
| - | Description: | ||
| - | Type: String | ||
| - | InstanceTypePara: | ||
| - | Type: String | ||
| - | Default: t2.micro | ||
| - | AllowedValues: | ||
| - | - t2.micro | ||
| - | - m1.small | ||
| - | - m1.large | ||
| - | Description: | ||
| - | EC2 instances | ||
| - | SSHkey: | ||
| - | Description: | ||
| - | Type: AWS:: | ||
| - | |||
| - | Mappings: | ||
| - | RegionMap: | ||
| - | eu-west-1: | ||
| - | AMI: ami-07d9160fa81ccffb5 # Amazon Linux AMI in Ireland | ||
| - | TEXT: Test Text from Mapping | ||
| - | us-east-1: | ||
| - | AMI: ami-655a0a20 # Us East 1 | ||
| - | |||
| - | Resources: | ||
| - | Ec2Instance: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | InstanceType: | ||
| - | Ref: | ||
| - | InstanceTypePara | ||
| - | ImageId: !FindInMap | ||
| - | - RegionMap | ||
| - | - !Ref ' | ||
| - | - AMI | ||
| - | # ami-07d9160fa81ccffb5 # Amazon Linux AMI in Ireland | ||
| - | KeyName: !Ref SSHkey | ||
| - | Tags: | ||
| - | - Key: Name | ||
| - | Value: !Ref ServiceName | ||
| - | - Key: email | ||
| - | Value: myname@company.co.uk | ||
| - | - Key: BuiltBy | ||
| - | Value: CloudFormation | ||
| - | - Key: JoinTest | ||
| - | Value: !Join [ ":", | ||
| - | - Key: BuiltInRegion | ||
| - | Value: !Ref AWS::Region | ||
| - | - Key: MappingTest | ||
| - | Value: !FindInMap | ||
| - | - RegionMap | ||
| - | - !Ref ' | ||
| - | - TEXT | ||
| - | SecurityGroups: | ||
| - | - !Ref SecurityGroupSSH | ||
| - | UserData: | ||
| - | !Base64 | | ||
| - | #!/bin/bash -xe | ||
| - | yum update -y | ||
| - | yum install httpd -y | ||
| - | service httpd start | ||
| - | |||
| - | SecurityGroupSSH: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | GroupDescription: | ||
| - | SecurityGroupIngress: | ||
| - | - IpProtocol: tcp | ||
| - | FromPort: ' | ||
| - | ToPort: ' | ||
| - | CidrIp: 0.0.0.0/0 | ||
| - | Tags: | ||
| - | - Key: Name | ||
| - | Value: AJS - Allow SSH | ||
| - | SecurityGroupHttp: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | GroupDescription: | ||
| - | SecurityGroupIngress: | ||
| - | - IpProtocol: tcp | ||
| - | FromPort: ' | ||
| - | ToPort: ' | ||
| - | CidrIp: 0.0.0.0/0 | ||
| - | Tags: | ||
| - | - Key: Name | ||
| - | Value: AJS - Allow http | ||
| - | |||
| - | S3BucketExample: | ||
| - | Type: AWS:: | ||
| - | Properties: | ||
| - | AccessControl: | ||
| - | BucketName: ajs-bucket | ||
| - | WebsiteConfiguration: | ||
| - | IndexDocument: | ||
| - | Tags: | ||
| - | - Key: Name | ||
| - | Value: AJSTestBucket | ||
| - | - Key: builtby | ||
| - | Value: CloudFormation | ||
| - | |||
| - | Outputs: | ||
| - | InstanceDNS: | ||
| - | Description: | ||
| - | DNS name of instance | ||
| - | Value: | ||
| - | !GetAtt | ||
| - | - Ec2Instance | ||
| - | - PublicDnsName | ||
| - | WebsiteURL: | ||
| - | Description: | ||
| - | Web site URL | ||
| - | Value: | ||
| - | !Sub | ||
| - | - ' | ||
| - | BucketURL: | ||
| - | Description: | ||
| - | Value: | ||
| - | !GetAtt | ||
| - | - S3BucketExample | ||
| - | - WebsiteURL | ||
| - | BucketARN: | ||
| - | Description: | ||
| - | Value: | ||
| - | !GetAtt | ||
| - | - S3BucketExample | ||
| - | - Arn | ||
| - | </ | ||
| - | |||
| - | |||
aws/aws-cloudformation_mappings_outputs.1707992435.txt.gz · Last modified: by 127.0.0.1
