Represents a Service project attachment to the Host Project.
resource "google_apphub_service_project_attachment" "example" {
service_project_attachment_id = google_project.service_project.project_id
depends_on = [time_sleep.wait_120s]
}
resource "google_project" "service_project" {
project_id ="project-1"
name = "Service Project"
org_id = "123456789"
}
resource "time_sleep" "wait_120s" {
depends_on = [google_project.service_project]
create_duration = "120s"
}
resource "google_apphub_service_project_attachment" "example2" {
service_project_attachment_id = google_project.service_project_full.project_id
service_project = google_project.service_project_full.project_id
depends_on = [time_sleep.wait_120s]
}
resource "google_project" "service_project_full" {
project_id ="project-1"
name = "Service Project Full"
org_id = "123456789"
}
resource "time_sleep" "wait_120s" {
depends_on = [google_project.service_project_full]
create_duration = "120s"
}
The following arguments are supported:
service_project_attachment_id
-
(Required)
Required. The service project attachment identifier must contain the project_id of the service project specified in the service_project_attachment.service_project field. Hint: "projects/{project_id}"service_project
-
(Optional)
"Immutable. Service project name in the format: \"projects/abc\"
or \"projects/123\". As input, project name with either project id or number
are accepted. As output, this field will contain project number. "
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 projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
name
-
"Identifier. The resource name of a ServiceProjectAttachment. Format:\"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.\" "
create_time
-
Output only. Create time.
uid
-
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment
.
state
-
ServiceProjectAttachment state.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.ServiceProjectAttachment can be imported using any of these accepted formats:
projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
{{project}}/{{service_project_attachment_id}}
{{service_project_attachment_id}}
In Terraform v1.5.0 and later, use an import
block to import ServiceProjectAttachment using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}"
to = google_apphub_service_project_attachment.default
}
When using the terraform import
command, ServiceProjectAttachment can be imported using one of the formats above. For example:
$ terraform import google_apphub_service_project_attachment.default projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
$ terraform import google_apphub_service_project_attachment.default {{project}}/{{service_project_attachment_id}}
$ terraform import google_apphub_service_project_attachment.default {{service_project_attachment_id}}
This resource supports User Project Overrides.