code/solutions/mappings.yaml [5:48]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      - Label:
          default: Amazon EC2 Configuration
        Parameters:
          - AmiID
    ParameterLabels:
      AmiID:
        default: Amazon Machine Image ID

Parameters:
  EnvironmentType:
    Description: Specify the Environment type of the stack.
    Type: String
    AllowedValues:
      - Dev
      - Test
      - Prod
    Default: Test
    ConstraintDescription: Specify either Dev, Test or Prod.

  AmiID:
    Description: The ID of the AMI.
    Type: AWS::EC2::Image::Id

Mappings:
  EnvironmentToInstanceType:
    Dev:
      InstanceType: t2.nano
    Test:
      InstanceType: t2.micro
    Prod:
      InstanceType: t2.small

Resources:
  WebServerInstance:
    Type: AWS::EC2::Instance
    Properties:
      ImageId: !Ref AmiID
      InstanceType: !FindInMap [EnvironmentToInstanceType, !Ref EnvironmentType, InstanceType]
      Tags:
        - Key: Name
          Value: !Join ['-', [!Ref EnvironmentType, webserver]]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



code/solutions/outputs.yaml [5:48]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      - Label:
          default: Amazon EC2 Configuration
        Parameters:
          - AmiID
    ParameterLabels:
      AmiID:
        default: Amazon Machine Image ID

Parameters:
  EnvironmentType:
    Description: Specify the Environment type of the stack.
    Type: String
    AllowedValues:
      - Dev
      - Test
      - Prod
    Default: Test
    ConstraintDescription: Specify either Dev, Test or Prod.

  AmiID:
    Description: The ID of the AMI.
    Type: AWS::EC2::Image::Id

Mappings:
  EnvironmentToInstanceType:
    Dev:
      InstanceType: t2.nano
    Test:
      InstanceType: t2.micro
    Prod:
      InstanceType: t2.small

Resources:
  WebServerInstance:
    Type: AWS::EC2::Instance
    Properties:
      ImageId: !Ref AmiID
      InstanceType: !FindInMap [EnvironmentToInstanceType, !Ref EnvironmentType, InstanceType]
      Tags:
        - Key: Name
          Value: !Join ['-', [!Ref EnvironmentType, webserver]]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



