published on Monday, Aug 10, 2026 by Pulumi
published on Monday, Aug 10, 2026 by Pulumi
Runtime project attachment represents an attachment from the runtime project to the host project. API Hub looks for deployments in the attached runtime projects and creates corresponding resources in API Hub for the discovered deployments.
Example Usage
Apihub Runtime Project Attachment Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumiverse/time";
const hostProject = new gcp.organizations.Project("host_project", {
name: "h-ah-proj",
projectId: "h-ah-proj",
orgId: "123456789",
billingAccount: "000000-0000000-0000000-000000",
deletionPolicy: "DELETE",
});
const wait60Seconds = new time.Sleep("wait_60_seconds", {createDuration: "60s"}, {
dependsOn: [hostProject],
});
// Enable API hub API on host project
const apihubService = new gcp.projects.Service("apihub_service", {
project: hostProject.projectId,
service: "apihub.googleapis.com",
}, {
dependsOn: [wait60Seconds],
});
const hostProjectReg = new gcp.apihub.HostProjectRegistration("host_project_reg", {
project: hostProject.projectId,
location: "asia-south1",
hostProjectRegistrationId: hostProject.projectId,
gcpProject: pulumi.interpolate`projects/${hostProject.projectId}`,
}, {
dependsOn: [apihubService],
});
const runtimeProject = new gcp.organizations.Project("runtime_project", {
name: "r-ah-proj",
projectId: "r-ah-proj",
orgId: "123456789",
billingAccount: "000000-0000000-0000000-000000",
deletionPolicy: "DELETE",
});
// Enable API hub API on runtime project
const apihubServiceRuntime = new gcp.projects.Service("apihub_service_runtime", {
project: runtimeProject.projectId,
service: "apihub.googleapis.com",
}, {
dependsOn: [wait60Seconds],
});
const apihubRuntimeProjectAttachment = new gcp.apihub.RuntimeProjectAttachment("apihub_runtime_project_attachment", {
project: hostProject.projectId,
location: "asia-south1",
runtimeProjectAttachmentId: runtimeProject.projectId,
runtimeProject: pulumi.interpolate`projects/${runtimeProject.projectId}`,
}, {
dependsOn: [
hostProjectReg,
apihubServiceRuntime,
],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time
host_project = gcp.organizations.Project("host_project",
name="h-ah-proj",
project_id="h-ah-proj",
org_id="123456789",
billing_account="000000-0000000-0000000-000000",
deletion_policy="DELETE")
wait60_seconds = time.Sleep("wait_60_seconds", create_duration="60s",
opts = pulumi.ResourceOptions(depends_on=[host_project]))
# Enable API hub API on host project
apihub_service = gcp.projects.Service("apihub_service",
project=host_project.project_id,
service="apihub.googleapis.com",
opts = pulumi.ResourceOptions(depends_on=[wait60_seconds]))
host_project_reg = gcp.apihub.HostProjectRegistration("host_project_reg",
project=host_project.project_id,
location="asia-south1",
host_project_registration_id=host_project.project_id,
gcp_project=host_project.project_id.apply(lambda project_id: f"projects/{project_id}"),
opts = pulumi.ResourceOptions(depends_on=[apihub_service]))
runtime_project = gcp.organizations.Project("runtime_project",
name="r-ah-proj",
project_id="r-ah-proj",
org_id="123456789",
billing_account="000000-0000000-0000000-000000",
deletion_policy="DELETE")
# Enable API hub API on runtime project
apihub_service_runtime = gcp.projects.Service("apihub_service_runtime",
project=runtime_project.project_id,
service="apihub.googleapis.com",
opts = pulumi.ResourceOptions(depends_on=[wait60_seconds]))
apihub_runtime_project_attachment = gcp.apihub.RuntimeProjectAttachment("apihub_runtime_project_attachment",
project=host_project.project_id,
location="asia-south1",
runtime_project_attachment_id=runtime_project.project_id,
runtime_project=runtime_project.project_id.apply(lambda project_id: f"projects/{project_id}"),
opts = pulumi.ResourceOptions(depends_on=[
host_project_reg,
apihub_service_runtime,
]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/apihub"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/projects"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-time/sdk/go/time"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
hostProject, err := organizations.NewProject(ctx, "host_project", &organizations.ProjectArgs{
Name: pulumi.String("h-ah-proj"),
ProjectId: pulumi.String("h-ah-proj"),
OrgId: pulumi.String("123456789"),
BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
wait60Seconds, err := time.NewSleep(ctx, "wait_60_seconds", &time.SleepArgs{
CreateDuration: pulumi.String("60s"),
}, pulumi.DependsOn([]pulumi.Resource{
hostProject,
}))
if err != nil {
return err
}
// Enable API hub API on host project
apihubService, err := projects.NewService(ctx, "apihub_service", &projects.ServiceArgs{
Project: hostProject.ProjectId,
Service: pulumi.String("apihub.googleapis.com"),
}, pulumi.DependsOn([]pulumi.Resource{
wait60Seconds,
}))
if err != nil {
return err
}
hostProjectReg, err := apihub.NewHostProjectRegistration(ctx, "host_project_reg", &apihub.HostProjectRegistrationArgs{
Project: hostProject.ProjectId,
Location: pulumi.String("asia-south1"),
HostProjectRegistrationId: hostProject.ProjectId,
GcpProject: hostProject.ProjectId.ApplyT(func(projectId string) (string, error) {
return fmt.Sprintf("projects/%v", projectId), nil
}).(pulumi.StringOutput),
}, pulumi.DependsOn([]pulumi.Resource{
apihubService,
}))
if err != nil {
return err
}
runtimeProject, err := organizations.NewProject(ctx, "runtime_project", &organizations.ProjectArgs{
Name: pulumi.String("r-ah-proj"),
ProjectId: pulumi.String("r-ah-proj"),
OrgId: pulumi.String("123456789"),
BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
DeletionPolicy: pulumi.String("DELETE"),
})
if err != nil {
return err
}
// Enable API hub API on runtime project
apihubServiceRuntime, err := projects.NewService(ctx, "apihub_service_runtime", &projects.ServiceArgs{
Project: runtimeProject.ProjectId,
Service: pulumi.String("apihub.googleapis.com"),
}, pulumi.DependsOn([]pulumi.Resource{
wait60Seconds,
}))
if err != nil {
return err
}
_, err = apihub.NewRuntimeProjectAttachment(ctx, "apihub_runtime_project_attachment", &apihub.RuntimeProjectAttachmentArgs{
Project: hostProject.ProjectId,
Location: pulumi.String("asia-south1"),
RuntimeProjectAttachmentId: runtimeProject.ProjectId,
RuntimeProject: runtimeProject.ProjectId.ApplyT(func(projectId string) (string, error) {
return fmt.Sprintf("projects/%v", projectId), nil
}).(pulumi.StringOutput),
}, pulumi.DependsOn([]pulumi.Resource{
hostProjectReg,
apihubServiceRuntime,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;
return await Deployment.RunAsync(() =>
{
var hostProject = new Gcp.Organizations.Project("host_project", new()
{
Name = "h-ah-proj",
ProjectId = "h-ah-proj",
OrgId = "123456789",
BillingAccount = "000000-0000000-0000000-000000",
DeletionPolicy = "DELETE",
});
var wait60Seconds = new Time.Sleep("wait_60_seconds", new()
{
CreateDuration = "60s",
}, new CustomResourceOptions
{
DependsOn =
{
hostProject,
},
});
// Enable API hub API on host project
var apihubService = new Gcp.Projects.Service("apihub_service", new()
{
Project = hostProject.ProjectId,
ServiceName = "apihub.googleapis.com",
}, new CustomResourceOptions
{
DependsOn =
{
wait60Seconds,
},
});
var hostProjectReg = new Gcp.ApiHub.HostProjectRegistration("host_project_reg", new()
{
Project = hostProject.ProjectId,
Location = "asia-south1",
HostProjectRegistrationId = hostProject.ProjectId,
GcpProject = hostProject.ProjectId.Apply(projectId => $"projects/{projectId}"),
}, new CustomResourceOptions
{
DependsOn =
{
apihubService,
},
});
var runtimeProject = new Gcp.Organizations.Project("runtime_project", new()
{
Name = "r-ah-proj",
ProjectId = "r-ah-proj",
OrgId = "123456789",
BillingAccount = "000000-0000000-0000000-000000",
DeletionPolicy = "DELETE",
});
// Enable API hub API on runtime project
var apihubServiceRuntime = new Gcp.Projects.Service("apihub_service_runtime", new()
{
Project = runtimeProject.ProjectId,
ServiceName = "apihub.googleapis.com",
}, new CustomResourceOptions
{
DependsOn =
{
wait60Seconds,
},
});
var apihubRuntimeProjectAttachment = new Gcp.ApiHub.RuntimeProjectAttachment("apihub_runtime_project_attachment", new()
{
Project = hostProject.ProjectId,
Location = "asia-south1",
RuntimeProjectAttachmentId = runtimeProject.ProjectId,
RuntimeProject = runtimeProject.ProjectId.Apply(projectId => $"projects/{projectId}"),
}, new CustomResourceOptions
{
DependsOn =
{
hostProjectReg,
apihubServiceRuntime,
},
});
});
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.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.apihub.HostProjectRegistration;
import com.pulumi.gcp.apihub.HostProjectRegistrationArgs;
import com.pulumi.gcp.apihub.RuntimeProjectAttachment;
import com.pulumi.gcp.apihub.RuntimeProjectAttachmentArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 hostProject = new Project("hostProject", ProjectArgs.builder()
.name("h-ah-proj")
.projectId("h-ah-proj")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.deletionPolicy("DELETE")
.build());
var wait60Seconds = new Sleep("wait60Seconds", SleepArgs.builder()
.createDuration("60s")
.build(), CustomResourceOptions.builder()
.dependsOn(hostProject)
.build());
// Enable API hub API on host project
var apihubService = new Service("apihubService", ServiceArgs.builder()
.project(hostProject.projectId())
.service("apihub.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(wait60Seconds)
.build());
var hostProjectReg = new HostProjectRegistration("hostProjectReg", HostProjectRegistrationArgs.builder()
.project(hostProject.projectId())
.location("asia-south1")
.hostProjectRegistrationId(hostProject.projectId())
.gcpProject(hostProject.projectId().applyValue(_projectId -> String.format("projects/%s", _projectId)))
.build(), CustomResourceOptions.builder()
.dependsOn(apihubService)
.build());
var runtimeProject = new Project("runtimeProject", ProjectArgs.builder()
.name("r-ah-proj")
.projectId("r-ah-proj")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.deletionPolicy("DELETE")
.build());
// Enable API hub API on runtime project
var apihubServiceRuntime = new Service("apihubServiceRuntime", ServiceArgs.builder()
.project(runtimeProject.projectId())
.service("apihub.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(wait60Seconds)
.build());
var apihubRuntimeProjectAttachment = new RuntimeProjectAttachment("apihubRuntimeProjectAttachment", RuntimeProjectAttachmentArgs.builder()
.project(hostProject.projectId())
.location("asia-south1")
.runtimeProjectAttachmentId(runtimeProject.projectId())
.runtimeProject(runtimeProject.projectId().applyValue(_projectId -> String.format("projects/%s", _projectId)))
.build(), CustomResourceOptions.builder()
.dependsOn(
hostProjectReg,
apihubServiceRuntime)
.build());
}
}
resources:
hostProject:
type: gcp:organizations:Project
name: host_project
properties:
name: h-ah-proj
projectId: h-ah-proj
orgId: '123456789'
billingAccount: 000000-0000000-0000000-000000
deletionPolicy: DELETE
wait60Seconds:
type: time:Sleep
name: wait_60_seconds
properties:
createDuration: 60s
options:
dependsOn:
- ${hostProject}
# Enable API hub API on host project
apihubService:
type: gcp:projects:Service
name: apihub_service
properties:
project: ${hostProject.projectId}
service: apihub.googleapis.com
options:
dependsOn:
- ${wait60Seconds}
hostProjectReg:
type: gcp:apihub:HostProjectRegistration
name: host_project_reg
properties:
project: ${hostProject.projectId}
location: asia-south1
hostProjectRegistrationId: ${hostProject.projectId}
gcpProject: projects/${hostProject.projectId}
options:
dependsOn:
- ${apihubService}
runtimeProject:
type: gcp:organizations:Project
name: runtime_project
properties:
name: r-ah-proj
projectId: r-ah-proj
orgId: '123456789'
billingAccount: 000000-0000000-0000000-000000
deletionPolicy: DELETE
# Enable API hub API on runtime project
apihubServiceRuntime:
type: gcp:projects:Service
name: apihub_service_runtime
properties:
project: ${runtimeProject.projectId}
service: apihub.googleapis.com
options:
dependsOn:
- ${wait60Seconds}
apihubRuntimeProjectAttachment:
type: gcp:apihub:RuntimeProjectAttachment
name: apihub_runtime_project_attachment
properties:
project: ${hostProject.projectId}
location: asia-south1
runtimeProjectAttachmentId: ${runtimeProject.projectId}
runtimeProject: projects/${runtimeProject.projectId}
options:
dependsOn:
- ${hostProjectReg}
- ${apihubServiceRuntime}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
time = {
source = "pulumi/time"
}
}
}
resource "gcp_organizations_project" "host_project" {
name = "h-ah-proj"
project_id = "h-ah-proj"
org_id = "123456789"
billing_account = "000000-0000000-0000000-000000"
deletion_policy = "DELETE"
}
resource "time_sleep" "wait_60_seconds" {
depends_on = [gcp_organizations_project.host_project]
create_duration = "60s"
}
# Enable API hub API on host project
resource "gcp_projects_service" "apihub_service" {
depends_on = [time_sleep.wait_60_seconds]
project = gcp_organizations_project.host_project.project_id
service = "apihub.googleapis.com"
}
resource "gcp_apihub_hostprojectregistration" "host_project_reg" {
depends_on = [gcp_projects_service.apihub_service]
project = gcp_organizations_project.host_project.project_id
location = "asia-south1"
host_project_registration_id = gcp_organizations_project.host_project.project_id
gcp_project ="projects/${gcp_organizations_project.host_project.project_id}"
}
resource "gcp_organizations_project" "runtime_project" {
name = "r-ah-proj"
project_id = "r-ah-proj"
org_id = "123456789"
billing_account = "000000-0000000-0000000-000000"
deletion_policy = "DELETE"
}
# Enable API hub API on runtime project
resource "gcp_projects_service" "apihub_service_runtime" {
depends_on = [time_sleep.wait_60_seconds]
project = gcp_organizations_project.runtime_project.project_id
service = "apihub.googleapis.com"
}
resource "gcp_apihub_runtimeprojectattachment" "apihub_runtime_project_attachment" {
depends_on = [gcp_apihub_hostprojectregistration.host_project_reg, gcp_projects_service.apihub_service_runtime]
project = gcp_organizations_project.host_project.project_id
location = "asia-south1"
runtime_project_attachment_id = gcp_organizations_project.runtime_project.project_id
runtime_project ="projects/${gcp_organizations_project.runtime_project.project_id}"
}
Create RuntimeProjectAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RuntimeProjectAttachment(name: string, args: RuntimeProjectAttachmentArgs, opts?: CustomResourceOptions);@overload
def RuntimeProjectAttachment(resource_name: str,
args: RuntimeProjectAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RuntimeProjectAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
runtime_project: Optional[str] = None,
runtime_project_attachment_id: Optional[str] = None,
deletion_policy: Optional[str] = None,
project: Optional[str] = None)func NewRuntimeProjectAttachment(ctx *Context, name string, args RuntimeProjectAttachmentArgs, opts ...ResourceOption) (*RuntimeProjectAttachment, error)public RuntimeProjectAttachment(string name, RuntimeProjectAttachmentArgs args, CustomResourceOptions? opts = null)
public RuntimeProjectAttachment(String name, RuntimeProjectAttachmentArgs args)
public RuntimeProjectAttachment(String name, RuntimeProjectAttachmentArgs args, CustomResourceOptions options)
type: gcp:apihub:RuntimeProjectAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_apihub_runtime_project_attachment" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RuntimeProjectAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RuntimeProjectAttachmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RuntimeProjectAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuntimeProjectAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuntimeProjectAttachmentArgs
- 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 runtimeProjectAttachmentResource = new Gcp.ApiHub.RuntimeProjectAttachment("runtimeProjectAttachmentResource", new()
{
Location = "string",
RuntimeProject = "string",
RuntimeProjectAttachmentId = "string",
DeletionPolicy = "string",
Project = "string",
});
example, err := apihub.NewRuntimeProjectAttachment(ctx, "runtimeProjectAttachmentResource", &apihub.RuntimeProjectAttachmentArgs{
Location: pulumi.String("string"),
RuntimeProject: pulumi.String("string"),
RuntimeProjectAttachmentId: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
Project: pulumi.String("string"),
})
resource "gcp_apihub_runtime_project_attachment" "runtimeProjectAttachmentResource" {
lifecycle {
create_before_destroy = true
}
location = "string"
runtime_project = "string"
runtime_project_attachment_id = "string"
deletion_policy = "string"
project = "string"
}
var runtimeProjectAttachmentResource = new RuntimeProjectAttachment("runtimeProjectAttachmentResource", RuntimeProjectAttachmentArgs.builder()
.location("string")
.runtimeProject("string")
.runtimeProjectAttachmentId("string")
.deletionPolicy("string")
.project("string")
.build());
runtime_project_attachment_resource = gcp.apihub.RuntimeProjectAttachment("runtimeProjectAttachmentResource",
location="string",
runtime_project="string",
runtime_project_attachment_id="string",
deletion_policy="string",
project="string")
const runtimeProjectAttachmentResource = new gcp.apihub.RuntimeProjectAttachment("runtimeProjectAttachmentResource", {
location: "string",
runtimeProject: "string",
runtimeProjectAttachmentId: "string",
deletionPolicy: "string",
project: "string",
});
type: gcp:apihub:RuntimeProjectAttachment
properties:
deletionPolicy: string
location: string
project: string
runtimeProject: string
runtimeProjectAttachmentId: string
RuntimeProjectAttachment 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 RuntimeProjectAttachment resource accepts the following input properties:
- Location string
- Part of
parent. See documentation ofprojectsId. - Runtime
Project string - Required. Immutable. Google cloud 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.
- Runtime
Project stringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- Part of
parent. See documentation ofprojectsId. - Runtime
Project string - Required. Immutable. Google cloud 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.
- Runtime
Project stringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- Part of
parent. See documentation ofprojectsId. - runtime_
project string - Required. Immutable. Google cloud 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.
- runtime_
project_ stringattachment_ id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- Part of
parent. See documentation ofprojectsId. - runtime
Project String - Required. Immutable. Google cloud 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.
- runtime
Project StringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- Part of
parent. See documentation ofprojectsId. - runtime
Project string - Required. Immutable. Google cloud 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.
- runtime
Project stringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- Part of
parent. See documentation ofprojectsId. - runtime_
project str - Required. Immutable. Google cloud 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.
- runtime_
project_ strattachment_ id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- Part of
parent. See documentation ofprojectsId. - runtime
Project String - Required. Immutable. Google cloud 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.
- runtime
Project StringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the RuntimeProjectAttachment resource produces the following output properties:
- Create
Time string - Output only. Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- Create
Time string - Output only. Create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- create_
time string - Output only. Create time.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- create
Time String - Output only. Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- create
Time string - Output only. Create time.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- 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 runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- create
Time String - Output only. Create time.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
Look up Existing RuntimeProjectAttachment Resource
Get an existing RuntimeProjectAttachment 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?: RuntimeProjectAttachmentState, opts?: CustomResourceOptions): RuntimeProjectAttachment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
deletion_policy: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
runtime_project: Optional[str] = None,
runtime_project_attachment_id: Optional[str] = None) -> RuntimeProjectAttachmentfunc GetRuntimeProjectAttachment(ctx *Context, name string, id IDInput, state *RuntimeProjectAttachmentState, opts ...ResourceOption) (*RuntimeProjectAttachment, error)public static RuntimeProjectAttachment Get(string name, Input<string> id, RuntimeProjectAttachmentState? state, CustomResourceOptions? opts = null)public static RuntimeProjectAttachment get(String name, Output<String> id, RuntimeProjectAttachmentState state, CustomResourceOptions options)resources: _: type: gcp:apihub:RuntimeProjectAttachment get: id: ${id}import {
to = gcp_apihub_runtime_project_attachment.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Create
Time string - Output only. Create time.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Location string
- Part of
parent. See documentation ofprojectsId. - Name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Runtime
Project string - Required. Immutable. Google cloud 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.
- Runtime
Project stringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- Create
Time string - Output only. Create time.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Location string
- Part of
parent. See documentation ofprojectsId. - Name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Runtime
Project string - Required. Immutable. Google cloud 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.
- Runtime
Project stringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- create_
time string - Output only. Create time.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- location string
- Part of
parent. See documentation ofprojectsId. - name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- runtime_
project string - Required. Immutable. Google cloud 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.
- runtime_
project_ stringattachment_ id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- create
Time String - Output only. Create time.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- location String
- Part of
parent. See documentation ofprojectsId. - name String
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- runtime
Project String - Required. Immutable. Google cloud 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.
- runtime
Project StringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- create
Time string - Output only. Create time.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- location string
- Part of
parent. See documentation ofprojectsId. - name string
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- runtime
Project string - Required. Immutable. Google cloud 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.
- runtime
Project stringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- create_
time str - Output only. Create time.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- location str
- Part of
parent. See documentation ofprojectsId. - name str
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- runtime_
project str - Required. Immutable. Google cloud 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.
- runtime_
project_ strattachment_ id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- create
Time String - Output only. Create time.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- location String
- Part of
parent. See documentation ofprojectsId. - name String
- Identifier. The resource name of a runtime project attachment. Format: "projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment_id}"
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- runtime
Project String - Required. Immutable. Google cloud 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.
- runtime
Project StringAttachment Id - The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
Import
RuntimeProjectAttachment can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/runtimeProjectAttachments/{{runtime_project_attachment_id}}{{project}}/{{location}}/{{runtime_project_attachment_id}}{{location}}/{{runtime_project_attachment_id}}
When using the pulumi import command, RuntimeProjectAttachment can be imported using one of the formats above. For example:
$ pulumi import gcp:apihub/runtimeProjectAttachment:RuntimeProjectAttachment default projects/{{project}}/locations/{{location}}/runtimeProjectAttachments/{{runtime_project_attachment_id}}
$ pulumi import gcp:apihub/runtimeProjectAttachment:RuntimeProjectAttachment default {{project}}/{{location}}/{{runtime_project_attachment_id}}
$ pulumi import gcp:apihub/runtimeProjectAttachment:RuntimeProjectAttachment default {{location}}/{{runtime_project_attachment_id}}
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-betaTerraform Provider.
published on Monday, Aug 10, 2026 by Pulumi