avatarNadan

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1905

Abstract

an class="hljs-number">3</span> ami = var.ami instance_type = <span class="hljs-string">"t2.micro"</span> key_name = var.keyname monitoring = <span class="hljs-literal"><span class="hljs-keyword">true</span></span> vpc_security_group_ids = var.securitygrp subnet_id = var.subnets associate_public_ip_address = <span class="hljs-literal"><span class="hljs-keyword">true</span></span>

tags = <span class="hljs-punctuation">{</span> Name = <span class="hljs-string">"ec2-instance-${count.index + 1}"</span> <span class="hljs-punctuation">}</span> <span class="hljs-punctuation">}</span>

resource <span class="hljs-string">"aws_ebs_volume"</span> <span class="hljs-string">"ebs_volume"</span> <span class="hljs-punctuation">{</span> count = <span class="hljs-number">2</span> availability_zone = var.region size = <span class="hljs-number">8</span> <span class="hljs-punctuation">}</span>

resource <span class="hljs-string">"aws_volume_attachment"</span> <span class="hljs-string">"ebs_attachment"</span> <span class="hljs-punctuation">{</span> count = <span class="hljs-number">2</span> instance_id = aws_instance.ec2_instance<span class="hljs-punctuation">[</span>count.index<span class="hljs-punctuation">]</span>.id volume_id = aws_ebs_volume.ebs_volume<span class="hljs-punctuation">[</span>count.index<span class="hljs-punctuation">]</span>.id device_name = <span class="hljs-string">"/dev/sde"</span> <span class="hljs-punctuation">}</span></pre></div><p id="0a64"><b>variable.tf</b></p><div id="0a28"><pre>variable <span class="hljs-string">"region"</span> <span class="hljs-punctuation">{</span> type = string <span class="hljs-punctuation">}</span>

variable <span class="hljs-string">"ami"</span> <span class=

Options

"hljs-punctuation">{</span> type = string <span class="hljs-punctuation">}</span>

variable <span class="hljs-string">"keyname"</span> <span class="hljs-punctuation">{</span> type = string <span class="hljs-punctuation">}</span>

variable <span class="hljs-string">"securitygrp"</span> <span class="hljs-punctuation">{</span> type = set(string) default = <span class="hljs-punctuation">[</span><span class="hljs-string">"sg-xxxxx"</span><span class="hljs-punctuation">]</span> <span class="hljs-punctuation">}</span>

variable <span class="hljs-string">"subnets"</span> <span class="hljs-punctuation">{</span> type = string <span class="hljs-punctuation">}</span>

variable <span class="hljs-string">"instance_names"</span> <span class="hljs-punctuation">{</span> type = map(string) default = <span class="hljs-punctuation">{</span> instance1 = <span class="hljs-string">"instance1"</span><span class="hljs-punctuation">,</span> instance2 = <span class="hljs-string">"instance2"</span><span class="hljs-punctuation">,</span> instance3 = <span class="hljs-string">"instance3"</span><span class="hljs-punctuation">,</span> <span class="hljs-punctuation">}</span> <span class="hljs-punctuation">}</span></pre></div><p id="6819">Make sure to have the terraform.tfvars file with all the inputs. Post which run.</p><p id="b617">The above code will create 3 ec2 instances with 3 ebs attached to each instances.</p><div id="6408"><pre>terraform init - initializes the aws required provider terraform validate - checks the syntax and provides the errors terraform plan - its <span class="hljs-selector-tag">a</span> dry run before we actually make changes <span class="hljs-selector-tag">to</span> an infra terraform apply - executing the <span class="hljs-selector-tag">code</span></pre></div><p id="9618">#aws #terraform #automation #IaC #ec2 #ebs</p></article></body>

How Learning When to Say “Yes” or “No” Changed My Life for the Better

Being the best version of yourself is very much a work in progress, at least for me. Every day is an opportunity to learn to make more informed choices the following day.

Something I am continuously working on is when to say “yes” and when to say "no.” These two simple words, which are the first words we learn in our vocabulary, are key to the path we will take.

Photo by Towfiqu barbhuiya on Unsplash

Over the past few years, I’ve tried to be more conscious about how I spend my time and energy, I consider what I’m trying to achieve as a starting point and work from there. I’m teaching myself when it’s okay for me to say “yes” or “no” in certain situations to avoid energy drain.

When I say yes

  • It’s something I’ve been thinking about for a while: Whether it’s a writing course or buying a new pair of shoes if it’s been on my mind for a while, I’m likely sure I want to do it. It’s a yes from me.
  • It may open up other opportunities: You’ve been invited to a dinner, you know one person and you don’t feel like it, but there are going to be interesting people there who may be influential to your next adventure. It’s a yes from me.
  • The thought of it makes me excited: If I’m thinking about it and I get a happy tingle in my heart. It’s a yes from me.
  • It’s important to someone important to me: It might not be something I particularly want to do, but I know it’s important to someone important to me. It’s a yes from me. I challenge you to consider who is truly important and who is not.

When I say no

  • The thought of it makes me anxious: If even the simple thought of the situation makes me anxious, likely, doing it won’t likely benefit me. It’s a no from me.
  • I don’t have time or energy: I’ve put these together because they have similar values. Every day is different today, and today may not be the day to say yes. It might be something you want to do, but not today. It’s okay to postpone. It’s a no from me.
  • It means I won’t be able to do something else: As we are reminded often, we can’t have it all, something’s got to give. If needed, I’ll write up a quick pro-and-con list and make my decision. And, it’s a no from me.
  • I simply don’t want to do it: Learning and accepting that I don’t need to justify myself all the time has been a revelation. Sometimes I just don’t want to do it and that is fine. People who matter will understand, and people who don’t won’t understand. Well, I guess that discussion is for another day. It’s a no from me.

I’m conscious that whether I say “yes” or "no," my path will be different. This can be scary, but I try to remember that my choices aren’t set in stone, and we are most definitely allowed to change our minds. I try to follow my instinct, and when needed, I learn from my mistakes and correct my path.

We’re on a journey, and sometimes it may feel like a rollercoaster, so we may as well enjoy the ride.

Having the confidence to know when I can say “yes” or “no” has opened me up to many opportunities and changes in my life, which I am super grateful for. I can wholeheartedly say, my life is better now. I’m currently in a place I never could have dreamt up, and I’m excited for what’s left to come.

I challenge you to question your “yes” and “no” responses.

Do they make sense to you? If they do, great — keep going. If they don’t, reconsider why you are responding the way you are, can you change something?

Shine on ✨

Shine bright.

If you like my writing and are inclined to support my journey, you can help me shine brighter by buying me a coffee. Your kindness means a lot! Thank you so much for your support.

Growth
Happiness
Recommended from ReadMedium