google_app_engine_service_network_settings

A NetworkSettings resource is a container for ingress settings for a version or service.

To get more information about ServiceNetworkSettings, see:

Open in Cloud Shell

Example Usage - App Engine Service Network Settings

resource "google_storage_bucket" "bucket" {
    name     = "appengine-static-content"
  location = "US"
}

resource "google_storage_bucket_object" "object" {
    name   = "hello-world.zip"
    bucket = google_storage_bucket.bucket.name
    source = "./test-fixtures/hello-world.zip"
}

resource "google_app_engine_standard_app_version" "internalapp" {
  version_id = "v1"
  service = "internalapp"
  delete_service_on_destroy = true

  runtime = "nodejs20"
  entrypoint {
    shell = "node ./app.js"
  }
  deployment {
    zip {
      source_url = "https://storage.googleapis.com/${google_storage_bucket.bucket.name}/${google_storage_bucket_object.object.name}"
    }  
  }
  env_variables = {
    port = "8080"
  }
}

resource "google_app_engine_service_network_settings" "internalapp" {
  service = google_app_engine_standard_app_version.internalapp.service
  network_settings {
    ingress_traffic_allowed = "INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY"
  }
}

Argument Reference

The following arguments are supported:

The network_settings block supports:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

ServiceNetworkSettings can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import ServiceNetworkSettings using one of the formats above. For example:

import {
  id = "apps/{{project}}/services/{{service}}"
  to = google_app_engine_service_network_settings.default
}

When using the terraform import command, ServiceNetworkSettings can be imported using one of the formats above. For example:

$ terraform import google_app_engine_service_network_settings.default apps/{{project}}/services/{{service}}
$ terraform import google_app_engine_service_network_settings.default {{project}}/{{service}}
$ terraform import google_app_engine_service_network_settings.default {{service}}

User Project Overrides

This resource supports User Project Overrides.