<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>hansbhardwaj &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/author/hansbhardwaj/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Tue, 05 Jul 2022 12:49:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>Hans Bhardwaj &#8211; Azure DevOps &#038; Terraform Training Day -1 -Assignment-1</title>
		<link>https://www.bestdevops.com/hans-bhardwaj-azure-devops-terraform-training-day-1/</link>
					<comments>https://www.bestdevops.com/hans-bhardwaj-azure-devops-terraform-training-day-1/#respond</comments>
		
		<dc:creator><![CDATA[hansbhardwaj]]></dc:creator>
		<pubDate>Tue, 05 Jul 2022 02:32:48 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=24912</guid>

					<description><![CDATA[Assignment 1 &#8211; List of Components of Terraform and explain each components with 1 image Terraform is a IaaC &#8211; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Assignment 1 &#8211;  List of Components of Terraform and explain each components with 1 image<span style="font-size: 1rem">     </span></strong><span style="font-size: 1rem">                                                                                                                        </span></p>



<ol class="wp-block-list"><li><strong>Terraform is a IaaC</strong> &#8211; Infrastructure as a code. Its common tool/code standard or language for tools to create the infrastructure.  </li><li><strong>Language </strong>&#8211; Terraform written in GO language and can be integrate with aroud 2255 applications/tools. Terraform is owned by Harshicorp.  </li><li><strong>HCL</strong> &#8211; Harshicorp configuration Language, Terraform enables users to use configuration language called HCL to describe the desire (what we want) state in cloud or in on-premises. </li><li><strong>Provider</strong> &#8211; Provider is kind of plugin or executable which allows users to manage an external API ie AWS, Azure, GC, Kubernetes etc. Its basically acts as a communication or translation layer to communicate with different -2 cloud providers , services.<br>In AWS there is one provider, in Azure there are multiple ie AzureRM, AzureDevops,AzureAD,AzureAPI, Azure Stake</li><li><strong>Terraform workflow</strong> &#8211;<br>init &#8211;&gt; validate &#8211;&gt; plan -&gt; apply &#8211;&gt; show &#8211;&gt; destroy<br>Init is one time activity to install providers like azure, aws, github etc.<br>Validate is to verify the code written in .tf file, its kind of debug.<br>plan is to provide details what will be performed once execute the file<br>apply is to deploy/publish the file (basically create or update called as apply)<br>show is the command (terraform show) to see the content of state file.<br>destroy is to destroy any instance/resoure created by terraform.</li><li><strong>tf file</strong> &#8211; Any code in terraform gets written in name.tf file where name could be anything and tf is extension of terraform file.</li><li><strong>tfstate file</strong> &#8211; Whenever Terraform sends the code to provider which in turn interacts with external API to execute the code, create the infra.<br>The response is sends back and stored as .tfstate file.</li><li>While creating resource via tf file. In general it content as resource name and then argument ( argument is kind of parameters ie name, tag, description, location, compute required etc).</li><li>Some of Terraform commands are listed here &#8211; terraform &#8211;version ( to show the version of terraform)<br>terraform providers ( to show the list of providers)<br>terraform init ( to install the providers as one time activity)<br>terraform validate<br>terraform plan<br>terraform apply<br>terraform show<br>terraform destroy</li></ol>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="576" src="https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-architecture-1-1024x576.png" alt="" class="wp-image-24927" srcset="https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-architecture-1-1024x576.png 1024w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-architecture-1-300x169.png 300w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-architecture-1-768x432.png 768w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-architecture-1-375x210.png 375w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-architecture-1.png 1152w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Terraform Architecture</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1001" height="1021" src="https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-command.jpg" alt="" class="wp-image-24928" srcset="https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-command.jpg 1001w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-command-294x300.jpg 294w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-command-768x783.jpg 768w" sizes="(max-width: 1001px) 100vw, 1001px" /><figcaption>Terraform commands</figcaption></figure>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-tf-file.jpg" alt="" class="wp-image-24929" width="871" height="857" srcset="https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-tf-file.jpg 871w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-tf-file-300x295.jpg 300w, https://www.bestdevops.com/wp-content/uploads/2022/07/Terraform-tf-file-768x756.jpg 768w" sizes="(max-width: 871px) 100vw, 871px" /><figcaption>Terraform Tf file example </figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="462" src="https://www.bestdevops.com/wp-content/uploads/2022/07/tf-state-file-1024x462.jpg" alt="" class="wp-image-24930" srcset="https://www.bestdevops.com/wp-content/uploads/2022/07/tf-state-file-1024x462.jpg 1024w, https://www.bestdevops.com/wp-content/uploads/2022/07/tf-state-file-300x135.jpg 300w, https://www.bestdevops.com/wp-content/uploads/2022/07/tf-state-file-768x347.jpg 768w, https://www.bestdevops.com/wp-content/uploads/2022/07/tf-state-file-1536x693.jpg 1536w, https://www.bestdevops.com/wp-content/uploads/2022/07/tf-state-file.jpg 1833w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption>Terraform state file (tfstate file)</figcaption></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/hans-bhardwaj-azure-devops-terraform-training-day-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hans Bhardwaj &#8211; Azure DevOps &#038; Terraform Training Day -1 -Assignment-2</title>
		<link>https://www.bestdevops.com/24753-2/</link>
					<comments>https://www.bestdevops.com/24753-2/#respond</comments>
		
		<dc:creator><![CDATA[hansbhardwaj]]></dc:creator>
		<pubDate>Tue, 05 Jul 2022 01:26:26 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=24753</guid>

					<description><![CDATA[Assignment 2- Write a terraform file which must create 1 azure resources group + 1 aws instance and 1 github [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Assignment 2- Write a terraform file which must create 1 azure resources group + 1 aws instance and 1 github repo. All the code must be into 1 file including providers.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">terraform {
  required_providers {
    azurerm = {
      source = <span class="hljs-string">"hashicorp/azurerm"</span>
      version = <span class="hljs-string">"3.12.0"</span>
    }
	aws = {
      source = <span class="hljs-string">"hashicorp/aws"</span>
      version = <span class="hljs-string">"4.21.0"</span>
    }
	github = {
      source = <span class="hljs-string">"integrations/github"</span>
      version = <span class="hljs-string">"4.26.1"</span>
    }
  }
}

provider <span class="hljs-string">"azurerm"</span> {
  features {}
  subscription_id = <span class="hljs-string">"54d18623-a88e-4b6e-bcfe-a772406993b0"</span>
  client_id       = <span class="hljs-string">"7e757450-7239-4c36-88f8-6664f3e49a49"</span>
  client_secret   = <span class="hljs-string">"yhJ8Q~T7ycWjr4PjQ2ZUkTKgLeKTQ82YYGdiscP9"</span>
  tenant_id       = <span class="hljs-string">"bc0f52a6-5a6d-45f4-8842-36ab113a5eb5"</span>
}

resource <span class="hljs-string">"azurerm_resource_group"</span> <span class="hljs-string">"training"</span> {
  name     = <span class="hljs-string">"training_assignment"</span>
  location = <span class="hljs-string">"South India"</span>
}

provider <span class="hljs-string">"github"</span> {
  token=<span class="hljs-string">"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"</span>
}

resource <span class="hljs-string">"github_repository"</span> <span class="hljs-string">"training"</span> {
  name        = <span class="hljs-string">"training_assignment"</span>
  description = <span class="hljs-string">"My training assignment"</span>
  visibility = <span class="hljs-string">"public"</span>
}

provider <span class="hljs-string">"aws"</span> {
  region = <span class="hljs-string">"us-east-1"</span>
}

resource <span class="hljs-string">"aws_vpc"</span> <span class="hljs-string">"training"</span> {
  cidr_block = <span class="hljs-string">"10.0.0.0/16"</span>
}

</code></span></pre>]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/24753-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
