Hello folks, I am trying to figure out the how-to ...
# general
a
Hello folks, I am trying to figure out the how-to put name for the instances. When i am trying to put the name for instances, the name column comes empty.
Copy code
class ec2instance():

    def __init__(self, instance_name, instancetype, sg_name, counts):
        self.instance_name = instance_name
        self.instancetype = instancetype
        self.sg_name = sg_name
        self.counts = counts

    def count(self):

        for inst in range(0, self.counts):
            Instances = aws.ec2.Instance(self.instance_name + str(inst),
            ami="ami-12345",
            instance_type= self.instancetype,
            subnet_id=sbnet,
            #userData: `#!/bin/bash
            #    echo "Splunk Hybrid cloud poc" > index.html
        )

if __name__ == "__main__":
    searchhead = ec2instance("sh", size, secgrp, 2)
    searchhead.count()

    idx = ec2instance("idx", size, secgrp, 3)
    idx.count()