Multi-operation Prompts

This page describes multi-operation prompts which can be used to trigger more than one operations in a single prompt where all operations can be either ec2 operations or lightsail operations or a mixture of operations from ec2 and lightsail.

Examples

Creating a vpc with a child subnet

create a vpc with '10.101.0.0/16' cidr
  create a subnet with '10.101.1.0/24' cidr

Adding two spaces in front of a line will establish parent / child relationship between this resource and the resource created by the previous line. Otherwise all the resources will be provisioned without any relationship with each other.

Creating a security group and adding ingress rules to it

create a security group with following details -
name - securitygroup-ssh-https
description - Allow access on ssh and https ports
-----
  add following ingress rules -
  22|tcp|192.168.1.1
  443|tcp|192.168.2.0/24

Listing vpcs and subnets

list all the vpcs
list all the subnets

Provisioning a Lightsail Docker host

Troubleshooting user data

  • Check user-data file content -

  • Check cloud-init logs -

Query multiple resources required for provisioning an EC2 VM

Provisioning an EC2 Docker host

At this moment base64_encode function is not supported in the prompt. It has been mentioned here to inform the user that the data should be manually base64 encoded and updated in place of base64_ecode() function call.

Trigger a lightsail operation on multiple resources even though AWS API supports performing this operation on one resource at a time

Last updated

Was this helpful?