1. Packages
  2. Cloudfoundry Provider
  3. API Docs
  4. SpaceAsgs
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

cloudfoundry.SpaceAsgs

Explore with Pulumi AI

cloudfoundry logo
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

    Example Usage

    The following example assigns one asg1 for running and asg2 for staging to space1. All resources like asg1, asg2 and space1 need to be declared and created before.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const spaceasgs1 = new cloudfoundry.SpaceAsgs("spaceasgs1", {
        space: cloudfoundry_space.space1.id,
        runningAsgs: [cloudfoundry_asg.asg1.id],
        stagingAsgs: [cloudfoundry_asg.asg2.id],
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    spaceasgs1 = cloudfoundry.SpaceAsgs("spaceasgs1",
        space=cloudfoundry_space["space1"]["id"],
        running_asgs=[cloudfoundry_asg["asg1"]["id"]],
        staging_asgs=[cloudfoundry_asg["asg2"]["id"]])
    
    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.NewSpaceAsgs(ctx, "spaceasgs1", &cloudfoundry.SpaceAsgsArgs{
    			Space: pulumi.Any(cloudfoundry_space.Space1.Id),
    			RunningAsgs: pulumi.StringArray{
    				cloudfoundry_asg.Asg1.Id,
    			},
    			StagingAsgs: pulumi.StringArray{
    				cloudfoundry_asg.Asg2.Id,
    			},
    		})
    		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 spaceasgs1 = new Cloudfoundry.SpaceAsgs("spaceasgs1", new()
        {
            Space = cloudfoundry_space.Space1.Id,
            RunningAsgs = new[]
            {
                cloudfoundry_asg.Asg1.Id,
            },
            StagingAsgs = new[]
            {
                cloudfoundry_asg.Asg2.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.SpaceAsgs;
    import com.pulumi.cloudfoundry.SpaceAsgsArgs;
    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 spaceasgs1 = new SpaceAsgs("spaceasgs1", SpaceAsgsArgs.builder()
                .space(cloudfoundry_space.space1().id())
                .runningAsgs(cloudfoundry_asg.asg1().id())
                .stagingAsgs(cloudfoundry_asg.asg2().id())
                .build());
    
        }
    }
    
    resources:
      spaceasgs1:
        type: cloudfoundry:SpaceAsgs
        properties:
          space: ${cloudfoundry_space.space1.id}
          runningAsgs:
            - ${cloudfoundry_asg.asg1.id}
          stagingAsgs:
            - ${cloudfoundry_asg.asg2.id}
    

    Create SpaceAsgs Resource

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

    Constructor syntax

    new SpaceAsgs(name: string, args: SpaceAsgsArgs, opts?: CustomResourceOptions);
    @overload
    def SpaceAsgs(resource_name: str,
                  args: SpaceAsgsArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def SpaceAsgs(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  space: Optional[str] = None,
                  running_asgs: Optional[Sequence[str]] = None,
                  space_asgs_id: Optional[str] = None,
                  staging_asgs: Optional[Sequence[str]] = None)
    func NewSpaceAsgs(ctx *Context, name string, args SpaceAsgsArgs, opts ...ResourceOption) (*SpaceAsgs, error)
    public SpaceAsgs(string name, SpaceAsgsArgs args, CustomResourceOptions? opts = null)
    public SpaceAsgs(String name, SpaceAsgsArgs args)
    public SpaceAsgs(String name, SpaceAsgsArgs args, CustomResourceOptions options)
    
    type: cloudfoundry:SpaceAsgs
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SpaceAsgsArgs
    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 SpaceAsgsArgs
    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 SpaceAsgsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SpaceAsgsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SpaceAsgsArgs
    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 spaceAsgsResource = new Cloudfoundry.SpaceAsgs("spaceAsgsResource", new()
    {
        Space = "string",
        RunningAsgs = new[]
        {
            "string",
        },
        SpaceAsgsId = "string",
        StagingAsgs = new[]
        {
            "string",
        },
    });
    
    example, err := cloudfoundry.NewSpaceAsgs(ctx, "spaceAsgsResource", &cloudfoundry.SpaceAsgsArgs{
    	Space: pulumi.String("string"),
    	RunningAsgs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SpaceAsgsId: pulumi.String("string"),
    	StagingAsgs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var spaceAsgsResource = new SpaceAsgs("spaceAsgsResource", SpaceAsgsArgs.builder()
        .space("string")
        .runningAsgs("string")
        .spaceAsgsId("string")
        .stagingAsgs("string")
        .build());
    
    space_asgs_resource = cloudfoundry.SpaceAsgs("spaceAsgsResource",
        space="string",
        running_asgs=["string"],
        space_asgs_id="string",
        staging_asgs=["string"])
    
    const spaceAsgsResource = new cloudfoundry.SpaceAsgs("spaceAsgsResource", {
        space: "string",
        runningAsgs: ["string"],
        spaceAsgsId: "string",
        stagingAsgs: ["string"],
    });
    
    type: cloudfoundry:SpaceAsgs
    properties:
        runningAsgs:
            - string
        space: string
        spaceAsgsId: string
        stagingAsgs:
            - string
    

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

    Space string
    The guid of the target space.
    RunningAsgs List<string>
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    SpaceAsgsId string
    StagingAsgs List<string>
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    Space string
    The guid of the target space.
    RunningAsgs []string
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    SpaceAsgsId string
    StagingAsgs []string
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    space String
    The guid of the target space.
    runningAsgs List<String>
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    spaceAsgsId String
    stagingAsgs List<String>
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    space string
    The guid of the target space.
    runningAsgs string[]
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    spaceAsgsId string
    stagingAsgs string[]
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    space str
    The guid of the target space.
    running_asgs Sequence[str]
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    space_asgs_id str
    staging_asgs Sequence[str]
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    space String
    The guid of the target space.
    runningAsgs List<String>
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    spaceAsgsId String
    stagingAsgs List<String>
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SpaceAsgs 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SpaceAsgs Resource

    Get an existing SpaceAsgs 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?: SpaceAsgsState, opts?: CustomResourceOptions): SpaceAsgs
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            running_asgs: Optional[Sequence[str]] = None,
            space: Optional[str] = None,
            space_asgs_id: Optional[str] = None,
            staging_asgs: Optional[Sequence[str]] = None) -> SpaceAsgs
    func GetSpaceAsgs(ctx *Context, name string, id IDInput, state *SpaceAsgsState, opts ...ResourceOption) (*SpaceAsgs, error)
    public static SpaceAsgs Get(string name, Input<string> id, SpaceAsgsState? state, CustomResourceOptions? opts = null)
    public static SpaceAsgs get(String name, Output<String> id, SpaceAsgsState state, CustomResourceOptions options)
    resources:  _:    type: cloudfoundry:SpaceAsgs    get:      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:
    RunningAsgs List<string>
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    Space string
    The guid of the target space.
    SpaceAsgsId string
    StagingAsgs List<string>
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    RunningAsgs []string
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    Space string
    The guid of the target space.
    SpaceAsgsId string
    StagingAsgs []string
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    runningAsgs List<String>
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    space String
    The guid of the target space.
    spaceAsgsId String
    stagingAsgs List<String>
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    runningAsgs string[]
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    space string
    The guid of the target space.
    spaceAsgsId string
    stagingAsgs string[]
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    running_asgs Sequence[str]
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    space str
    The guid of the target space.
    space_asgs_id str
    staging_asgs Sequence[str]
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.
    runningAsgs List<String>
    List of running application security groups to apply to applications running within this space. Defaults to empty list.
    space String
    The guid of the target space.
    spaceAsgsId String
    stagingAsgs List<String>
    List of staging application security groups to apply to applications being staged for this space. Defaults to empty list.

    Package Details

    Repository
    cloudfoundry cloudfoundry-community/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry logo
    cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community