1. Packages
  2. Scaleway
  3. API Docs
  4. InstancePlacementGroup
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.InstancePlacementGroup

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    Creates and manages Compute Instance Placement Groups. For more information, see the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const availabilityGroup = new scaleway.InstancePlacementGroup("availabilityGroup", {});
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    availability_group = scaleway.InstancePlacementGroup("availabilityGroup")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewInstancePlacementGroup(ctx, "availabilityGroup", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var availabilityGroup = new Scaleway.InstancePlacementGroup("availabilityGroup");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstancePlacementGroup;
    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 availabilityGroup = new InstancePlacementGroup("availabilityGroup");
    
        }
    }
    
    resources:
      availabilityGroup:
        type: scaleway:InstancePlacementGroup
    

    Create InstancePlacementGroup Resource

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

    Constructor syntax

    new InstancePlacementGroup(name: string, args?: InstancePlacementGroupArgs, opts?: CustomResourceOptions);
    @overload
    def InstancePlacementGroup(resource_name: str,
                               args: Optional[InstancePlacementGroupArgs] = None,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstancePlacementGroup(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               name: Optional[str] = None,
                               policy_mode: Optional[str] = None,
                               policy_type: Optional[str] = None,
                               project_id: Optional[str] = None,
                               tags: Optional[Sequence[str]] = None,
                               zone: Optional[str] = None)
    func NewInstancePlacementGroup(ctx *Context, name string, args *InstancePlacementGroupArgs, opts ...ResourceOption) (*InstancePlacementGroup, error)
    public InstancePlacementGroup(string name, InstancePlacementGroupArgs? args = null, CustomResourceOptions? opts = null)
    public InstancePlacementGroup(String name, InstancePlacementGroupArgs args)
    public InstancePlacementGroup(String name, InstancePlacementGroupArgs args, CustomResourceOptions options)
    
    type: scaleway:InstancePlacementGroup
    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 InstancePlacementGroupArgs
    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 InstancePlacementGroupArgs
    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 InstancePlacementGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstancePlacementGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstancePlacementGroupArgs
    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 instancePlacementGroupResource = new Scaleway.InstancePlacementGroup("instancePlacementGroupResource", new()
    {
        Name = "string",
        PolicyMode = "string",
        PolicyType = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
        Zone = "string",
    });
    
    example, err := scaleway.NewInstancePlacementGroup(ctx, "instancePlacementGroupResource", &scaleway.InstancePlacementGroupArgs{
    	Name:       pulumi.String("string"),
    	PolicyMode: pulumi.String("string"),
    	PolicyType: pulumi.String("string"),
    	ProjectId:  pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Zone: pulumi.String("string"),
    })
    
    var instancePlacementGroupResource = new InstancePlacementGroup("instancePlacementGroupResource", InstancePlacementGroupArgs.builder()
        .name("string")
        .policyMode("string")
        .policyType("string")
        .projectId("string")
        .tags("string")
        .zone("string")
        .build());
    
    instance_placement_group_resource = scaleway.InstancePlacementGroup("instancePlacementGroupResource",
        name="string",
        policy_mode="string",
        policy_type="string",
        project_id="string",
        tags=["string"],
        zone="string")
    
    const instancePlacementGroupResource = new scaleway.InstancePlacementGroup("instancePlacementGroupResource", {
        name: "string",
        policyMode: "string",
        policyType: "string",
        projectId: "string",
        tags: ["string"],
        zone: "string",
    });
    
    type: scaleway:InstancePlacementGroup
    properties:
        name: string
        policyMode: string
        policyType: string
        projectId: string
        tags:
            - string
        zone: string
    

    InstancePlacementGroup Resource Properties

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

    Inputs

    The InstancePlacementGroup resource accepts the following input properties:

    Name string
    The name of the placement group.
    PolicyMode string
    The policy mode of the placement group. Possible values are: optional or enforced.
    PolicyType string
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    ProjectId string
    project_id) The ID of the project the placement group is associated with.
    Tags List<string>
    A list of tags to apply to the placement group.
    Zone string
    zone) The zone in which the placement group should be created.
    Name string
    The name of the placement group.
    PolicyMode string
    The policy mode of the placement group. Possible values are: optional or enforced.
    PolicyType string
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    ProjectId string
    project_id) The ID of the project the placement group is associated with.
    Tags []string
    A list of tags to apply to the placement group.
    Zone string
    zone) The zone in which the placement group should be created.
    name String
    The name of the placement group.
    policyMode String
    The policy mode of the placement group. Possible values are: optional or enforced.
    policyType String
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    projectId String
    project_id) The ID of the project the placement group is associated with.
    tags List<String>
    A list of tags to apply to the placement group.
    zone String
    zone) The zone in which the placement group should be created.
    name string
    The name of the placement group.
    policyMode string
    The policy mode of the placement group. Possible values are: optional or enforced.
    policyType string
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    projectId string
    project_id) The ID of the project the placement group is associated with.
    tags string[]
    A list of tags to apply to the placement group.
    zone string
    zone) The zone in which the placement group should be created.
    name str
    The name of the placement group.
    policy_mode str
    The policy mode of the placement group. Possible values are: optional or enforced.
    policy_type str
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    project_id str
    project_id) The ID of the project the placement group is associated with.
    tags Sequence[str]
    A list of tags to apply to the placement group.
    zone str
    zone) The zone in which the placement group should be created.
    name String
    The name of the placement group.
    policyMode String
    The policy mode of the placement group. Possible values are: optional or enforced.
    policyType String
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    projectId String
    project_id) The ID of the project the placement group is associated with.
    tags List<String>
    A list of tags to apply to the placement group.
    zone String
    zone) The zone in which the placement group should be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the placement group is associated with.
    PolicyRespected bool
    Is true when the policy is respected.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the placement group is associated with.
    PolicyRespected bool
    Is true when the policy is respected.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the placement group is associated with.
    policyRespected Boolean
    Is true when the policy is respected.
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The organization ID the placement group is associated with.
    policyRespected boolean
    Is true when the policy is respected.
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The organization ID the placement group is associated with.
    policy_respected bool
    Is true when the policy is respected.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the placement group is associated with.
    policyRespected Boolean
    Is true when the policy is respected.

    Look up Existing InstancePlacementGroup Resource

    Get an existing InstancePlacementGroup 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?: InstancePlacementGroupState, opts?: CustomResourceOptions): InstancePlacementGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            policy_mode: Optional[str] = None,
            policy_respected: Optional[bool] = None,
            policy_type: Optional[str] = None,
            project_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            zone: Optional[str] = None) -> InstancePlacementGroup
    func GetInstancePlacementGroup(ctx *Context, name string, id IDInput, state *InstancePlacementGroupState, opts ...ResourceOption) (*InstancePlacementGroup, error)
    public static InstancePlacementGroup Get(string name, Input<string> id, InstancePlacementGroupState? state, CustomResourceOptions? opts = null)
    public static InstancePlacementGroup get(String name, Output<String> id, InstancePlacementGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Name string
    The name of the placement group.
    OrganizationId string
    The organization ID the placement group is associated with.
    PolicyMode string
    The policy mode of the placement group. Possible values are: optional or enforced.
    PolicyRespected bool
    Is true when the policy is respected.
    PolicyType string
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    ProjectId string
    project_id) The ID of the project the placement group is associated with.
    Tags List<string>
    A list of tags to apply to the placement group.
    Zone string
    zone) The zone in which the placement group should be created.
    Name string
    The name of the placement group.
    OrganizationId string
    The organization ID the placement group is associated with.
    PolicyMode string
    The policy mode of the placement group. Possible values are: optional or enforced.
    PolicyRespected bool
    Is true when the policy is respected.
    PolicyType string
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    ProjectId string
    project_id) The ID of the project the placement group is associated with.
    Tags []string
    A list of tags to apply to the placement group.
    Zone string
    zone) The zone in which the placement group should be created.
    name String
    The name of the placement group.
    organizationId String
    The organization ID the placement group is associated with.
    policyMode String
    The policy mode of the placement group. Possible values are: optional or enforced.
    policyRespected Boolean
    Is true when the policy is respected.
    policyType String
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    projectId String
    project_id) The ID of the project the placement group is associated with.
    tags List<String>
    A list of tags to apply to the placement group.
    zone String
    zone) The zone in which the placement group should be created.
    name string
    The name of the placement group.
    organizationId string
    The organization ID the placement group is associated with.
    policyMode string
    The policy mode of the placement group. Possible values are: optional or enforced.
    policyRespected boolean
    Is true when the policy is respected.
    policyType string
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    projectId string
    project_id) The ID of the project the placement group is associated with.
    tags string[]
    A list of tags to apply to the placement group.
    zone string
    zone) The zone in which the placement group should be created.
    name str
    The name of the placement group.
    organization_id str
    The organization ID the placement group is associated with.
    policy_mode str
    The policy mode of the placement group. Possible values are: optional or enforced.
    policy_respected bool
    Is true when the policy is respected.
    policy_type str
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    project_id str
    project_id) The ID of the project the placement group is associated with.
    tags Sequence[str]
    A list of tags to apply to the placement group.
    zone str
    zone) The zone in which the placement group should be created.
    name String
    The name of the placement group.
    organizationId String
    The organization ID the placement group is associated with.
    policyMode String
    The policy mode of the placement group. Possible values are: optional or enforced.
    policyRespected Boolean
    Is true when the policy is respected.
    policyType String
    The policy type of the placement group. Possible values are: low_latency or max_availability.
    projectId String
    project_id) The ID of the project the placement group is associated with.
    tags List<String>
    A list of tags to apply to the placement group.
    zone String
    zone) The zone in which the placement group should be created.

    Import

    Placement groups can be imported using the {zone}/{id}, e.g.

    bash

    $ pulumi import scaleway:index/instancePlacementGroup:InstancePlacementGroup availability_group fr-par-1/11111111-1111-1111-1111-111111111111
    

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

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse