1. Packages
  2. Scaleway
  3. API Docs
  4. instance
  5. PlacementGroup
Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse

scaleway.instance.PlacementGroup

Explore with Pulumi AI

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const availabilityGroup = new scaleway.instance.PlacementGroup("availability_group", {});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

availability_group = scaleway.instance.PlacementGroup("availability_group")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/instance"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := instance.NewPlacementGroup(ctx, "availability_group", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var availabilityGroup = new Scaleway.Instance.PlacementGroup("availability_group");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.instance.PlacementGroup;
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 PlacementGroup("availabilityGroup");

    }
}
Copy
resources:
  availabilityGroup:
    type: scaleway:instance:PlacementGroup
    name: availability_group
Copy

Create PlacementGroup Resource

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

Constructor syntax

new PlacementGroup(name: string, args?: PlacementGroupArgs, opts?: CustomResourceOptions);
@overload
def PlacementGroup(resource_name: str,
                   args: Optional[PlacementGroupArgs] = None,
                   opts: Optional[ResourceOptions] = None)

@overload
def PlacementGroup(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 NewPlacementGroup(ctx *Context, name string, args *PlacementGroupArgs, opts ...ResourceOption) (*PlacementGroup, error)
public PlacementGroup(string name, PlacementGroupArgs? args = null, CustomResourceOptions? opts = null)
public PlacementGroup(String name, PlacementGroupArgs args)
public PlacementGroup(String name, PlacementGroupArgs args, CustomResourceOptions options)
type: scaleway:instance:PlacementGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args PlacementGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args PlacementGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args PlacementGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args PlacementGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PlacementGroupArgs
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 placementGroupResource = new Scaleway.Instance.PlacementGroup("placementGroupResource", new()
{
    Name = "string",
    PolicyMode = "string",
    PolicyType = "string",
    ProjectId = "string",
    Tags = new[]
    {
        "string",
    },
    Zone = "string",
});
Copy
example, err := instance.NewPlacementGroup(ctx, "placementGroupResource", &instance.PlacementGroupArgs{
	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"),
})
Copy
var placementGroupResource = new PlacementGroup("placementGroupResource", PlacementGroupArgs.builder()
    .name("string")
    .policyMode("string")
    .policyType("string")
    .projectId("string")
    .tags("string")
    .zone("string")
    .build());
Copy
placement_group_resource = scaleway.instance.PlacementGroup("placementGroupResource",
    name="string",
    policy_mode="string",
    policy_type="string",
    project_id="string",
    tags=["string"],
    zone="string")
Copy
const placementGroupResource = new scaleway.instance.PlacementGroup("placementGroupResource", {
    name: "string",
    policyMode: "string",
    policyType: "string",
    projectId: "string",
    tags: ["string"],
    zone: "string",
});
Copy
type: scaleway:instance:PlacementGroup
properties:
    name: string
    policyMode: string
    policyType: string
    projectId: string
    tags:
        - string
    zone: string
Copy

PlacementGroup 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 PlacementGroup 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
zone) The zone in which the placement group should be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the PlacementGroup 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 PlacementGroup Resource

Get an existing PlacementGroup 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?: PlacementGroupState, opts?: CustomResourceOptions): PlacementGroup
@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) -> PlacementGroup
func GetPlacementGroup(ctx *Context, name string, id IDInput, state *PlacementGroupState, opts ...ResourceOption) (*PlacementGroup, error)
public static PlacementGroup Get(string name, Input<string> id, PlacementGroupState? state, CustomResourceOptions? opts = null)
public static PlacementGroup get(String name, Output<String> id, PlacementGroupState state, CustomResourceOptions options)
resources:  _:    type: scaleway:instance:PlacementGroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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:instance/placementGroup:PlacementGroup availability_group fr-par-1/11111111-1111-1111-1111-111111111111
Copy

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.