<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Georgios Giannoutsos Barkas</title>
    <description>The latest articles on DEV Community by Georgios Giannoutsos Barkas (@nuc).</description>
    <link>https://dev.to/nuc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F34806%2F97ce8070-11d7-4393-a8dc-0dc78c9e1fc9.jpg</url>
      <title>DEV Community: Georgios Giannoutsos Barkas</title>
      <link>https://dev.to/nuc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nuc"/>
    <language>en</language>
    <item>
      <title>GCP Cloud Functions with a Static IP - Terraform version</title>
      <dc:creator>Georgios Giannoutsos Barkas</dc:creator>
      <pubDate>Sun, 10 Jan 2021 14:06:45 +0000</pubDate>
      <link>https://dev.to/nuc/gcp-cloud-functions-with-a-static-ip-terraform-version-2b8a</link>
      <guid>https://dev.to/nuc/gcp-cloud-functions-with-a-static-ip-terraform-version-2b8a</guid>
      <description>&lt;p&gt;Following this &lt;a href="https://dev.to/alvardev/gcp-cloud-functions-with-a-static-ip-3fe9"&gt;great post&lt;/a&gt; from &lt;a href="https://dev.to/alvardev"&gt;Alvaro&lt;/a&gt;, I converted the &lt;code&gt;gcloud&lt;/code&gt; commands, to their respective Terraform config.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

resource "google_compute_network" "cloud_function_network" {
  name = "cloud-function-network"
  auto_create_subnetworks = false
}

resource "google_vpc_access_connector" "connector" {
  name = "connector"
  region = "europe-west3"
  ip_cidr_range = "10.8.0.0/28"
  network = google_compute_network.cloud_function_network.name
}

resource "google_compute_address" "egress_ip_address" {
  name = "egress-ip-address"
  region = "europe-west3"
}

resource "google_compute_router" "router" {
  name    = "egress-router"
  region  = "europe-west3"
  network = google_compute_network.cloud_function_network.name
}

resource "google_compute_router_nat" "cloud_function_nat" {
  name = "egress-router-nat"
  router = google_compute_router.router.name
  region = google_compute_router.router.region
  nat_ip_allocate_option = "MANUAL_ONLY"
  nat_ips = google_compute_address.egress_ip_address.*.self_link

  source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_IP_RANGES"

  log_config {
    enable = true
    filter = "ERRORS_ONLY"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>googlecloud</category>
      <category>serverless</category>
      <category>terraform</category>
    </item>
  </channel>
</rss>
