1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apphub
  5. ServiceProjectAttachment
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.apphub.ServiceProjectAttachment

Explore with Pulumi AI

Represents a Service project attachment to the Host Project.

Example Usage

Service Project Attachment Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumi/time";

const serviceProject = new gcp.organizations.Project("service_project", {
    projectId: "project-1",
    name: "Service Project",
    orgId: "123456789",
    deletionPolicy: "DELETE",
});
const wait120s = new time.index.Sleep("wait_120s", {createDuration: "120s"}, {
    dependsOn: [serviceProject],
});
const example = new gcp.apphub.ServiceProjectAttachment("example", {serviceProjectAttachmentId: serviceProject.projectId}, {
    dependsOn: [wait120s],
});
Copy
import pulumi
import pulumi_gcp as gcp
import pulumi_time as time

service_project = gcp.organizations.Project("service_project",
    project_id="project-1",
    name="Service Project",
    org_id="123456789",
    deletion_policy="DELETE")
wait120s = time.index.Sleep("wait_120s", create_duration=120s,
opts = pulumi.ResourceOptions(depends_on=[service_project]))
example = gcp.apphub.ServiceProjectAttachment("example", service_project_attachment_id=service_project.project_id,
opts = pulumi.ResourceOptions(depends_on=[wait120s]))
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/apphub"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-time/sdk/go/time"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		serviceProject, err := organizations.NewProject(ctx, "service_project", &organizations.ProjectArgs{
			ProjectId:      pulumi.String("project-1"),
			Name:           pulumi.String("Service Project"),
			OrgId:          pulumi.String("123456789"),
			DeletionPolicy: pulumi.String("DELETE"),
		})
		if err != nil {
			return err
		}
		wait120s, err := time.NewSleep(ctx, "wait_120s", &time.SleepArgs{
			CreateDuration: "120s",
		}, pulumi.DependsOn([]pulumi.Resource{
			serviceProject,
		}))
		if err != nil {
			return err
		}
		_, err = apphub.NewServiceProjectAttachment(ctx, "example", &apphub.ServiceProjectAttachmentArgs{
			ServiceProjectAttachmentId: serviceProject.ProjectId,
		}, pulumi.DependsOn([]pulumi.Resource{
			wait120s,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumi.Time;

return await Deployment.RunAsync(() => 
{
    var serviceProject = new Gcp.Organizations.Project("service_project", new()
    {
        ProjectId = "project-1",
        Name = "Service Project",
        OrgId = "123456789",
        DeletionPolicy = "DELETE",
    });

    var wait120s = new Time.Index.Sleep("wait_120s", new()
    {
        CreateDuration = "120s",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            serviceProject,
        },
    });

    var example = new Gcp.Apphub.ServiceProjectAttachment("example", new()
    {
        ServiceProjectAttachmentId = serviceProject.ProjectId,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            wait120s,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.time.sleep;
import com.pulumi.time.sleepArgs;
import com.pulumi.gcp.apphub.ServiceProjectAttachment;
import com.pulumi.gcp.apphub.ServiceProjectAttachmentArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var serviceProject = new Project("serviceProject", ProjectArgs.builder()
            .projectId("project-1")
            .name("Service Project")
            .orgId("123456789")
            .deletionPolicy("DELETE")
            .build());

        var wait120s = new Sleep("wait120s", SleepArgs.builder()
            .createDuration("120s")
            .build(), CustomResourceOptions.builder()
                .dependsOn(List.of(serviceProject))
                .build());

        var example = new ServiceProjectAttachment("example", ServiceProjectAttachmentArgs.builder()
            .serviceProjectAttachmentId(serviceProject.projectId())
            .build(), CustomResourceOptions.builder()
                .dependsOn(wait120s)
                .build());

    }
}
Copy
resources:
  example:
    type: gcp:apphub:ServiceProjectAttachment
    properties:
      serviceProjectAttachmentId: ${serviceProject.projectId}
    options:
      dependsOn:
        - ${wait120s}
  serviceProject:
    type: gcp:organizations:Project
    name: service_project
    properties:
      projectId: project-1
      name: Service Project
      orgId: '123456789'
      deletionPolicy: DELETE
  wait120s:
    type: time:sleep
    name: wait_120s
    properties:
      createDuration: 120s
    options:
      dependsOn:
        - ${serviceProject}
Copy

Service Project Attachment Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumi/time";

const serviceProjectFull = new gcp.organizations.Project("service_project_full", {
    projectId: "project-1",
    name: "Service Project Full",
    orgId: "123456789",
    deletionPolicy: "DELETE",
});
const wait120s = new time.index.Sleep("wait_120s", {createDuration: "120s"}, {
    dependsOn: [serviceProjectFull],
});
const example2 = new gcp.apphub.ServiceProjectAttachment("example2", {
    serviceProjectAttachmentId: serviceProjectFull.projectId,
    serviceProject: serviceProjectFull.projectId,
}, {
    dependsOn: [wait120s],
});
Copy
import pulumi
import pulumi_gcp as gcp
import pulumi_time as time

service_project_full = gcp.organizations.Project("service_project_full",
    project_id="project-1",
    name="Service Project Full",
    org_id="123456789",
    deletion_policy="DELETE")
wait120s = time.index.Sleep("wait_120s", create_duration=120s,
opts = pulumi.ResourceOptions(depends_on=[service_project_full]))
example2 = gcp.apphub.ServiceProjectAttachment("example2",
    service_project_attachment_id=service_project_full.project_id,
    service_project=service_project_full.project_id,
    opts = pulumi.ResourceOptions(depends_on=[wait120s]))
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/apphub"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-time/sdk/go/time"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		serviceProjectFull, err := organizations.NewProject(ctx, "service_project_full", &organizations.ProjectArgs{
			ProjectId:      pulumi.String("project-1"),
			Name:           pulumi.String("Service Project Full"),
			OrgId:          pulumi.String("123456789"),
			DeletionPolicy: pulumi.String("DELETE"),
		})
		if err != nil {
			return err
		}
		wait120s, err := time.NewSleep(ctx, "wait_120s", &time.SleepArgs{
			CreateDuration: "120s",
		}, pulumi.DependsOn([]pulumi.Resource{
			serviceProjectFull,
		}))
		if err != nil {
			return err
		}
		_, err = apphub.NewServiceProjectAttachment(ctx, "example2", &apphub.ServiceProjectAttachmentArgs{
			ServiceProjectAttachmentId: serviceProjectFull.ProjectId,
			ServiceProject:             serviceProjectFull.ProjectId,
		}, pulumi.DependsOn([]pulumi.Resource{
			wait120s,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumi.Time;

return await Deployment.RunAsync(() => 
{
    var serviceProjectFull = new Gcp.Organizations.Project("service_project_full", new()
    {
        ProjectId = "project-1",
        Name = "Service Project Full",
        OrgId = "123456789",
        DeletionPolicy = "DELETE",
    });

    var wait120s = new Time.Index.Sleep("wait_120s", new()
    {
        CreateDuration = "120s",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            serviceProjectFull,
        },
    });

    var example2 = new Gcp.Apphub.ServiceProjectAttachment("example2", new()
    {
        ServiceProjectAttachmentId = serviceProjectFull.ProjectId,
        ServiceProject = serviceProjectFull.ProjectId,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            wait120s,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.time.sleep;
import com.pulumi.time.sleepArgs;
import com.pulumi.gcp.apphub.ServiceProjectAttachment;
import com.pulumi.gcp.apphub.ServiceProjectAttachmentArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var serviceProjectFull = new Project("serviceProjectFull", ProjectArgs.builder()
            .projectId("project-1")
            .name("Service Project Full")
            .orgId("123456789")
            .deletionPolicy("DELETE")
            .build());

        var wait120s = new Sleep("wait120s", SleepArgs.builder()
            .createDuration("120s")
            .build(), CustomResourceOptions.builder()
                .dependsOn(List.of(serviceProjectFull))
                .build());

        var example2 = new ServiceProjectAttachment("example2", ServiceProjectAttachmentArgs.builder()
            .serviceProjectAttachmentId(serviceProjectFull.projectId())
            .serviceProject(serviceProjectFull.projectId())
            .build(), CustomResourceOptions.builder()
                .dependsOn(wait120s)
                .build());

    }
}
Copy
resources:
  example2:
    type: gcp:apphub:ServiceProjectAttachment
    properties:
      serviceProjectAttachmentId: ${serviceProjectFull.projectId}
      serviceProject: ${serviceProjectFull.projectId}
    options:
      dependsOn:
        - ${wait120s}
  serviceProjectFull:
    type: gcp:organizations:Project
    name: service_project_full
    properties:
      projectId: project-1
      name: Service Project Full
      orgId: '123456789'
      deletionPolicy: DELETE
  wait120s:
    type: time:sleep
    name: wait_120s
    properties:
      createDuration: 120s
    options:
      dependsOn:
        - ${serviceProjectFull}
Copy

Create ServiceProjectAttachment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ServiceProjectAttachment(name: string, args: ServiceProjectAttachmentArgs, opts?: CustomResourceOptions);
@overload
def ServiceProjectAttachment(resource_name: str,
                             args: ServiceProjectAttachmentArgs,
                             opts: Optional[ResourceOptions] = None)

@overload
def ServiceProjectAttachment(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             service_project_attachment_id: Optional[str] = None,
                             project: Optional[str] = None,
                             service_project: Optional[str] = None)
func NewServiceProjectAttachment(ctx *Context, name string, args ServiceProjectAttachmentArgs, opts ...ResourceOption) (*ServiceProjectAttachment, error)
public ServiceProjectAttachment(string name, ServiceProjectAttachmentArgs args, CustomResourceOptions? opts = null)
public ServiceProjectAttachment(String name, ServiceProjectAttachmentArgs args)
public ServiceProjectAttachment(String name, ServiceProjectAttachmentArgs args, CustomResourceOptions options)
type: gcp:apphub:ServiceProjectAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceProjectAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceProjectAttachmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceProjectAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceProjectAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceProjectAttachmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var serviceProjectAttachmentResource = new Gcp.Apphub.ServiceProjectAttachment("serviceProjectAttachmentResource", new()
{
    ServiceProjectAttachmentId = "string",
    Project = "string",
    ServiceProject = "string",
});
Copy
example, err := apphub.NewServiceProjectAttachment(ctx, "serviceProjectAttachmentResource", &apphub.ServiceProjectAttachmentArgs{
	ServiceProjectAttachmentId: pulumi.String("string"),
	Project:                    pulumi.String("string"),
	ServiceProject:             pulumi.String("string"),
})
Copy
var serviceProjectAttachmentResource = new ServiceProjectAttachment("serviceProjectAttachmentResource", ServiceProjectAttachmentArgs.builder()
    .serviceProjectAttachmentId("string")
    .project("string")
    .serviceProject("string")
    .build());
Copy
service_project_attachment_resource = gcp.apphub.ServiceProjectAttachment("serviceProjectAttachmentResource",
    service_project_attachment_id="string",
    project="string",
    service_project="string")
Copy
const serviceProjectAttachmentResource = new gcp.apphub.ServiceProjectAttachment("serviceProjectAttachmentResource", {
    serviceProjectAttachmentId: "string",
    project: "string",
    serviceProject: "string",
});
Copy
type: gcp:apphub:ServiceProjectAttachment
properties:
    project: string
    serviceProject: string
    serviceProjectAttachmentId: string
Copy

ServiceProjectAttachment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ServiceProjectAttachment resource accepts the following input properties:

ServiceProjectAttachmentId
This property is required.
Changes to this property will trigger replacement.
string
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}"


Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ServiceProject Changes to this property will trigger replacement. string
"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."
ServiceProjectAttachmentId
This property is required.
Changes to this property will trigger replacement.
string
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}"


Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ServiceProject Changes to this property will trigger replacement. string
"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."
serviceProjectAttachmentId
This property is required.
Changes to this property will trigger replacement.
String
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}"


project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
serviceProject Changes to this property will trigger replacement. String
"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."
serviceProjectAttachmentId
This property is required.
Changes to this property will trigger replacement.
string
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}"


project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
serviceProject Changes to this property will trigger replacement. string
"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."
service_project_attachment_id
This property is required.
Changes to this property will trigger replacement.
str
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}"


project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
service_project Changes to this property will trigger replacement. str
"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."
serviceProjectAttachmentId
This property is required.
Changes to this property will trigger replacement.
String
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}"


project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
serviceProject Changes to this property will trigger replacement. String
"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."

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceProjectAttachment resource produces the following output properties:

CreateTime string
Output only. Create time.
Id string
The provider-assigned unique ID for this managed resource.
Name string
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
State string
ServiceProjectAttachment state.
Uid string
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
CreateTime string
Output only. Create time.
Id string
The provider-assigned unique ID for this managed resource.
Name string
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
State string
ServiceProjectAttachment state.
Uid string
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
createTime String
Output only. Create time.
id String
The provider-assigned unique ID for this managed resource.
name String
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
state String
ServiceProjectAttachment state.
uid String
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
createTime string
Output only. Create time.
id string
The provider-assigned unique ID for this managed resource.
name string
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
state string
ServiceProjectAttachment state.
uid string
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
create_time str
Output only. Create time.
id str
The provider-assigned unique ID for this managed resource.
name str
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
state str
ServiceProjectAttachment state.
uid str
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
createTime String
Output only. Create time.
id String
The provider-assigned unique ID for this managed resource.
name String
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
state String
ServiceProjectAttachment state.
uid String
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.

Look up Existing ServiceProjectAttachment Resource

Get an existing ServiceProjectAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServiceProjectAttachmentState, opts?: CustomResourceOptions): ServiceProjectAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        service_project: Optional[str] = None,
        service_project_attachment_id: Optional[str] = None,
        state: Optional[str] = None,
        uid: Optional[str] = None) -> ServiceProjectAttachment
func GetServiceProjectAttachment(ctx *Context, name string, id IDInput, state *ServiceProjectAttachmentState, opts ...ResourceOption) (*ServiceProjectAttachment, error)
public static ServiceProjectAttachment Get(string name, Input<string> id, ServiceProjectAttachmentState? state, CustomResourceOptions? opts = null)
public static ServiceProjectAttachment get(String name, Output<String> id, ServiceProjectAttachmentState state, CustomResourceOptions options)
resources:  _:    type: gcp:apphub:ServiceProjectAttachment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime string
Output only. Create time.
Name string
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ServiceProject Changes to this property will trigger replacement. string
"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."
ServiceProjectAttachmentId Changes to this property will trigger replacement. string
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}"


State string
ServiceProjectAttachment state.
Uid string
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
CreateTime string
Output only. Create time.
Name string
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ServiceProject Changes to this property will trigger replacement. string
"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."
ServiceProjectAttachmentId Changes to this property will trigger replacement. string
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}"


State string
ServiceProjectAttachment state.
Uid string
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
createTime String
Output only. Create time.
name String
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
serviceProject Changes to this property will trigger replacement. String
"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."
serviceProjectAttachmentId Changes to this property will trigger replacement. String
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}"


state String
ServiceProjectAttachment state.
uid String
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
createTime string
Output only. Create time.
name string
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
serviceProject Changes to this property will trigger replacement. string
"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."
serviceProjectAttachmentId Changes to this property will trigger replacement. string
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}"


state string
ServiceProjectAttachment state.
uid string
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
create_time str
Output only. Create time.
name str
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
service_project Changes to this property will trigger replacement. str
"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."
service_project_attachment_id Changes to this property will trigger replacement. str
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}"


state str
ServiceProjectAttachment state.
uid str
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.
createTime String
Output only. Create time.
name String
"Identifier. The resource name of a ServiceProjectAttachment. Format:"projects/{host-project-id}/locations/global/serviceProjectAttachments/{service-project-id}.""
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
serviceProject Changes to this property will trigger replacement. String
"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."
serviceProjectAttachmentId Changes to this property will trigger replacement. String
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}"


state String
ServiceProjectAttachment state.
uid String
Output only. A globally unique identifier (in UUID4 format) for the ServiceProjectAttachment.

Import

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

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

$ pulumi import gcp:apphub/serviceProjectAttachment:ServiceProjectAttachment default projects/{{project}}/locations/global/serviceProjectAttachments/{{service_project_attachment_id}}
Copy
$ pulumi import gcp:apphub/serviceProjectAttachment:ServiceProjectAttachment default {{project}}/{{service_project_attachment_id}}
Copy
$ pulumi import gcp:apphub/serviceProjectAttachment:ServiceProjectAttachment default {{service_project_attachment_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.