google_apphub_service_project_attachment

Represents a Service project attachment to the Host Project.

Example Usage - Service Project Attachment Basic

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"
}

Example Usage - Service Project Attachment Full

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"
}

Argument Reference

The following arguments are supported:


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

ServiceProjectAttachment can be imported using any of these accepted formats:

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}}

User Project Overrides

This resource supports User Project Overrides.