A NetworkSettings resource is a container for ingress settings for a version or service.
To get more information about ServiceNetworkSettings, see:
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"
}
}
The following arguments are supported:
service
-
(Required)
The name of the service these settings apply to.
network_settings
-
(Required)
Ingress settings for this service. Will apply to all versions.
Structure is documented below.
The network_settings
block supports:
ingress_traffic_allowed
-
(Optional)
The ingress settings for version or service.
Default value is INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED
.
Possible values are: INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED
, INGRESS_TRAFFIC_ALLOWED_ALL
, INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY
, INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB
.project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format apps/{{project}}/services/{{service}}
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.ServiceNetworkSettings can be imported using any of these accepted formats:
apps/{{project}}/services/{{service}}
{{project}}/{{service}}
{{service}}
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}}
This resource supports User Project Overrides.