bret
bret

Reputation: 43

CloudFormation without snapshot

Cloudformation created a template for us which specifies both the AMI instance to start from, and also the snapshot ID of that AMI instance.

We create our base AMI instance with Packer, which reports the AMI instance it creates, but does not report the snapshot associated - we find that in the Amazon UI.

Can the Cloudformation template be modified so it does not specify the snapshot ID? Can you give an example of the stanza?

Upvotes: 0

Views: 132

Answers (1)

gsaslis
gsaslis

Reputation: 3166

Sure you can! For example, something like this would work:

  "Resources": {
    "someEC2": {
      "Type": "AWS::EC2::Instance",
      "Properties": {
        "ImageId": "...valid_ami_id...",
        "InstanceType": "m3.medium",
        "KeyName": "...",
        "Monitoring": "false",
        "NetworkInterfaces": [
          {
            ...
          }
        ],
        "BlockDeviceMappings": [
          {
            "DeviceName": "/dev/sda",
            "Ebs": {
              "VolumeSize": 10
            }
          }
        ]
        }
      }
    }

Upvotes: 1

Related Questions