1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. SecurityGroupSpaceBindings
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry

    Provides a Cloud Foundry resource for binding and unbinding a security group from spaces. Only handles bindings managed through this resource and does not touch the existing space bindings with the security group. On deleting the resource, the security group will be unbound from the mentioned spaces.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const mySecurityGroupSpaces = new cloudfoundry.SecurityGroupSpaceBindings("my_security_group_spaces", {
        securityGroup: "56eedab7-cb97-469b-a3e9-89521827c039",
        stagingSpaces: ["02c0cc92-6ecc-44b1-b7b2-096ca19ee143"],
        runningSpaces: [
            "121c3a95-0f82-45a6-8ff2-1920b2067edb",
            "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
        ],
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    my_security_group_spaces = cloudfoundry.SecurityGroupSpaceBindings("my_security_group_spaces",
        security_group="56eedab7-cb97-469b-a3e9-89521827c039",
        staging_spaces=["02c0cc92-6ecc-44b1-b7b2-096ca19ee143"],
        running_spaces=[
            "121c3a95-0f82-45a6-8ff2-1920b2067edb",
            "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudfoundry.NewSecurityGroupSpaceBindings(ctx, "my_security_group_spaces", &cloudfoundry.SecurityGroupSpaceBindingsArgs{
    			SecurityGroup: pulumi.String("56eedab7-cb97-469b-a3e9-89521827c039"),
    			StagingSpaces: pulumi.StringArray{
    				pulumi.String("02c0cc92-6ecc-44b1-b7b2-096ca19ee143"),
    			},
    			RunningSpaces: pulumi.StringArray{
    				pulumi.String("121c3a95-0f82-45a6-8ff2-1920b2067edb"),
    				pulumi.String("02c0cc92-6ecc-44b1-b7b2-096ca19ee143"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var mySecurityGroupSpaces = new Cloudfoundry.SecurityGroupSpaceBindings("my_security_group_spaces", new()
        {
            SecurityGroup = "56eedab7-cb97-469b-a3e9-89521827c039",
            StagingSpaces = new[]
            {
                "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
            },
            RunningSpaces = new[]
            {
                "121c3a95-0f82-45a6-8ff2-1920b2067edb",
                "02c0cc92-6ecc-44b1-b7b2-096ca19ee143",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.SecurityGroupSpaceBindings;
    import com.pulumi.cloudfoundry.SecurityGroupSpaceBindingsArgs;
    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 mySecurityGroupSpaces = new SecurityGroupSpaceBindings("mySecurityGroupSpaces", SecurityGroupSpaceBindingsArgs.builder()
                .securityGroup("56eedab7-cb97-469b-a3e9-89521827c039")
                .stagingSpaces("02c0cc92-6ecc-44b1-b7b2-096ca19ee143")
                .runningSpaces(            
                    "121c3a95-0f82-45a6-8ff2-1920b2067edb",
                    "02c0cc92-6ecc-44b1-b7b2-096ca19ee143")
                .build());
    
        }
    }
    
    resources:
      mySecurityGroupSpaces:
        type: cloudfoundry:SecurityGroupSpaceBindings
        name: my_security_group_spaces
        properties:
          securityGroup: 56eedab7-cb97-469b-a3e9-89521827c039
          stagingSpaces:
            - 02c0cc92-6ecc-44b1-b7b2-096ca19ee143
          runningSpaces:
            - 121c3a95-0f82-45a6-8ff2-1920b2067edb
            - 02c0cc92-6ecc-44b1-b7b2-096ca19ee143
    
    Example coming soon!
    

    Create SecurityGroupSpaceBindings Resource

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

    Constructor syntax

    new SecurityGroupSpaceBindings(name: string, args: SecurityGroupSpaceBindingsArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityGroupSpaceBindings(resource_name: str,
                                   args: SecurityGroupSpaceBindingsArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityGroupSpaceBindings(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   security_group: Optional[str] = None,
                                   running_spaces: Optional[Sequence[str]] = None,
                                   staging_spaces: Optional[Sequence[str]] = None)
    func NewSecurityGroupSpaceBindings(ctx *Context, name string, args SecurityGroupSpaceBindingsArgs, opts ...ResourceOption) (*SecurityGroupSpaceBindings, error)
    public SecurityGroupSpaceBindings(string name, SecurityGroupSpaceBindingsArgs args, CustomResourceOptions? opts = null)
    public SecurityGroupSpaceBindings(String name, SecurityGroupSpaceBindingsArgs args)
    public SecurityGroupSpaceBindings(String name, SecurityGroupSpaceBindingsArgs args, CustomResourceOptions options)
    
    type: cloudfoundry:SecurityGroupSpaceBindings
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "cloudfoundry_security_group_space_bindings" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SecurityGroupSpaceBindingsArgs
    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 SecurityGroupSpaceBindingsArgs
    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 SecurityGroupSpaceBindingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityGroupSpaceBindingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityGroupSpaceBindingsArgs
    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 securityGroupSpaceBindingsResource = new Cloudfoundry.SecurityGroupSpaceBindings("securityGroupSpaceBindingsResource", new()
    {
        SecurityGroup = "string",
        RunningSpaces = new[]
        {
            "string",
        },
        StagingSpaces = new[]
        {
            "string",
        },
    });
    
    example, err := cloudfoundry.NewSecurityGroupSpaceBindings(ctx, "securityGroupSpaceBindingsResource", &cloudfoundry.SecurityGroupSpaceBindingsArgs{
    	SecurityGroup: pulumi.String("string"),
    	RunningSpaces: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	StagingSpaces: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "cloudfoundry_security_group_space_bindings" "securityGroupSpaceBindingsResource" {
      lifecycle {
        create_before_destroy = true
      }
      security_group = "string"
      running_spaces = ["string"]
      staging_spaces = ["string"]
    }
    
    var securityGroupSpaceBindingsResource = new SecurityGroupSpaceBindings("securityGroupSpaceBindingsResource", SecurityGroupSpaceBindingsArgs.builder()
        .securityGroup("string")
        .runningSpaces("string")
        .stagingSpaces("string")
        .build());
    
    security_group_space_bindings_resource = cloudfoundry.SecurityGroupSpaceBindings("securityGroupSpaceBindingsResource",
        security_group="string",
        running_spaces=["string"],
        staging_spaces=["string"])
    
    const securityGroupSpaceBindingsResource = new cloudfoundry.SecurityGroupSpaceBindings("securityGroupSpaceBindingsResource", {
        securityGroup: "string",
        runningSpaces: ["string"],
        stagingSpaces: ["string"],
    });
    
    type: cloudfoundry:SecurityGroupSpaceBindings
    properties:
        runningSpaces:
            - string
        securityGroup: string
        stagingSpaces:
            - string
    

    SecurityGroupSpaceBindings 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 SecurityGroupSpaceBindings resource accepts the following input properties:

    SecurityGroup string
    GUID of the isolation segment
    RunningSpaces List<string>
    The spaces where the security_group is applied to applications during runtime
    StagingSpaces List<string>
    The spaces where the security_group is applied to applications during staging
    SecurityGroup string
    GUID of the isolation segment
    RunningSpaces []string
    The spaces where the security_group is applied to applications during runtime
    StagingSpaces []string
    The spaces where the security_group is applied to applications during staging
    security_group string
    GUID of the isolation segment
    running_spaces list(string)
    The spaces where the security_group is applied to applications during runtime
    staging_spaces list(string)
    The spaces where the security_group is applied to applications during staging
    securityGroup String
    GUID of the isolation segment
    runningSpaces List<String>
    The spaces where the security_group is applied to applications during runtime
    stagingSpaces List<String>
    The spaces where the security_group is applied to applications during staging
    securityGroup string
    GUID of the isolation segment
    runningSpaces string[]
    The spaces where the security_group is applied to applications during runtime
    stagingSpaces string[]
    The spaces where the security_group is applied to applications during staging
    security_group str
    GUID of the isolation segment
    running_spaces Sequence[str]
    The spaces where the security_group is applied to applications during runtime
    staging_spaces Sequence[str]
    The spaces where the security_group is applied to applications during staging
    securityGroup String
    GUID of the isolation segment
    runningSpaces List<String>
    The spaces where the security_group is applied to applications during runtime
    stagingSpaces List<String>
    The spaces where the security_group is applied to applications during staging

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecurityGroupSpaceBindings Resource

    Get an existing SecurityGroupSpaceBindings 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?: SecurityGroupSpaceBindingsState, opts?: CustomResourceOptions): SecurityGroupSpaceBindings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            running_spaces: Optional[Sequence[str]] = None,
            security_group: Optional[str] = None,
            staging_spaces: Optional[Sequence[str]] = None) -> SecurityGroupSpaceBindings
    func GetSecurityGroupSpaceBindings(ctx *Context, name string, id IDInput, state *SecurityGroupSpaceBindingsState, opts ...ResourceOption) (*SecurityGroupSpaceBindings, error)
    public static SecurityGroupSpaceBindings Get(string name, Input<string> id, SecurityGroupSpaceBindingsState? state, CustomResourceOptions? opts = null)
    public static SecurityGroupSpaceBindings get(String name, Output<String> id, SecurityGroupSpaceBindingsState state, CustomResourceOptions options)
    resources:  _:    type: cloudfoundry:SecurityGroupSpaceBindings    get:      id: ${id}
    import {
      to = cloudfoundry_security_group_space_bindings.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.
    The following state arguments are supported:
    RunningSpaces List<string>
    The spaces where the security_group is applied to applications during runtime
    SecurityGroup string
    GUID of the isolation segment
    StagingSpaces List<string>
    The spaces where the security_group is applied to applications during staging
    RunningSpaces []string
    The spaces where the security_group is applied to applications during runtime
    SecurityGroup string
    GUID of the isolation segment
    StagingSpaces []string
    The spaces where the security_group is applied to applications during staging
    running_spaces list(string)
    The spaces where the security_group is applied to applications during runtime
    security_group string
    GUID of the isolation segment
    staging_spaces list(string)
    The spaces where the security_group is applied to applications during staging
    runningSpaces List<String>
    The spaces where the security_group is applied to applications during runtime
    securityGroup String
    GUID of the isolation segment
    stagingSpaces List<String>
    The spaces where the security_group is applied to applications during staging
    runningSpaces string[]
    The spaces where the security_group is applied to applications during runtime
    securityGroup string
    GUID of the isolation segment
    stagingSpaces string[]
    The spaces where the security_group is applied to applications during staging
    running_spaces Sequence[str]
    The spaces where the security_group is applied to applications during runtime
    security_group str
    GUID of the isolation segment
    staging_spaces Sequence[str]
    The spaces where the security_group is applied to applications during staging
    runningSpaces List<String>
    The spaces where the security_group is applied to applications during runtime
    securityGroup String
    GUID of the isolation segment
    stagingSpaces List<String>
    The spaces where the security_group is applied to applications during staging

    Package Details

    Repository
    cloudfoundry cloudfoundry/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry
    Viewing docs for cloudfoundry 1.19.0
    published on Friday, Nov 13, 2026 by cloudfoundry

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial