<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.davidedoro.it/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.davidedoro.it/feed.php">
        <title>dd-wiki - terraform</title>
        <description></description>
        <link>https://wiki.davidedoro.it/</link>
        <image rdf:resource="https://wiki.davidedoro.it/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-07-10T04:10:52+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.davidedoro.it/doku.php?id=terraform:basic&amp;rev=1731225673&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.davidedoro.it/doku.php?id=terraform:cloud&amp;rev=1731225668&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.davidedoro.it/doku.php?id=terraform:commands&amp;rev=1731225666&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.davidedoro.it/doku.php?id=terraform:gcp&amp;rev=1731225664&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.davidedoro.it/doku.php?id=terraform:import&amp;rev=1731225671&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.davidedoro.it/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>dd-wiki</title>
        <link>https://wiki.davidedoro.it/</link>
        <url>https://wiki.davidedoro.it/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://wiki.davidedoro.it/doku.php?id=terraform:basic&amp;rev=1731225673&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-10T08:01:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>basic</title>
        <link>https://wiki.davidedoro.it/doku.php?id=terraform:basic&amp;rev=1731225673&amp;do=diff</link>
        <description>Terraform up and running

language: .hcl Hashicorp Configuration Language
syntax:
&lt;block type&gt; &quot;&lt;block label&gt;&quot; &quot;&lt;block label&gt;&quot;{
#body block
&lt;identifier&gt; = &lt;expression&gt;
}
ex:
resource &quot;google_compute_network&quot; &quot;default&quot; {
#comment
name                    = mynetwork
auto_create_subnetworks = false
}</description>
    </item>
    <item rdf:about="https://wiki.davidedoro.it/doku.php?id=terraform:cloud&amp;rev=1731225668&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-10T08:01:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cloud</title>
        <link>https://wiki.davidedoro.it/doku.php?id=terraform:cloud&amp;rev=1731225668&amp;do=diff</link>
        <description>*  create a service key
	*  setup on terraform cloud a sensitive variable named GOOGLE_CREDENTIALS where the content is given issuing this command: 
cat /root/ddoro-infra.json |tr -s &#039;\n&#039; &#039; &#039;

	*  remember to setup on terraform cloud workspace Remote as Execution Mode</description>
    </item>
    <item rdf:about="https://wiki.davidedoro.it/doku.php?id=terraform:commands&amp;rev=1731225666&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-10T08:01:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>commands</title>
        <link>https://wiki.davidedoro.it/doku.php?id=terraform:commands&amp;rev=1731225666&amp;do=diff</link>
        <description>useful commands

terraform init -&gt; initialize the providers

terraform plan -&gt; preview of resources that is going to be created after terraform apply

terraform apply -&gt; create real infrastructure resources

terraform destroy -&gt; CAUTION destroy infrastrucutre resources</description>
    </item>
    <item rdf:about="https://wiki.davidedoro.it/doku.php?id=terraform:gcp&amp;rev=1731225664&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-10T08:01:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gcp</title>
        <link>https://wiki.davidedoro.it/doku.php?id=terraform:gcp&amp;rev=1731225664&amp;do=diff</link>
        <description>authentication

iam and admin

Terraform Providers

Providers overview

GCP docs

compute instance

first example main.tf:
resource &quot;google_compute_instance&quot; &quot;default&quot; {
    name = &quot;test&quot;
    machine_type = &quot;e2-micro&quot;
    zone = &quot;europe-central1-a&quot;
    boot_disk {
        initialize_parames{
            image = &quot;debian-cloud/debian-9&quot;
        }
    }
}</description>
    </item>
    <item rdf:about="https://wiki.davidedoro.it/doku.php?id=terraform:import&amp;rev=1731225671&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-10T08:01:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>import</title>
        <link>https://wiki.davidedoro.it/doku.php?id=terraform:import&amp;rev=1731225671&amp;do=diff</link>
        <description>to import a resource on tfstate in case of tfstate lost follow these steps:

	*  Ordered List Itemfind the resource to import (in this example a cluster GKE) 
in this case we need to find the cluster name, and cluster location [ &lt;cluster-name&gt;,projects/&lt;project-id&gt;/locations/&lt;location&gt;/clusters/&lt;cluster-name&gt; ] the other requested information may change with the case</description>
    </item>
</rdf:RDF>
