Terraform — Import Blocks

<p>A quick article showcasing the new import block capability recently released in&nbsp;<a href="https://github.com/hashicorp/terraform/releases/tag/v1.5.0-beta1" rel="noopener ugc nofollow" target="_blank">HashiCorp Terraform v1.5 beta 1</a>.</p> <h1>Current situation &mdash; import command</h1> <p>Most of you will be familiar with the&nbsp;<a href="https://developer.hashicorp.com/terraform/cli/commands/import" rel="noopener ugc nofollow" target="_blank">terraform import command</a>&nbsp;already but as a quick refresher, it&#39;s essentially a quick way to as it says &ldquo;import&rdquo; objects outside of terraform into your terraform state. Let&#39;s look at an example of this in action.</p> <p>Let&rsquo;s suppose I have a GCP Bucket called&nbsp;<em>`this-is-my-bucket-name`&nbsp;</em>in GCP (which I do). To import that into my terraform state I would do the following:</p> <p><a href="https://danielrandell93.medium.com/terraform-import-blocks-dedcdf453f45"><strong>Website</strong></a></p>
Tags: Import Blocks