{"id":1675,"date":"2022-07-20T11:01:11","date_gmt":"2022-07-20T10:01:11","guid":{"rendered":"https:\/\/www.easydeploy.io\/blog\/?p=1675"},"modified":"2022-07-20T23:41:43","modified_gmt":"2022-07-20T22:41:43","slug":"terraform-cloud-bitbucket-repository","status":"publish","type":"post","link":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/","title":{"rendered":"How to Setup Terraform Cloud using Bitbucket Repository?"},"content":{"rendered":"<p>In our previous article, we have explained <a href=\"https:\/\/www.easydeploy.io\/blog\/s3-bucket-aws-terraform-cli-command\/\">how to create and execute a simple terraform script using the CLI command<\/a>. In this blog post, we are going to teach you <strong>how to create a Terraform Cloud account and link it with the Bitbucket code<\/strong>. Why do we have to do this?. In an ideal scenario, we store our terraform script in the cloud and execute them in the remote, that\u2019s easier to manage.<\/p>\n<p>Hashicorp provides <a href=\"https:\/\/cloud.hashicorp.com\/products\/terraform\">Terraform Cloud<\/a>, an online cloud account management for storing all the terraform scripts and scheduling their invocation. If you are working on terraform automation, learning how to set up terraform clouds is more important.<\/p>\n<p>Here is the definition of <strong>Terraform Cloud<\/strong> from their official documentation:<\/p>\n<p>\u201cTerraform Cloud is HashiCorp\u2019s managed service offering. It eliminates the need for unnecessary tooling and documentation for practitioners, teams, and organizations to use Terraform in production.\u201d<\/p>\n<p>Let\u2019s deep dive into this article on setting up terraform cloud accounts and run our first sample terraform script from the cloud account.<\/p>\n<h2 style=\"text-align: left;\">How to Setup Terraform Cloud?<\/h2>\n<h3>Step 1: Create an Account in Terraform Cloud<\/h3>\n<p>The first step is to create an online Terraform Cloud account. Go to the link below for creating a new account in terraform cloud:<\/p>\n<ul>\n<li>https:\/\/cloud.hashicorp.com\/products\/terraform<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Terraform Cloud Example\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-getting-started.png\" alt=\"Terraform Cloud Example\" width=\"1872\" height=\"677\" \/><\/p>\n<p>Click the &#8220;Try Terraform Cloud&#8221; Button to create an account.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1681 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-account.png\" alt=\"Terraform Cloud Create Account\" width=\"376\" height=\"411\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-account.png 660w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-account-275x300.png 275w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/p>\n<p>Here Provide a username, your email id and password. Then click the &#8220;Create account&#8221; Button.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1682 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-email-confirmation.png\" alt=\"Terraform Cloud Email Confirmation\" width=\"529\" height=\"162\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-email-confirmation.png 882w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-email-confirmation-300x92.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-email-confirmation-768x235.png 768w\" sizes=\"(max-width: 529px) 100vw, 529px\" \/><\/p>\n<p>It will send a confirmation link to your registered email. So go and check your email.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1683 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirmation-link.png\" alt=\"Terraform Cloud Confirmation Link\" width=\"1582\" height=\"553\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirmation-link.png 1582w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirmation-link-300x105.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirmation-link-1024x358.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirmation-link-768x268.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirmation-link-1536x537.png 1536w\" sizes=\"(max-width: 1582px) 100vw, 1582px\" \/><\/p>\n<p>In your email there is a mail like in this image, and there will be a link.<\/p>\n<p>Please click the link, and you will be redirected to your new terraform cloud account. Now you have created a new Terraform Cloud account.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 2: Create an Organization in Terraform Cloud<\/h3>\n<p>Here You can see the second link &#8220;<i>Start from scratch<\/i>&#8220;. Click the link.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1684 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workflow-create.png\" alt=\"Terraform Cloud Workflow Create\" width=\"1021\" height=\"449\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workflow-create.png 1892w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workflow-create-300x132.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workflow-create-1024x450.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workflow-create-768x338.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workflow-create-1536x675.png 1536w\" sizes=\"(max-width: 1021px) 100vw, 1021px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1685 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-organization.png\" alt=\"Terraform Cloud Create Organization\" width=\"945\" height=\"371\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-organization.png 1866w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-organization-300x118.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-organization-1024x402.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-organization-768x301.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-organization-1536x603.png 1536w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/p>\n<p>You have to create an organization for your projects. Enter a name for your organization, and click &#8220;Create Organization&#8221;<\/p>\n<h3>Step 3: Create a New Workflow from Bitbucket<\/h3>\n<p>As you saw in the below image you can choose your workflow.<\/p>\n<p>For now you can select the first one &#8220;Version Control Workflow&#8221;, which you can use for your Bitbucket.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1686 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-vcs.png\" alt=\"Terraform Cloud Choose Vcs\" width=\"954\" height=\"454\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-vcs.png 1856w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-vcs-300x143.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-vcs-1024x487.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-vcs-768x365.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-vcs-1536x731.png 1536w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1687 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket.png\" alt=\"Terraform Cloud Connect Bitbucket\" width=\"610\" height=\"243\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket.png 1178w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket-300x120.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket-1024x409.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket-768x306.png 768w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>Connect to the version control source, choose &#8220;Bitbucket&#8221;, then click &#8220;Bitbucket Cloud&#8221;. In this example we are going to use Bitbucket because we are currently using Bitbucket for our projects. We will try to come up with blog post for other repositories in the near future.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1688 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket-cloud.png\" alt=\"erraform Cloud Connect Bitbucket-cloud\" width=\"367\" height=\"179\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket-cloud.png 410w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-bitbucket-cloud-300x146.png 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/p>\n<p>Then You have to open your Bitbucket account. Open the &#8220;Add OAuth Consumer&#8221; page. We assume that you already have the Bitbucket account.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1689 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-consumer.png\" alt=\"Bitbucket OAuth Consumer\" width=\"523\" height=\"417\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-consumer.png 951w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-consumer-300x239.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-consumer-768x612.png 768w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/p>\n<p>This page is located at \u201chttps:\/\/bitbucket.org\/&lt;YOUR_WORKSPACE_NAME&gt;\/workspace\/settings\/oauth-consumers\/new\u201d<\/p>\n<p>Fill out details in the OAuth-consumers page, and click the &#8220;save&#8221; button.<\/p>\n<p>Details for \u201cName\u201d, \u201cCallback URL\u201d, \u201cURL\u201d are values from your \u201cTerraform Cloud\u201d page like the below image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1690 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-oauth-consumer.png\" alt=\"Terraform Cloud OAuth Consumer\" width=\"764\" height=\"346\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-oauth-consumer.png 1282w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-oauth-consumer-300x136.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-oauth-consumer-1024x463.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-oauth-consumer-768x347.png 768w\" sizes=\"(max-width: 764px) 100vw, 764px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1691 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-permission.png\" alt=\"Bitbucket OAuth Permission\" width=\"467\" height=\"441\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-permission.png 832w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-permission-300x283.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-oauth-permission-768x725.png 768w\" sizes=\"(max-width: 467px) 100vw, 467px\" \/><\/p>\n<p>After the click save button, you will redirect to the OAuth settings page in the Bitbucket account.<\/p>\n<p>Find your new OAuth consumer under the &#8220;OAuth Consumers&#8221; heading, and click its name to reveal its details.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1692 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-key-secret.png\" alt=\"Bitbucket Key Secret\" width=\"515\" height=\"191\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-key-secret.png 815w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-key-secret-300x111.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-key-secret-768x285.png 768w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/p>\n<p>Going to your terraform cloud page and as I mentioned in the above image, Enter the \u201cKey\u201d and \u201cSecret\u201d from the OAuth Consumers details. And Click button &#8220;Connect and Continue&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1693 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-key-secret.png\" alt=\"Terraform Cloud Key Secret\" width=\"790\" height=\"321\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-key-secret.png 1343w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-key-secret-300x122.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-key-secret-1024x416.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-key-secret-768x312.png 768w\" sizes=\"(max-width: 790px) 100vw, 790px\" \/><\/p>\n<p>Then there will be a blue button shown for access. Click the blue &#8220;Grant access&#8221; button to proceed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1694 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-ssh-keypair.png\" alt=\"Terraform Cloud SSH Keypair\" width=\"205\" height=\"437\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-ssh-keypair.png 417w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-ssh-keypair-141x300.png 141w\" sizes=\"(max-width: 205px) 100vw, 205px\" \/><\/p>\n<p>For now we don&#8217;t need an SSH connection. So just click the button &#8220;Skip and Finish&#8221;. This returns you to Terraform Cloud&#8217;s VCS Providers page, which now includes your new Bitbucket Cloud client. You successfully connect your Bitbucket to terraform cloud for workflow.<\/p>\n<h3>Step 4: Create a Repository in Bitbucket<\/h3>\n<p>Now go to your Bitbucket account and create a Repository in your Bitbucket, by clicking the &#8220;Create Repository&#8221; Button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1695 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repositories.png\" alt=\"Bitbucket Repositories\" width=\"1565\" height=\"322\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repositories.png 1565w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repositories-300x62.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repositories-1024x211.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repositories-768x158.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repositories-1536x316.png 1536w\" sizes=\"(max-width: 1565px) 100vw, 1565px\" \/><\/p>\n<p>Fill out all the details and Click &#8220;Create Repository&#8221; Button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1696 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-create-repo.png\" alt=\"Bitbucket Create Repo\" width=\"464\" height=\"391\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-create-repo.png 816w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-create-repo-300x253.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-create-repo-768x647.png 768w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/p>\n<h3>Step 5: Create a New Workspace in Terraform Cloud<\/h3>\n<p>Now you are going to create a workspace for your Bitbucket repository in the Terraform Cloud. Click the &#8220;New Workspace&#8221; button to create a workspace.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1697 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspaces.png\" alt=\"Terraform Cloud Workspaces\" width=\"1807\" height=\"272\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspaces.png 1807w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspaces-300x45.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspaces-1024x154.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspaces-768x116.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspaces-1536x231.png 1536w\" sizes=\"(max-width: 1807px) 100vw, 1807px\" \/><\/p>\n<p>For Choose Type, click the first link as Version Control Workflow.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1698 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-workflow.png\" alt=\"Terraform Cloud Choose Workflow\" width=\"588\" height=\"242\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-workflow.png 1206w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-workflow-300x124.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-workflow-1024x422.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-workflow-768x316.png 768w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/p>\n<p>For Connect VCS, Click the Bitbucket link, which we created workflow connection previously.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1699 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-vcs.png\" alt=\"Terraform Cloud Connect VCS\" width=\"497\" height=\"156\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-vcs.png 818w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-vcs-300x94.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-connect-vcs-768x241.png 768w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/p>\n<p>Then Choose repository section, Click a repository you want to connect to for your workflow. It will list all of your repositories in your Bitbucket workspace.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1700 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-repo.png\" alt=\"Terraform Cloud Choose Repo\" width=\"352\" height=\"102\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-repo.png 545w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-choose-repo-300x87.png 300w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/p>\n<p>Click the &#8220;Advanced Options&#8221; to edit more options for your workflow.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1701 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspace-advanced-options.png\" alt=\"Terraform Cloud Workspace Advanced Options\" width=\"282\" height=\"151\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspace-advanced-options.png 487w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-workspace-advanced-options-300x161.png 300w\" sizes=\"(max-width: 282px) 100vw, 282px\" \/><\/p>\n<ul>\n<li>In the &#8220;VCS branch&#8221; section, you can enter a specific branch name or just leave it, it will take the default main branch.<\/li>\n<li>In the \u201cPull Requests&#8217; &#8216; section, make sure to enable the checkbox to trigger an automatic plan for your terraform code, whenever you make changes in your code.<\/li>\n<li>And finally, Click the &#8220;Create Workspace&#8221;.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1702 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-workspace.png\" alt=\"Terraform Cloud Create Workspace\" width=\"700\" height=\"373\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-workspace.png 1206w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-workspace-300x160.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-workspace-1024x546.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-create-workspace-768x409.png 768w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<h3>Step 6: Configure the Variables in Workspace<\/h3>\n<p>In your workspace&#8217;s variables section, click the &#8220;Add variable&#8221; to add variables for your code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1703 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-add-variables.png\" alt=\"Terraform Cloud Add Variables\" width=\"261\" height=\"404\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-add-variables.png 372w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-add-variables-194x300.png 194w\" sizes=\"(max-width: 261px) 100vw, 261px\" \/><\/p>\n<p>Enter the Variable name and value, Click the &#8220;Save variable&#8221; to save it. When you enter any sensitive data like access_keys and secret_keys, you can click the box &#8220;Sensitive&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1704 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-sensitive-variable.png\" alt=\"Terraform Cloud Sensitive Variable\" width=\"1022\" height=\"427\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-sensitive-variable.png 1752w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-sensitive-variable-300x125.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-sensitive-variable-1024x428.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-sensitive-variable-768x321.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-sensitive-variable-1536x642.png 1536w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/p>\n<ul>\n<li>So this won&#8217;t show the values in that variable, after you click the &#8220;Save variable&#8221;.<\/li>\n<li>And you can\u2019t edit the sensitive variables once you save them. You can just delete it and recreate it again.<\/li>\n<li>Most importantly, you have to provide your AWS account&#8217;s access_key and secret_key.<\/li>\n<li>Then only terraform has access to deploy your code on the aws account.<\/li>\n<\/ul>\n<p>You have successfully completed your Terraform Cloud setup with your Bitbucket.<\/p>\n<h2 style=\"text-align: left;\">Run Code on Terraform Cloud<\/h2>\n<h3>Step 1: Push Your Code to Bitbucket Repository<\/h3>\n<p>In your Bitbucket Repository, Click the &#8220;Clone&#8221; button and Click the &#8220;Clone in VS Code&#8221; button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1705 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-repo.png\" alt=\"Bitbucket Clone Repo\" width=\"1442\" height=\"137\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-repo.png 1442w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-repo-300x29.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-repo-1024x97.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-repo-768x73.png 768w\" sizes=\"(max-width: 1442px) 100vw, 1442px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1706 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-vscode.png\" alt=\"Bitbucket Repo Clone In VScode\" width=\"489\" height=\"295\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-vscode.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-vscode-300x181.png 300w\" sizes=\"(max-width: 489px) 100vw, 489px\" \/><\/p>\n<p>It navigates you to your VS code editor, and will ask for confirmation. Click &#8220;Open&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1707 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-permission.png\" alt=\"Bitbucket Clone Permission\" width=\"445\" height=\"185\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-permission.png 676w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-clone-permission-300x125.png 300w\" sizes=\"(max-width: 445px) 100vw, 445px\" \/><\/p>\n<p>Click &#8220;Add an existing folder&#8221; and select the folder where you have the code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1708 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-folder.png\" alt=\"Bitbucket Repo Clone In Folder\" width=\"626\" height=\"105\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-folder.png 817w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-folder-300x50.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-clone-in-folder-768x129.png 768w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/p>\n<p>And it opens a Atlassian page and asks for a confirmation, you can click the &#8220;Sign in with OAuth&#8221; and then Click &#8220;Grant Access&#8221; to clone the repository into your local.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1709 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-oauth-confirmation.png\" alt=\"Bitbucket Repo OAuth Confirmation\" width=\"322\" height=\"367\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-oauth-confirmation.png 546w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-repo-oauth-confirmation-263x300.png 263w\" sizes=\"(max-width: 322px) 100vw, 322px\" \/><\/p>\n<p>Now open the terminal in VS code and type the following commands to push your code.<\/p>\n<ol>\n<li><b> git add *<\/b><\/li>\n<\/ol>\n<p>This command adds a change in the working directory to the staging area. It tells Git that you want to include updates to a particular file in the next commit.<\/p>\n<ol start=\"2\">\n<li><b> git commit -m &#8220;&lt;commit message&gt;&#8221;<\/b><\/li>\n<\/ol>\n<p>This command followed by the -m flag and then your message in quotes.<\/p>\n<p>The -m option of commit command lets you write the commit message on the command line.<\/p>\n<ol start=\"3\">\n<li><b> git push origin &lt;branch-name&gt;<\/b><\/li>\n<\/ol>\n<p>In simple words git push command updates the remote repository with local commits.<\/p>\n<p>The origin represents a remote name where the user wants to push the changes.<\/p>\n<p>Git push command push commits made on a local branch to a remote repository.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1710 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-git-commit.png\" alt=\"Terraform Cloud Git Commit\" width=\"573\" height=\"187\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-git-commit.png 542w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-git-commit-300x98.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1711 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-git-push.png\" alt=\"Terraform Cloud Git Push\" width=\"571\" height=\"216\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-git-push.png 560w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-git-push-300x114.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p>You can check your repository to see whether your code uploads or not.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1712 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-files-in-repo.png\" alt=\"Bitbucket Files In Repo\" width=\"529\" height=\"400\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-files-in-repo.png 815w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-files-in-repo-300x227.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/bit-bucket-files-in-repo-768x581.png 768w\" sizes=\"(max-width: 529px) 100vw, 529px\" \/><\/p>\n<h3>Step 2: Plan and Apply the Code on Terraform Cloud<\/h3>\n<p>Go to your Terraform Cloud workspace, in the Overview section, there is a plan that\u00a0 has automatically triggered and planned successfully.<\/p>\n<p>Click on the &#8220;See Details&#8221; button to see the plan of your code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1713 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-planned-details.png\" alt=\"Terraform Cloud Planned Details\" width=\"1337\" height=\"532\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-planned-details.png 1337w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-planned-details-300x119.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-planned-details-1024x407.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-planned-details-768x306.png 768w\" sizes=\"(max-width: 1337px) 100vw, 1337px\" \/><\/p>\n<p>Here you can see your plan has successfully finished.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1714 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-plan-finished.png\" alt=\"Terraform Cloud Plan Finished\" width=\"1751\" height=\"358\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-plan-finished.png 1751w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-plan-finished-300x61.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-plan-finished-1024x209.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-plan-finished-768x157.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-plan-finished-1536x314.png 1536w\" sizes=\"(max-width: 1751px) 100vw, 1751px\" \/><\/p>\n<p>In the bottom of the page there is a list contains what resources going to create, and you can expand to see the full details of a specific resource by clicking the &#8220;+&#8221; icon<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1715 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-resources.png\" alt=\"Terraform Cloud Resources\" width=\"311\" height=\"58\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-resources.png 461w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-resources-300x56.png 300w\" sizes=\"(max-width: 311px) 100vw, 311px\" \/><\/p>\n<p>In bottom, It Needs Confirmation to Apply your code.<\/p>\n<p>Click the &#8220;Confirm &amp; Apply&#8221; button, and then click &#8220;Confirm Plan&#8221; to deploy your code to AWS.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1716 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-apply.png\" alt=\"Terraform Cloud Confirm Apply\" width=\"493\" height=\"428\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-apply.png 1032w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-apply-300x260.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-apply-1024x888.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-apply-768x666.png 768w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1717 \" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-plan.png\" alt=\"Terraform Cloud Confirm Plan\" width=\"542\" height=\"195\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-plan.png 938w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-plan-300x108.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-confirm-plan-768x277.png 768w\" sizes=\"(max-width: 542px) 100vw, 542px\" \/><\/p>\n<p>As you saw the below image your plan applied successfully.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1718 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-apply-finished.png\" alt=\"Terraform Cloud Apply Finished\" width=\"1755\" height=\"672\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-apply-finished.png 1755w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-apply-finished-300x115.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-apply-finished-1024x392.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-apply-finished-768x294.png 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-apply-finished-1536x588.png 1536w\" sizes=\"(max-width: 1755px) 100vw, 1755px\" \/><\/p>\n<p>To confirm whether your bucket is created or not, see your aws account and select the S3 bucket section.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1719 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-list.png\" alt=\"Terraform Cloud S3 List\" width=\"1408\" height=\"60\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-list.png 1408w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-list-300x13.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-list-1024x44.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-list-768x33.png 768w\" sizes=\"(max-width: 1408px) 100vw, 1408px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1720 size-full\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-bucket.png\" alt=\"Terraform Cloud S3 Bucket\" width=\"1403\" height=\"527\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-bucket.png 1403w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-bucket-300x113.png 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-bucket-1024x385.png 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/terraform-cloud-s3-bucket-768x288.png 768w\" sizes=\"(max-width: 1403px) 100vw, 1403px\" \/><\/p>\n<p>With just one click we have automated the whole workflow setup such is the power of automation by integrating <strong>Bitbucket and Terraform Cloud<\/strong>. With this we can easily deploy any of the infrastructure on AWS Cloud automatically. Whenever you push the code to your repository, Terraform Cloud will automatically triggered and deploy your code on AWS Cloud.<\/p>\n<p><span style=\"font-weight: 400;\">Hope you have learnt how to execute the terraform code using <strong>Terraform Cloud<\/strong> account. It is a very simple process to manage all your terraform codes inside the cloud account. If you have any questions in this article, please write it in the comments section!!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous article, we have explained how to create and execute a simple terraform script using the CLI command. In this blog post, we are going to teach you how to create a Terraform Cloud account and link it with the Bitbucket code. Why do we have to do this?. In an ideal scenario, [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":1732,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[424],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Setup Terraform Cloud using Bitbucket Repository? | easydeploy.io<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Setup Terraform Cloud using Bitbucket Repository? | easydeploy.io\" \/>\n<meta property=\"og:description\" content=\"In our previous article, we have explained how to create and execute a simple terraform script using the CLI command. In this blog post, we are going to teach you how to create a Terraform Cloud account and link it with the Bitbucket code. Why do we have to do this?. In an ideal scenario, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\" \/>\n<meta property=\"og:site_name\" content=\"easydeploy.io\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/Jerinrathnam\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-20T10:01:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-20T22:41:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1640\" \/>\n\t<meta property=\"og:image:height\" content=\"924\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jerin Rathnam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@jerin_rathnam\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jerin Rathnam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\"},\"author\":{\"name\":\"Jerin Rathnam\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/939543ac3b33fadea8b5115ab9a1280f\"},\"headline\":\"How to Setup Terraform Cloud using Bitbucket Repository?\",\"datePublished\":\"2022-07-20T10:01:11+00:00\",\"dateModified\":\"2022-07-20T22:41:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\"},\"wordCount\":1408,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png\",\"articleSection\":[\"Terraform\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\",\"name\":\"How to Setup Terraform Cloud using Bitbucket Repository? | easydeploy.io\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png\",\"datePublished\":\"2022-07-20T10:01:11+00:00\",\"dateModified\":\"2022-07-20T22:41:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png\",\"width\":1640,\"height\":924,\"caption\":\"How to setup Terraform Cloud Using Bitbucket?\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.easydeploy.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Setup Terraform Cloud using Bitbucket Repository?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"name\":\"easydeploy.io\",\"description\":\"A Cloud Architect Company\",\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\",\"name\":\"EasyDeploy Technologies Pvt Ltd\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"width\":536,\"height\":100,\"caption\":\"EasyDeploy Technologies Pvt Ltd\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/939543ac3b33fadea8b5115ab9a1280f\",\"name\":\"Jerin Rathnam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ca2c2ab4a28d380073334816b42aaa40?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ca2c2ab4a28d380073334816b42aaa40?s=96&d=mm&r=g\",\"caption\":\"Jerin Rathnam\"},\"description\":\"Jerin Rathnam is a proficient DevOps engineer who is dedicated to streamlining software development and deployment processes. He has extensive knowledge of cloud infrastructure, containerization, and CI\/CD pipelines, which enables him to effectively connect development and operations. Jerin specializes in creating numerous Terraform modules for multi-cloud infrastructure and possesses immense expertise in configuring and managing cloud infrastructure. His profound understanding of containerization, along with his experience in orchestration tools like Docker and Kubernetes, further supports his skills as a valuable DevOps engineer.\",\"sameAs\":[\"https:\/\/www.gemjerin.site\",\"https:\/\/www.facebook.com\/Jerinrathnam\",\"https:\/\/www.instagram.com\/gem_jerin_rathnam\/\",\"https:\/\/www.linkedin.com\/in\/jerin-rathnam\/\",\"https:\/\/x.com\/jerin_rathnam\",\"@jerinrathnam\"],\"url\":\"https:\/\/www.easydeploy.io\/blog\/author\/jerin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Setup Terraform Cloud using Bitbucket Repository? | easydeploy.io","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/","og_locale":"en_GB","og_type":"article","og_title":"How to Setup Terraform Cloud using Bitbucket Repository? | easydeploy.io","og_description":"In our previous article, we have explained how to create and execute a simple terraform script using the CLI command. In this blog post, we are going to teach you how to create a Terraform Cloud account and link it with the Bitbucket code. Why do we have to do this?. In an ideal scenario, [&hellip;]","og_url":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/","og_site_name":"easydeploy.io","article_author":"https:\/\/www.facebook.com\/Jerinrathnam","article_published_time":"2022-07-20T10:01:11+00:00","article_modified_time":"2022-07-20T22:41:43+00:00","og_image":[{"width":1640,"height":924,"url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png","type":"image\/png"}],"author":"Jerin Rathnam","twitter_card":"summary_large_image","twitter_creator":"@jerin_rathnam","twitter_misc":{"Written by":"Jerin Rathnam","Estimated reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#article","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/"},"author":{"name":"Jerin Rathnam","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/939543ac3b33fadea8b5115ab9a1280f"},"headline":"How to Setup Terraform Cloud using Bitbucket Repository?","datePublished":"2022-07-20T10:01:11+00:00","dateModified":"2022-07-20T22:41:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/"},"wordCount":1408,"commentCount":0,"publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png","articleSection":["Terraform"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/","url":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/","name":"How to Setup Terraform Cloud using Bitbucket Repository? | easydeploy.io","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png","datePublished":"2022-07-20T10:01:11+00:00","dateModified":"2022-07-20T22:41:43+00:00","breadcrumb":{"@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#primaryimage","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/07\/setup-terraform-cloud-bitbucket.png","width":1640,"height":924,"caption":"How to setup Terraform Cloud Using Bitbucket?"},{"@type":"BreadcrumbList","@id":"https:\/\/www.easydeploy.io\/blog\/terraform-cloud-bitbucket-repository\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.easydeploy.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Setup Terraform Cloud using Bitbucket Repository?"}]},{"@type":"WebSite","@id":"https:\/\/www.easydeploy.io\/blog\/#website","url":"https:\/\/www.easydeploy.io\/blog\/","name":"easydeploy.io","description":"A Cloud Architect Company","publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.easydeploy.io\/blog\/#organization","name":"EasyDeploy Technologies Pvt Ltd","url":"https:\/\/www.easydeploy.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","width":536,"height":100,"caption":"EasyDeploy Technologies Pvt Ltd"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/939543ac3b33fadea8b5115ab9a1280f","name":"Jerin Rathnam","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ca2c2ab4a28d380073334816b42aaa40?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ca2c2ab4a28d380073334816b42aaa40?s=96&d=mm&r=g","caption":"Jerin Rathnam"},"description":"Jerin Rathnam is a proficient DevOps engineer who is dedicated to streamlining software development and deployment processes. He has extensive knowledge of cloud infrastructure, containerization, and CI\/CD pipelines, which enables him to effectively connect development and operations. Jerin specializes in creating numerous Terraform modules for multi-cloud infrastructure and possesses immense expertise in configuring and managing cloud infrastructure. His profound understanding of containerization, along with his experience in orchestration tools like Docker and Kubernetes, further supports his skills as a valuable DevOps engineer.","sameAs":["https:\/\/www.gemjerin.site","https:\/\/www.facebook.com\/Jerinrathnam","https:\/\/www.instagram.com\/gem_jerin_rathnam\/","https:\/\/www.linkedin.com\/in\/jerin-rathnam\/","https:\/\/x.com\/jerin_rathnam","@jerinrathnam"],"url":"https:\/\/www.easydeploy.io\/blog\/author\/jerin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/1675"}],"collection":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/comments?post=1675"}],"version-history":[{"count":11,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/1675\/revisions"}],"predecessor-version":[{"id":1730,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/1675\/revisions\/1730"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media\/1732"}],"wp:attachment":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media?parent=1675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/categories?post=1675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/tags?post=1675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}