published on Thursday, May 7, 2026 by Pulumi
published on Thursday, May 7, 2026 by Pulumi
A Space in Apigee
To get more information about Space, see:
- API documentation
- How-to Guides
Example Usage
Apigee Space Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const current = gcp.organizations.getClientConfig({});
const apigeeNetwork = new gcp.compute.Network("apigee_network", {name: "apigee-network"});
const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", {
name: "apigee-range",
purpose: "VPC_PEERING",
addressType: "INTERNAL",
prefixLength: 16,
network: apigeeNetwork.id,
});
const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", {
network: apigeeNetwork.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [apigeeRange.name],
});
const apigeeOrg = new gcp.apigee.Organization("apigee_org", {
analyticsRegion: "us-central1",
projectId: current.then(current => current.project),
authorizedNetwork: apigeeNetwork.id,
}, {
dependsOn: [apigeeVpcConnection],
});
const space = new gcp.apigee.Space("space", {
orgId: apigeeOrg.id,
spaceId: "tf-test-space",
displayName: "tf test Space",
});
import pulumi
import pulumi_gcp as gcp
current = gcp.organizations.get_client_config()
apigee_network = gcp.compute.Network("apigee_network", name="apigee-network")
apigee_range = gcp.compute.GlobalAddress("apigee_range",
name="apigee-range",
purpose="VPC_PEERING",
address_type="INTERNAL",
prefix_length=16,
network=apigee_network.id)
apigee_vpc_connection = gcp.servicenetworking.Connection("apigee_vpc_connection",
network=apigee_network.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[apigee_range.name])
apigee_org = gcp.apigee.Organization("apigee_org",
analytics_region="us-central1",
project_id=current.project,
authorized_network=apigee_network.id,
opts = pulumi.ResourceOptions(depends_on=[apigee_vpc_connection]))
space = gcp.apigee.Space("space",
org_id=apigee_org.id,
space_id="tf-test-space",
display_name="tf test Space")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/apigee"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := organizations.GetClientConfig(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
apigeeNetwork, err := compute.NewNetwork(ctx, "apigee_network", &compute.NetworkArgs{
Name: pulumi.String("apigee-network"),
})
if err != nil {
return err
}
apigeeRange, err := compute.NewGlobalAddress(ctx, "apigee_range", &compute.GlobalAddressArgs{
Name: pulumi.String("apigee-range"),
Purpose: pulumi.String("VPC_PEERING"),
AddressType: pulumi.String("INTERNAL"),
PrefixLength: pulumi.Int(16),
Network: apigeeNetwork.ID(),
})
if err != nil {
return err
}
apigeeVpcConnection, err := servicenetworking.NewConnection(ctx, "apigee_vpc_connection", &servicenetworking.ConnectionArgs{
Network: apigeeNetwork.ID(),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
apigeeRange.Name,
},
})
if err != nil {
return err
}
apigeeOrg, err := apigee.NewOrganization(ctx, "apigee_org", &apigee.OrganizationArgs{
AnalyticsRegion: pulumi.String("us-central1"),
ProjectId: pulumi.String(pulumi.String(current.Project)),
AuthorizedNetwork: apigeeNetwork.ID(),
}, pulumi.DependsOn([]pulumi.Resource{
apigeeVpcConnection,
}))
if err != nil {
return err
}
_, err = apigee.NewSpace(ctx, "space", &apigee.SpaceArgs{
OrgId: apigeeOrg.ID(),
SpaceId: pulumi.String("tf-test-space"),
DisplayName: pulumi.String("tf test Space"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var current = Gcp.Organizations.GetClientConfig.Invoke();
var apigeeNetwork = new Gcp.Compute.Network("apigee_network", new()
{
Name = "apigee-network",
});
var apigeeRange = new Gcp.Compute.GlobalAddress("apigee_range", new()
{
Name = "apigee-range",
Purpose = "VPC_PEERING",
AddressType = "INTERNAL",
PrefixLength = 16,
Network = apigeeNetwork.Id,
});
var apigeeVpcConnection = new Gcp.ServiceNetworking.Connection("apigee_vpc_connection", new()
{
Network = apigeeNetwork.Id,
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
apigeeRange.Name,
},
});
var apigeeOrg = new Gcp.Apigee.Organization("apigee_org", new()
{
AnalyticsRegion = "us-central1",
ProjectId = current.Apply(getClientConfigResult => getClientConfigResult.Project),
AuthorizedNetwork = apigeeNetwork.Id,
}, new CustomResourceOptions
{
DependsOn =
{
apigeeVpcConnection,
},
});
var space = new Gcp.Apigee.Space("space", new()
{
OrgId = apigeeOrg.Id,
SpaceId = "tf-test-space",
DisplayName = "tf test Space",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.apigee.Organization;
import com.pulumi.gcp.apigee.OrganizationArgs;
import com.pulumi.gcp.apigee.Space;
import com.pulumi.gcp.apigee.SpaceArgs;
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) {
final var current = OrganizationsFunctions.getClientConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var apigeeNetwork = new Network("apigeeNetwork", NetworkArgs.builder()
.name("apigee-network")
.build());
var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()
.name("apigee-range")
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(apigeeNetwork.id())
.build());
var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()
.network(apigeeNetwork.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(apigeeRange.name())
.build());
var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()
.analyticsRegion("us-central1")
.projectId(current.project())
.authorizedNetwork(apigeeNetwork.id())
.build(), CustomResourceOptions.builder()
.dependsOn(apigeeVpcConnection)
.build());
var space = new Space("space", SpaceArgs.builder()
.orgId(apigeeOrg.id())
.spaceId("tf-test-space")
.displayName("tf test Space")
.build());
}
}
resources:
apigeeNetwork:
type: gcp:compute:Network
name: apigee_network
properties:
name: apigee-network
apigeeRange:
type: gcp:compute:GlobalAddress
name: apigee_range
properties:
name: apigee-range
purpose: VPC_PEERING
addressType: INTERNAL
prefixLength: 16
network: ${apigeeNetwork.id}
apigeeVpcConnection:
type: gcp:servicenetworking:Connection
name: apigee_vpc_connection
properties:
network: ${apigeeNetwork.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${apigeeRange.name}
apigeeOrg:
type: gcp:apigee:Organization
name: apigee_org
properties:
analyticsRegion: us-central1
projectId: ${current.project}
authorizedNetwork: ${apigeeNetwork.id}
options:
dependsOn:
- ${apigeeVpcConnection}
space:
type: gcp:apigee:Space
properties:
orgId: ${apigeeOrg.id}
spaceId: tf-test-space
displayName: tf test Space
variables:
current:
fn::invoke:
function: gcp:organizations:getClientConfig
arguments: {}
Example coming soon!
Create Space Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Space(name: string, args: SpaceArgs, opts?: CustomResourceOptions);@overload
def Space(resource_name: str,
args: SpaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Space(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
org_id: Optional[str] = None,
space_id: Optional[str] = None)func NewSpace(ctx *Context, name string, args SpaceArgs, opts ...ResourceOption) (*Space, error)public Space(string name, SpaceArgs args, CustomResourceOptions? opts = null)type: gcp:apigee:Space
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_apigee_space" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SpaceArgs
- 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 SpaceArgs
- 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 SpaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SpaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SpaceArgs
- 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 spaceResource = new Gcp.Apigee.Space("spaceResource", new()
{
DisplayName = "string",
OrgId = "string",
SpaceId = "string",
});
example, err := apigee.NewSpace(ctx, "spaceResource", &apigee.SpaceArgs{
DisplayName: pulumi.String("string"),
OrgId: pulumi.String("string"),
SpaceId: pulumi.String("string"),
})
resource "gcp_apigee_space" "spaceResource" {
display_name = "string"
org_id = "string"
space_id = "string"
}
var spaceResource = new Space("spaceResource", SpaceArgs.builder()
.displayName("string")
.orgId("string")
.spaceId("string")
.build());
space_resource = gcp.apigee.Space("spaceResource",
display_name="string",
org_id="string",
space_id="string")
const spaceResource = new gcp.apigee.Space("spaceResource", {
displayName: "string",
orgId: "string",
spaceId: "string",
});
type: gcp:apigee:Space
properties:
displayName: string
orgId: string
spaceId: string
Space 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 Space resource accepts the following input properties:
- Display
Name string - The display name of the Space.
- Org
Id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - Space
Id string - Space ID of the Apigee Space.
- Display
Name string - The display name of the Space.
- Org
Id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - Space
Id string - Space ID of the Apigee Space.
- display_
name string - The display name of the Space.
- org_
id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space_
id string - Space ID of the Apigee Space.
- display
Name String - The display name of the Space.
- org
Id String - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space
Id String - Space ID of the Apigee Space.
- display
Name string - The display name of the Space.
- org
Id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space
Id string - Space ID of the Apigee Space.
- display_
name str - The display name of the Space.
- org_
id str - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space_
id str - Space ID of the Apigee Space.
- display
Name String - The display name of the Space.
- org
Id String - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space
Id String - Space ID of the Apigee Space.
Outputs
All input properties are implicitly available as output properties. Additionally, the Space resource produces the following output properties:
- Create
Time string - Create timestamp of the space.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- Update
Time string - Last modified timestamp of the space.
- Create
Time string - Create timestamp of the space.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- Update
Time string - Last modified timestamp of the space.
- create_
time string - Create timestamp of the space.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- update_
time string - Last modified timestamp of the space.
- create
Time String - Create timestamp of the space.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- update
Time String - Last modified timestamp of the space.
- create
Time string - Create timestamp of the space.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- update
Time string - Last modified timestamp of the space.
- create_
time str - Create timestamp of the space.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- update_
time str - Last modified timestamp of the space.
- create
Time String - Create timestamp of the space.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- update
Time String - Last modified timestamp of the space.
Look up Existing Space Resource
Get an existing Space 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?: SpaceState, opts?: CustomResourceOptions): Space@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
space_id: Optional[str] = None,
update_time: Optional[str] = None) -> Spacefunc GetSpace(ctx *Context, name string, id IDInput, state *SpaceState, opts ...ResourceOption) (*Space, error)public static Space Get(string name, Input<string> id, SpaceState? state, CustomResourceOptions? opts = null)public static Space get(String name, Output<String> id, SpaceState state, CustomResourceOptions options)resources: _: type: gcp:apigee:Space get: id: ${id}import {
to = gcp_apigee_space.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 - Create timestamp of the space.
- Display
Name string - The display name of the Space.
- Name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- Org
Id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - Space
Id string - Space ID of the Apigee Space.
- Update
Time string - Last modified timestamp of the space.
- Create
Time string - Create timestamp of the space.
- Display
Name string - The display name of the Space.
- Name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- Org
Id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - Space
Id string - Space ID of the Apigee Space.
- Update
Time string - Last modified timestamp of the space.
- create_
time string - Create timestamp of the space.
- display_
name string - The display name of the Space.
- name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- org_
id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space_
id string - Space ID of the Apigee Space.
- update_
time string - Last modified timestamp of the space.
- create
Time String - Create timestamp of the space.
- display
Name String - The display name of the Space.
- name String
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- org
Id String - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space
Id String - Space ID of the Apigee Space.
- update
Time String - Last modified timestamp of the space.
- create
Time string - Create timestamp of the space.
- display
Name string - The display name of the Space.
- name string
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- org
Id string - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space
Id string - Space ID of the Apigee Space.
- update
Time string - Last modified timestamp of the space.
- create_
time str - Create timestamp of the space.
- display_
name str - The display name of the Space.
- name str
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- org_
id str - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space_
id str - Space ID of the Apigee Space.
- update_
time str - Last modified timestamp of the space.
- create
Time String - Create timestamp of the space.
- display
Name String - The display name of the Space.
- name String
- Identifier. Id of the space. This field is used as the resource name, and must follow AIP-122 guidelines.
- org
Id String - The Apigee Organization associated with the Apigee Space, in the format
organizations/{{org_name}}. - space
Id String - Space ID of the Apigee Space.
- update
Time String - Last modified timestamp of the space.
Import
Space can be imported using any of these accepted formats:
{{org_id}}/spaces/{{space_id}}{{org_id}}/{{space_id}}
When using the pulumi import command, Space can be imported using one of the formats above. For example:
$ pulumi import gcp:apigee/space:Space default {{org_id}}/spaces/{{space_id}}
$ pulumi import gcp:apigee/space:Space default {{org_id}}/{{space_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 Thursday, May 7, 2026 by Pulumi
