<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Celestina Amadi on Medium]]></title>
        <description><![CDATA[Stories by Celestina Amadi on Medium]]></description>
        <link>https://medium.com/@celestina-amadi?source=rss-1f64a987b42d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FHsfm1aDTMYMXFkM</url>
            <title>Stories by Celestina Amadi on Medium</title>
            <link>https://medium.com/@celestina-amadi?source=rss-1f64a987b42d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 21:36:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@celestina-amadi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Move to Terraform Ephemeral Blocks: Keep Your Secrets Out of State Files]]></title>
            <link>https://celestina-amadi.medium.com/move-toterraform-ephemeral-blocks-keep-your-secrets-out-of-state-files-3fbdafc5ce52?source=rss-1f64a987b42d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fbdafc5ce52</guid>
            <category><![CDATA[ephemeral-resources]]></category>
            <category><![CDATA[secrets]]></category>
            <category><![CDATA[terraform-ephemeral]]></category>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Celestina Amadi]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 19:10:32 GMT</pubDate>
            <atom:updated>2025-08-02T19:38:29.940Z</atom:updated>
            <content:encoded><![CDATA[<p>HashiCorp’s <a href="https://www.hashicorp.com/en/blog/terraform-1-11-ephemeral-values-managed-resources-write-only-arguments">recent announcement of ephemeral resources in Terraform</a> addresses one of the most persistent security challenges in Infrastructure as Code: keeping sensitive data out of state files. After years of workarounds and external integrations, we finally have a native solution that’s both elegant and secure.</p><h3>The Problem We’ve All Faced</h3><p>If you’ve worked with Terraform in production, you’ve probably encountered this scenario: you need to create infrastructure that requires sensitive data (database passwords, API keys, certificates), but you don’t want that data persisting in your state files where it could be accidentally exposed, committed to version control, or accessed by unauthorized users.</p><p>Traditional approaches included:</p><ul><li>External secret management systems with complex integrations</li><li>Manual secret injection during deployment</li><li>Accepting the risk and implementing strict state file access controls</li><li>Creative workarounds that made configurations harder to maintain</li></ul><h3>Ephemeral Resources</h3><p>Ephemeral resources exist only during a Terraform operation. They’re used and destroyed within a single execution cycle, never persisting in state files. This approach provides the security we need while maintaining Terraform’s declarative simplicity.</p><h3>Setting Up Your Environment</h3><p>Before we dive into examples, let’s set up a basic environment. You’ll need:</p><ul><li>Terraform 1.11+ (for ephemeral resource and write-only argument support)</li><li>Google Cloud SDK (gcloud) configured with appropriate permissions</li><li>An existing Google Secret Manager secret</li></ul><p>Make sure you’re using the latest version of the Google provider that supports ephemeral resources and write-only arguments.</p><h3>Example</h3><p>Let’s start with a simple example using Terraform’s GCP provider:</p><pre>terraform {<br>  required_version = &quot;&gt;= 1.11&quot;<br>  <br>  required_providers {<br>    google = {<br>      source  = &quot;hashicorp/google&quot;<br>      version = &quot;6.46.0&quot;<br>    }<br>  }<br>}</pre><pre># main.tf<br>provider &quot;google&quot; {<br>  project = var.project_id<br>  region  = var.region<br>}</pre><pre># Fetch latest secret version from Google Secret Manager using ephemeral resource<br>ephemeral &quot;google_secret_manager_secret_version&quot; &quot;db_password&quot; {<br>  secret  = &quot;db-password&quot;<br>  version = &quot;latest&quot;<br>}</pre><pre># Use the ephemeral secret in a managed resource<br>resource &quot;google_sql_user&quot; &quot;admin&quot; {<br>  name     = &quot;db-admin&quot;<br>  instance = google_sql_database_instance.primary.name<br>  password_wo = ephemeral.google_secret_manager_secret_version.db_password.secret_data<br>}</pre><p>Notice the password_wo argument instead of the traditional password. The _wo suffix indicates this is a write-only field, it accepts ephemeral values like secrets from Google Secret Manager, but it won&#39;t be stored in the Terraform state or shown in outputs. This ensures your sensitive data remains secure throughout the deployment process.</p><h3>Migration Strategy</h3><p>To migrate existing infrastructure on GCP to use ephemeral resources, follow these steps:</p><h3>Step 1: Identify Sensitive Data</h3><p>Audit your current Terraform configurations to find where sensitive values are stored in state files, especially secrets fetched via data blocks and passed into managed resource fields like password.</p><p>For example:</p><pre>data &quot;google_secret_manager_secret_version&quot; &quot;db_password&quot; {<br>  secret  = &quot;db-password&quot;<br>  version = &quot;latest&quot;<br>}<br><br>resource &quot;google_sql_user&quot; &quot;admin&quot; {<br>  name     = &quot;db-admin&quot;<br>  instance = google_sql_database_instance.primary.name<br>  password = data.google_secret_manager_secret_version.db_password.secret_data<br>}</pre><p>In this setup, the password will be persisted in the state file which is a common risk.</p><h3>Step 2: Plan Your Migration</h3><p>Update the resource to conditionally switch from the old data block to the new ephemeral approach using password_wo. This minimizes disruption and allows you to test in phases.</p><pre>resource &quot;google_sql_user&quot; &quot;admin&quot; {<br>  name     = &quot;dbadmin&quot;<br>  instance = google_sql_database_instance.primary.name<br><br>  password  = var.migration_phase ? null : data.google_secret_manager_secret_version.db_password.secret_data<br>  <br>  password_wo = var.migration_phase ? ephemeral.google_secret_manager_secret_version.db_password.secret_data : null<br>}</pre><p>This approach allows you to toggle between the old and new strategy using a boolean migration_phase variable.</p><h3>Step 3: Validate and Deploy</h3><p>Test thoroughly in non-production environments before rolling out to production:</p><ul><li>Confirm that secrets no longer appear in your state file</li><li>Verify google_sql_user gets updated when the secret changes in Google Secret Manager</li><li>Monitor for any unexpected diffs in the Terraform plan</li></ul><p>Once validated, you can remove the old data block and fully adopt the ephemeral approach.</p><h3>Step 4: Fully Adopt Ephemeral Resources</h3><p>After migration and validation, remove conditional logic and legacy data references. Here’s what the final configuration should look like:</p><pre>ephemeral &quot;google_secret_manager_secret_version&quot; &quot;db_password&quot; {<br>  secret  = &quot;db-password-prod&quot;<br>  version = &quot;latest&quot;<br>}<br><br>resource &quot;google_sql_user&quot; &quot;admin&quot; {<br>  name     = &quot;dbadmin&quot;<br>  instance = google_sql_database_instance.primary.name<br>  password_wo = ephemeral.google_secret_manager_secret_version.db_password.secret_data<br>}</pre><p>With this setup:</p><ul><li>Secrets are never written to the Terraform state.</li><li>Your configuration is simpler, cleaner, and more secure.</li></ul><h3>Best Practices</h3><ul><li>Always use write-only arguments with ephemeral resources containing sensitive data</li><li>Document your ephemeral resource patterns for team consistency</li></ul><h3>Conclusion</h3><p>Ephemeral resources represent a significant step forward in Terraform security. They provide a clean, native solution to the persistent challenge of managing sensitive data in Infrastructure as Code.</p><h3>Additional Resources</h3><ul><li><a href="https://www.hashicorp.com/en/blog/terraform-1-11-ephemeral-values-managed-resources-write-only-arguments">Terraform 1.11: Ephemeral Values, Managed Resources, Write-Only Arguments</a></li><li><a href="https://www.hashicorp.com/en/blog/terraform-ephemeral-resources-waypoint-actions-and-more-at-hashidays-2025">Terraform Ephemeral Resources, Waypoint Actions, and More at HashiDays 2025</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fbdafc5ce52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Terraform Versions Like a Pro: Say Goodbye to Version Conflicts with tfenv]]></title>
            <link>https://celestina-amadi.medium.com/managing-terraform-versions-like-a-pro-say-goodbye-to-version-conflicts-with-tfenv-2d95bcac8de6?source=rss-1f64a987b42d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d95bcac8de6</guid>
            <category><![CDATA[tfenv]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[terraform-version]]></category>
            <dc:creator><![CDATA[Celestina Amadi]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 13:14:16 GMT</pubDate>
            <atom:updated>2025-07-14T13:14:16.346Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve been working with Terraform for a while, you’ve probably encountered this frustrating scenario: you’re switching between different projects, and suddenly your Terraform commands start throwing errors because Project A requires Terraform 1.12.0 while Project B needs 1.11.5. Sound familiar?</p><p>This version juggling act is a common headache in the DevOps world, but there’s an elegant solution: <strong>tfenv, </strong>a Terraform version manager that makes switching between versions as easy as changing your shirt.</p><h3>The Problem: Version Hell</h3><p>Terraform is constantly evolving, with new features and breaking changes introduced regularly. Different projects often get locked to specific Terraform versions for stability reasons, leaving developers in a bind when they need to work across multiple codebases.</p><p>The traditional approach of manually downloading, installing, and managing different Terraform binaries is not only tedious but also error-prone. You might forget which version you’re running, accidentally upgrade a project that wasn’t ready, or spend precious time troubleshooting compatibility issues.</p><h3>Enter tfenv: Your Terraform Version Manager</h3><p>tfenv is a lightweight command-line tool that simplifies Terraform version management. Think of it as rbenv for Ruby or nvm for Node.js, but specifically designed for Terraform.</p><p>Here’s how to set it up and start using it:</p><h3>Step-by-Step Setup</h3><h3>1. Remove Your Current Terraform Installation</h3><p>First, you’ll need to unlink your current Terraform installation if you installed it via Homebrew:</p><pre>brew unlink terraform</pre><p>This command removes the symlinks that Homebrew created, effectively “disconnecting” the current Terraform installation without deleting it.</p><h3>2. Install tfenv</h3><p>Next, install tfenv using Homebrew:</p><pre>brew install tfenv</pre><p>tfenv will now become your central hub for managing all Terraform versions.</p><h3>3. Install Your Desired Terraform Version</h3><p>Install the specific version you need:</p><pre>tfenv install 1.12.0</pre><p>This downloads and installs Terraform version 1.12.0 alongside any other versions you might have installed.</p><h3>4. Set the Active Version</h3><p>Tell tfenv which version to use:</p><pre>tfenv use 1.12.0</pre><p>This sets version 1.12.0 as the active Terraform version for your current session.</p><h3>5. Link tfenv (Optional)</h3><p>If you want to ensure tfenv is properly linked in your system:</p><pre>brew link tfenv</pre><p>This step ensures that the terraform command points to the tfenv-managed version.</p><h3>Pro Tips for Using tfenv</h3><h3>Check Available Versions</h3><pre>tfenv list-remote</pre><p>This shows all available Terraform versions you can install.</p><h3>See Installed Versions</h3><pre>tfenv list</pre><p>This displays all versions you’ve installed locally, with an asterisk marking the currently active version.</p><h3>Install Latest Version</h3><pre>tfenv install latest</pre><p>Automatically installs the most recent stable Terraform release.</p><h3>Project-Specific Versions</h3><p>Create a .terraform-version file in your project root containing just the version number:</p><pre>1.12.0</pre><p>When you cd into the project directory, tfenv will automatically switch to that version.</p><h3>Why This Approach Works</h3><ol><li><strong>Isolation</strong>: Each project can have its own Terraform version without affecting others</li><li><strong>Consistency</strong>: Team members can ensure they’re all using the same version</li><li><strong>Flexibility</strong>: Switch between versions instantly without reinstalling</li><li><strong>Automation</strong>: Set up CI/CD pipelines to use specific versions automatically</li></ol><h3>Common Use Cases</h3><ul><li><strong>Legacy Projects</strong>: Maintain older projects that can’t be upgraded immediately</li><li><strong>Testing</strong>: Try new Terraform features without breaking existing workflows</li><li><strong>Team Collaboration</strong>: Ensure everyone on your team uses the same version</li><li><strong>Multi-Client Work</strong>: Handle different client projects with different requirements</li></ul><h3>Troubleshooting</h3><p>If you encounter issues after switching, try:</p><pre># Clear Terraform cache<br>rm -rf .terraform/<br>terraform init</pre><p>This refreshes your Terraform state and ensures compatibility with the new version.</p><h3>Conclusion</h3><p>Managing Terraform versions doesn’t have to be a source of frustration. With tfenv, you can switch between versions seamlessly, maintain project-specific configurations, and avoid the compatibility headaches that plague many workflows.</p><p><em>Have you encountered other Terraform version management challenges? Share your experiences in the comments below, and let’s help each other build better DevOps practices.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d95bcac8de6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Import your existing CloudFlare resources into Terraform using cf-terraforming]]></title>
            <link>https://celestina-amadi.medium.com/importing-your-existing-cloudflare-resources-into-terraform-cf-terraforming-4f0e05dd8cc4?source=rss-1f64a987b42d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f0e05dd8cc4</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[cf-terraforming]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[terraform-cloud]]></category>
            <dc:creator><![CDATA[Celestina Amadi]]></dc:creator>
            <pubDate>Sat, 24 May 2025 21:39:44 GMT</pubDate>
            <atom:updated>2025-05-25T15:25:48.336Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey there, if you’re reading this, it means you’re trying to terraform your Cloudflare resources or just reading for fun.</p><p>Managing Cloudflare with Terraform allows you to automate DNS records, firewall rules, and other configurations in a structured and repeatable way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Cq1rzXhKnmGxIAbXLB-YWA@2x.jpeg" /></figure><h3>What is Cloudflare?</h3><p>Cloudflare is a global network service that enhances website security, performance, and reliability. It acts as a Content Delivery Network (CDN) and reverse proxy, offering features like DDoS protection, web application firewalls (WAF), and DNS services.</p><p>In layman’s terms, Cloudflare helps you manage domain records (e.g., app.example.com) and secure your website with a firewall or proxy.</p><h3>What is Terraform?</h3><p>Terraform is an Infrastructure as Code (IaC) tool from HashiCorp that lets you define and provision infrastructure (like servers, databases, and networks) using code instead of manual configurations through the GUI.</p><h3>What We’ll Cover</h3><p>We’ll start by setting up Cloudflare with Terraform <strong>without</strong> a backend and then migrate it to HashiCorp Cloud Platform (HCP) as our Terraform backend.</p><h3>Prerequisites</h3><p>Before we begin, ensure you have the following:</p><ol><li>Cloudflare account <a href="https://dash.cloudflare.com/sign-up?_gl=1*4nqtt7*_gcl_au*NjI5MzEzMDIuMTc0MjAxNjkzNA..*_ga*NDk4ODE3NTguMTc0MjAxNjkzNQ..*_ga_SQCRB0TXZW*MTc0MjAxNjkzNC4xLjEuMTc0MjAxNzUyMy41MS4wLjA.">LINK</a></li><li>Install terraform <a href="https://developer.hashicorp.com/terraform/install">LINK</a></li></ol><h3>Setting Up Terraform for Cloudflare</h3><h4>Info you will need from Cloudflare</h4><ol><li><strong>Zone ID:</strong> Navigate to <strong>Domain &gt; Overview</strong> and scroll to the right.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Nl4fbI-QzJCjdav8J7E6Hg.png" /><figcaption>Overview page of cloudflare</figcaption></figure><p>2. API Token:</p><ul><li>Copy the <strong>Zone ID</strong></li><li>Click <strong>Get your API token</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*H-5Len7-ByCDQ9KzFIfGJQ.png" /></figure><ul><li>Go to <strong>Create Token &gt; Create Custom Token</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPTWqAyu0yzcrsVAq450Eg.png" /></figure><ul><li>Add the necessary permissions, as seen above. Your account can contain more than one domain (ZONE). For this blog, we will allow all accounts and zones, but you can streamline access as needed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*BQ5hsMo8cgvK5AplNY83pw.png" /></figure><p><strong>Additional Configuration:</strong></p><ul><li>For added security, you can add your company network range to the allowed IPs. For now, leave it empty.</li><li>You can set a TTL based on business needs, but for now, leave it empty.</li><li>Copy the token and store it securely.</li></ul><p>⚠️ <strong>This token allows programmatic edits to your Cloudflare account, so keep it safe!</strong></p><h3>Now, let’s write our Terraform code.</h3><p>1. Create Project Structure</p><pre>mkdir cloudflare-terraform<br>cd cloudflare-terraform</pre><p>2. Create provider.tf</p><pre>terraform {<br>  required_providers {<br>    cloudflare = {<br>      source = &quot;cloudflare/cloudflare&quot;<br>      version = &quot;5.5.0&quot;<br>    }<br>  }<br>}</pre><p>3. Create .gitignore</p><pre># Local .terraform directories<br>**/.terraform/* <br># Ignore the Terraform working directory<br>.terraform/<br>.terraform.*<br># Ignore Terraform state files<br>*.tfstate<br>*.tfstate.*</pre><h3>Importing Existing Cloudflare Records</h3><p>This write-up assumes you have records already; if not, just create with: <a href="https://registry.terraform.io/providers/cloudflare/cloudflare/latest">link</a></p><p>Cloudflare provides a tool to import existing Cloudflare resources:</p><p>Install <a href="https://github.com/cloudflare/cf-terraforming">cf-terraforming</a>.</p><pre>#on mac<br>brew tap cloudflare/cloudflare<br>brew install cloudflare/cloudflare/cf-terraforming<br><br>#on linux<br>go install github.com/cloudflare/cf-terraforming/cmd/cf-terraforming@latest</pre><p>Export the Environment Variables</p><pre># if using API Token<br>export CLOUDFLARE_API_TOKEN=&#39;update-with-api-token&#39;<br># specify zone ID<br>export CLOUDFLARE_ZONE_ID=&#39;update-with-zone-id&#39;<br><br>//remember this saves it to just in that terminal session</pre><h3>Generate Terraform Import File</h3><p>Always check for updates, as the sample on the cf-terraforming GitHub page uses cloudflare_record, which is now deprecated, update it to the current Cloudflare resource cloudflare_dns_record.</p><p>⚠️ <em>The </em><em>cloudflare_record resource type is deprecated. Update it to </em><em>cloudflare_dns_record.</em></p><p>Run the following command from the root of your Terraform project to generate resource blocks for your existing DNS record:</p><pre>terraform init</pre><pre>cf-terraforming generate \<br>  --resource-type &quot;cloudflare_dns_record&quot; \<br>  --zone $CLOUDFLARE_ZONE_ID &gt; dns-record.tf</pre><ul><li>This will create dns-record.tf resource block containing all records for the domain (zone). You can adjust the resource local name if you want, as this will be referenced when you run the import</li></ul><p>If you run terraform planIt will try to create the resources that were generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3P3mZU0VFhr11yh_hb_q7w.png" /></figure><p>An <a href="https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/dns_record#import">import</a> command is needed so to be import the state file.</p><pre>terraform import cloudflare_dns_record.&lt;local_name&gt; &#39;&lt;zone_id&gt;/&lt;dns_record_id&gt;&#39;</pre><p>Edit the above for the number of resources you want to import.</p><pre>&lt;local_name&gt; = the name of the resource. <br>&lt;zone_id&gt; = the zone you copied from cloudflare<br>&lt;dns_record_id&gt; = terraform_managed_resource_&lt;the strings that comes when you generate the resource block&gt;</pre><p>I have created a simple Go script that helps pull the needed values and creates the import command. Save the below to main.go</p><pre>package main<br><br>import (<br> &quot;fmt&quot;<br> &quot;os&quot;<br> &quot;regexp&quot;<br> &quot;strings&quot;<br>)<br><br>func main() {<br> if len(os.Args) != 2 {<br>  fmt.Println(&quot;Usage: go run main.go &lt;terraform_file.tf&gt;&quot;)<br>  return<br> }<br><br> filePath := os.Args[1]<br><br> content, err := os.ReadFile(filePath)<br> if err != nil {<br>  fmt.Printf(&quot;Error reading file: %v\n&quot;, err)<br>  return<br> }<br><br> // Regex to extract resource names and zone_ids<br> re := regexp.MustCompile(<br>  `resource\s+&quot;cloudflare_dns_record&quot;\s+&quot;(terraform_managed_resource_[a-f0-9]+)&quot;\s*{[^}]*?zone_id\s*=\s*&quot;([^&quot;]+)&quot;`,<br> )<br><br> matches := re.FindAllStringSubmatch(string(content), -1)<br><br> if len(matches) == 0 {<br>  fmt.Println(&quot;No matching Cloudflare DNS records found.&quot;)<br>  return<br> }<br><br> fmt.Println(&quot;#!/bin/bash&quot;)<br> fmt.Println()<br><br> for _, match := range matches {<br>  localName := match[1]<br>  zoneID := match[2]<br>  dnsRecordID := strings.TrimPrefix(localName, &quot;terraform_managed_resource_&quot;)<br>  fmt.Printf(&quot;terraform import cloudflare_dns_record.%s &#39;%s/%s&#39;\n&quot;, localName, zoneID, dnsRecordID)<br> }<br>}</pre><p>Run the command — — — — <em>go run main.go dns-record.tf. &gt; import.sh</em></p><p>Review the generated file <em>import.sh, </em>and you will see it has all the Terraform import commands needed. Run the below command</p><pre>chmod +x import.sh<br>./import.sh</pre><p>This will import the state of the resource to Terraform. You can delete the import.sh file.</p><p>When you run — — terraform plan — — it will refresh the state and show no changes .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sBOWkTstmEpC0opFjoP6hA.png" /></figure><h3>Migrate State to Remote Backend</h3><p>To enhance collaboration, move your Terraform state to a remote backend.</p><ol><li><strong>Create a GitHub Repository</strong></li></ol><p>Initialize the directory</p><p>Push your Terraform configuration to the repository.</p><p><strong>2. Use Terraform Cloud for Remote State</strong></p><p>Terraform Cloud provides a free plan via <a href="https://developer.hashicorp.com/terraform/tutorials/cloud-get-started/cloud-workspace-create">HashiCorp Cloud Platform (HCP)</a>.</p><p><strong>3. Configure Remote Backend in </strong><strong>provider.tf</strong></p><pre>terraform {<br>  required_providers {<br>    cloudflare = {<br>      source = &quot;cloudflare/cloudflare&quot;<br>      version = &quot;5.5.0&quot;<br>    }<br>  }<br><br>  cloud {<br>    organization = &quot;the name of your organization&quot;<br>    workspaces {<br>      name = &quot;cloudflare-terraform&quot; #the name of the workspace we will be creating<br>    }<br>  }<br>  <br>}</pre><p><strong>4. Create a Terraform Cloud Workspace</strong></p><ol><li>Click <strong>New</strong> &gt; <strong>Workspace</strong>.</li><li>Select <strong>Version Control Workflow</strong> and link your GitHub repository.</li><li>Choose the repo you pushed earlier.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZUOETKeRvjZvisNNCo2EA.png" /></figure><ul><li>Select the first one: this will be connected to our GitHub repo</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lKF4SAGOX0CYCtVOaR9uug.png" /></figure><p>Click &lt;GitHub App&gt; if you are using GitHub, or select a different VCS depending on what you are using</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-W-fgHFYEU5i6ZY9gS0JQ.png" /></figure><p>Select the repo you pushed to from the drop-down of available repos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ_FjGR5knQ0ZsYMf1y4ug.png" /></figure><p><strong>5. Set Environment Variables</strong></p><p>Navigate to:<br> <strong>Workspace Overview</strong> &gt; <strong>Configure Environment Variables</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tZGyDFxIX52Et-2c9UAIg.png" /></figure><p>Configure the environmental variable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MGeTuYzlpdp5wPAax3dsQg.png" /></figure><p>Add the environmental variable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-F0hL41Dv_EVonOOiciWtw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nsYRzJzJiCRRCp_T7k_MkQ.png" /></figure><p>Run terraform init, you will get a prompt to migrate your state, type yes</p><p>Terraform will migrate your state to the remote</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yBaitWb3-Ixa8Ir9YRd0Zw.png" /></figure><p>Now you can collaborate with teammates on this.</p><p>Cheers ✍🏼 !!!!!!!!!!!!!</p><p>Resource Link</p><p><a href="https://github.com/cloudflare/cf-terraforming">GitHub - cloudflare/cf-terraforming: A command line utility to facilitate terraforming your existing Cloudflare resources.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f0e05dd8cc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is this the beginning?]]></title>
            <link>https://celestina-amadi.medium.com/is-this-the-beginning-bbd9294d9f44?source=rss-1f64a987b42d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbd9294d9f44</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Celestina Amadi]]></dc:creator>
            <pubDate>Sun, 30 Jun 2024 18:21:20 GMT</pubDate>
            <atom:updated>2024-09-26T04:27:04.800Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi beautiful human! I’m Celestina 😌, a DevOps engineer passionate about optimizing and automating workflows. I never thought my first ever blog would be writing a backend article, so let’s get to it.</p><p>Recently, I realized that to truly excel in my field, I need a solid grasp of backend development or let’s say a good programming knowledge. This realization led on my Golang learning journey, a powerful backend language. You may be wondering why I chose Golang and not the popular python or even JavaScript. As a Devops babe, it was natural, well also including the fact that Golang was used to build most popular Devops tools (Kubernetes).</p><p>One of the most difficult challenges I faced recently was setting up a CI/CD pipeline for a complex microservices architecture. Although I had the DevOps skills to handle the infrastructure, understanding the backend services that needed to be deployed was a significant hurdle for me.</p><p>I started by diving deep into the backend codebases of the microservices. Despite my limited backend experience, I spent time reading through the documentation and exploring the code to understand how each service worked. I decided to focus on one service at a time, breaking down the architecture into manageable components. This approach made the task less overwhelming. I also sought guidance from backend developers on my team, who helped me grasp the more complex parts of the code. With a basic understanding of the services, I set up the CI/CD pipeline using Jenkins for automation and Docker for containerization.</p><p>Testing was a crucial part of the process. I encountered several issues related to database connections and API endpoints, which required a deeper understanding of backend development. I worked with PostgreSQL for database management, learning its configuration and optimization techniques. This hands-on experience was invaluable in solidifying my backend skills.</p><p>This experience taught me the importance of understanding both DevOps and backend development to be truly effective. It gave me a deeper appreciation for the intricacies of backend services and databases like PostgreSQL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbd9294d9f44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>