1. Packages
  2. Scaleway
  3. API Docs
  4. iam
  5. Policy
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.iam.Policy

Explore with Pulumi AI

Creates and manages Scaleway IAM Policies. For more information refer to the IAM API documentation.

You can find a detailed list of all permission sets available at Scaleway in the permission sets reference page.

Example Usage

Create a policy for an organization’s project

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

const _default = scaleway.account.getProject({
    name: "default",
});
const app = new scaleway.iam.Application("app", {name: "my app"});
const objectReadOnly = new scaleway.iam.Policy("object_read_only", {
    name: "my policy",
    description: "gives app readonly access to object storage in project",
    applicationId: app.id,
    rules: [{
        projectIds: [_default.then(_default => _default.id)],
        permissionSetNames: ["ObjectStorageReadOnly"],
    }],
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

default = scaleway.account.get_project(name="default")
app = scaleway.iam.Application("app", name="my app")
object_read_only = scaleway.iam.Policy("object_read_only",
    name="my policy",
    description="gives app readonly access to object storage in project",
    application_id=app.id,
    rules=[{
        "project_ids": [default.id],
        "permission_set_names": ["ObjectStorageReadOnly"],
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := account.LookupProject(ctx, &account.LookupProjectArgs{
			Name: pulumi.StringRef("default"),
		}, nil)
		if err != nil {
			return err
		}
		app, err := iam.NewApplication(ctx, "app", &iam.ApplicationArgs{
			Name: pulumi.String("my app"),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewPolicy(ctx, "object_read_only", &iam.PolicyArgs{
			Name:          pulumi.String("my policy"),
			Description:   pulumi.String("gives app readonly access to object storage in project"),
			ApplicationId: app.ID(),
			Rules: iam.PolicyRuleArray{
				&iam.PolicyRuleArgs{
					ProjectIds: pulumi.StringArray{
						pulumi.String(_default.Id),
					},
					PermissionSetNames: pulumi.StringArray{
						pulumi.String("ObjectStorageReadOnly"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var @default = Scaleway.Account.GetProject.Invoke(new()
    {
        Name = "default",
    });

    var app = new Scaleway.Iam.Application("app", new()
    {
        Name = "my app",
    });

    var objectReadOnly = new Scaleway.Iam.Policy("object_read_only", new()
    {
        Name = "my policy",
        Description = "gives app readonly access to object storage in project",
        ApplicationId = app.Id,
        Rules = new[]
        {
            new Scaleway.Iam.Inputs.PolicyRuleArgs
            {
                ProjectIds = new[]
                {
                    @default.Apply(@default => @default.Apply(getProjectResult => getProjectResult.Id)),
                },
                PermissionSetNames = new[]
                {
                    "ObjectStorageReadOnly",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.account.AccountFunctions;
import com.pulumi.scaleway.account.inputs.GetProjectArgs;
import com.pulumi.scaleway.iam.Application;
import com.pulumi.scaleway.iam.ApplicationArgs;
import com.pulumi.scaleway.iam.Policy;
import com.pulumi.scaleway.iam.PolicyArgs;
import com.pulumi.scaleway.iam.inputs.PolicyRuleArgs;
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 default = AccountFunctions.getProject(GetProjectArgs.builder()
            .name("default")
            .build());

        var app = new Application("app", ApplicationArgs.builder()
            .name("my app")
            .build());

        var objectReadOnly = new Policy("objectReadOnly", PolicyArgs.builder()
            .name("my policy")
            .description("gives app readonly access to object storage in project")
            .applicationId(app.id())
            .rules(PolicyRuleArgs.builder()
                .projectIds(default_.id())
                .permissionSetNames("ObjectStorageReadOnly")
                .build())
            .build());

    }
}
Copy
resources:
  app:
    type: scaleway:iam:Application
    properties:
      name: my app
  objectReadOnly:
    type: scaleway:iam:Policy
    name: object_read_only
    properties:
      name: my policy
      description: gives app readonly access to object storage in project
      applicationId: ${app.id}
      rules:
        - projectIds:
            - ${default.id}
          permissionSetNames:
            - ObjectStorageReadOnly
variables:
  default:
    fn::invoke:
      function: scaleway:account:getProject
      arguments:
        name: default
Copy

Create a policy for all current and future projects in an organization

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

const app = new scaleway.iam.Application("app", {name: "my app"});
const objectReadOnly = new scaleway.iam.Policy("object_read_only", {
    name: "my policy",
    description: "gives app readonly access to object storage in project",
    applicationId: app.id,
    rules: [{
        organizationId: app.organizationId,
        permissionSetNames: ["ObjectStorageReadOnly"],
    }],
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

app = scaleway.iam.Application("app", name="my app")
object_read_only = scaleway.iam.Policy("object_read_only",
    name="my policy",
    description="gives app readonly access to object storage in project",
    application_id=app.id,
    rules=[{
        "organization_id": app.organization_id,
        "permission_set_names": ["ObjectStorageReadOnly"],
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		app, err := iam.NewApplication(ctx, "app", &iam.ApplicationArgs{
			Name: pulumi.String("my app"),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewPolicy(ctx, "object_read_only", &iam.PolicyArgs{
			Name:          pulumi.String("my policy"),
			Description:   pulumi.String("gives app readonly access to object storage in project"),
			ApplicationId: app.ID(),
			Rules: iam.PolicyRuleArray{
				&iam.PolicyRuleArgs{
					OrganizationId: app.OrganizationId,
					PermissionSetNames: pulumi.StringArray{
						pulumi.String("ObjectStorageReadOnly"),
					},
				},
			},
		})
		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 app = new Scaleway.Iam.Application("app", new()
    {
        Name = "my app",
    });

    var objectReadOnly = new Scaleway.Iam.Policy("object_read_only", new()
    {
        Name = "my policy",
        Description = "gives app readonly access to object storage in project",
        ApplicationId = app.Id,
        Rules = new[]
        {
            new Scaleway.Iam.Inputs.PolicyRuleArgs
            {
                OrganizationId = app.OrganizationId,
                PermissionSetNames = new[]
                {
                    "ObjectStorageReadOnly",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.Application;
import com.pulumi.scaleway.iam.ApplicationArgs;
import com.pulumi.scaleway.iam.Policy;
import com.pulumi.scaleway.iam.PolicyArgs;
import com.pulumi.scaleway.iam.inputs.PolicyRuleArgs;
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 app = new Application("app", ApplicationArgs.builder()
            .name("my app")
            .build());

        var objectReadOnly = new Policy("objectReadOnly", PolicyArgs.builder()
            .name("my policy")
            .description("gives app readonly access to object storage in project")
            .applicationId(app.id())
            .rules(PolicyRuleArgs.builder()
                .organizationId(app.organizationId())
                .permissionSetNames("ObjectStorageReadOnly")
                .build())
            .build());

    }
}
Copy
resources:
  app:
    type: scaleway:iam:Application
    properties:
      name: my app
  objectReadOnly:
    type: scaleway:iam:Policy
    name: object_read_only
    properties:
      name: my policy
      description: gives app readonly access to object storage in project
      applicationId: ${app.id}
      rules:
        - organizationId: ${app.organizationId}
          permissionSetNames:
            - ObjectStorageReadOnly
Copy

Create a policy with a particular condition

IAM policy rule can use a condition to be applied. The following variables are available:

  • request.ip
  • request.user_agent
  • request.time
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.iam.Policy("main", {
    name: "tf_tests_policy_condition",
    noPrincipal: true,
    rules: [{
        organizationId: "%s",
        permissionSetNames: ["AllProductsFullAccess"],
        condition: "request.user_agent == 'My User Agent'",
    }],
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.iam.Policy("main",
    name="tf_tests_policy_condition",
    no_principal=True,
    rules=[{
        "organization_id": "%s",
        "permission_set_names": ["AllProductsFullAccess"],
        "condition": "request.user_agent == 'My User Agent'",
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.NewPolicy(ctx, "main", &iam.PolicyArgs{
			Name:        pulumi.String("tf_tests_policy_condition"),
			NoPrincipal: pulumi.Bool(true),
			Rules: iam.PolicyRuleArray{
				&iam.PolicyRuleArgs{
					OrganizationId: pulumi.String("%s"),
					PermissionSetNames: pulumi.StringArray{
						pulumi.String("AllProductsFullAccess"),
					},
					Condition: pulumi.String("request.user_agent == 'My User Agent'"),
				},
			},
		})
		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 main = new Scaleway.Iam.Policy("main", new()
    {
        Name = "tf_tests_policy_condition",
        NoPrincipal = true,
        Rules = new[]
        {
            new Scaleway.Iam.Inputs.PolicyRuleArgs
            {
                OrganizationId = "%s",
                PermissionSetNames = new[]
                {
                    "AllProductsFullAccess",
                },
                Condition = "request.user_agent == 'My User Agent'",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.Policy;
import com.pulumi.scaleway.iam.PolicyArgs;
import com.pulumi.scaleway.iam.inputs.PolicyRuleArgs;
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 main = new Policy("main", PolicyArgs.builder()
            .name("tf_tests_policy_condition")
            .noPrincipal(true)
            .rules(PolicyRuleArgs.builder()
                .organizationId("%s")
                .permissionSetNames("AllProductsFullAccess")
                .condition("request.user_agent == 'My User Agent'")
                .build())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:iam:Policy
    properties:
      name: tf_tests_policy_condition
      noPrincipal: true
      rules:
        - organizationId: '%s'
          permissionSetNames:
            - AllProductsFullAccess
          condition: request.user_agent == 'My User Agent'
Copy

Create Policy Resource

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

Constructor syntax

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

@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           rules: Optional[Sequence[PolicyRuleArgs]] = None,
           application_id: Optional[str] = None,
           description: Optional[str] = None,
           group_id: Optional[str] = None,
           name: Optional[str] = None,
           no_principal: Optional[bool] = None,
           organization_id: Optional[str] = None,
           tags: Optional[Sequence[str]] = None,
           user_id: Optional[str] = None)
func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: scaleway:iam:Policy
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 This property is required. PolicyArgs
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 This property is required. PolicyArgs
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 This property is required. PolicyArgs
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 This property is required. PolicyArgs
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. PolicyArgs
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 policyResource = new Scaleway.Iam.Policy("policyResource", new()
{
    Rules = new[]
    {
        new Scaleway.Iam.Inputs.PolicyRuleArgs
        {
            PermissionSetNames = new[]
            {
                "string",
            },
            Condition = "string",
            OrganizationId = "string",
            ProjectIds = new[]
            {
                "string",
            },
        },
    },
    ApplicationId = "string",
    Description = "string",
    GroupId = "string",
    Name = "string",
    NoPrincipal = false,
    OrganizationId = "string",
    Tags = new[]
    {
        "string",
    },
    UserId = "string",
});
Copy
example, err := iam.NewPolicy(ctx, "policyResource", &iam.PolicyArgs{
	Rules: iam.PolicyRuleArray{
		&iam.PolicyRuleArgs{
			PermissionSetNames: pulumi.StringArray{
				pulumi.String("string"),
			},
			Condition:      pulumi.String("string"),
			OrganizationId: pulumi.String("string"),
			ProjectIds: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	ApplicationId:  pulumi.String("string"),
	Description:    pulumi.String("string"),
	GroupId:        pulumi.String("string"),
	Name:           pulumi.String("string"),
	NoPrincipal:    pulumi.Bool(false),
	OrganizationId: pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	UserId: pulumi.String("string"),
})
Copy
var policyResource = new Policy("policyResource", PolicyArgs.builder()
    .rules(PolicyRuleArgs.builder()
        .permissionSetNames("string")
        .condition("string")
        .organizationId("string")
        .projectIds("string")
        .build())
    .applicationId("string")
    .description("string")
    .groupId("string")
    .name("string")
    .noPrincipal(false)
    .organizationId("string")
    .tags("string")
    .userId("string")
    .build());
Copy
policy_resource = scaleway.iam.Policy("policyResource",
    rules=[{
        "permission_set_names": ["string"],
        "condition": "string",
        "organization_id": "string",
        "project_ids": ["string"],
    }],
    application_id="string",
    description="string",
    group_id="string",
    name="string",
    no_principal=False,
    organization_id="string",
    tags=["string"],
    user_id="string")
Copy
const policyResource = new scaleway.iam.Policy("policyResource", {
    rules: [{
        permissionSetNames: ["string"],
        condition: "string",
        organizationId: "string",
        projectIds: ["string"],
    }],
    applicationId: "string",
    description: "string",
    groupId: "string",
    name: "string",
    noPrincipal: false,
    organizationId: "string",
    tags: ["string"],
    userId: "string",
});
Copy
type: scaleway:iam:Policy
properties:
    applicationId: string
    description: string
    groupId: string
    name: string
    noPrincipal: false
    organizationId: string
    rules:
        - condition: string
          organizationId: string
          permissionSetNames:
            - string
          projectIds:
            - string
    tags:
        - string
    userId: string
Copy

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

Rules This property is required. List<Pulumiverse.Scaleway.Iam.Inputs.PolicyRule>
List of rules in the policy.
ApplicationId string
ID of the application the policy will be linked to
Description string
The description of the IAM policy.
GroupId string
ID of the group the policy will be linked to
Name string
The name of the IAM policy.
NoPrincipal bool

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

OrganizationId string
organization_id) The ID of the organization the policy is associated with.
Tags List<string>
The tags associated with the IAM policy.
UserId string
ID of the user the policy will be linked to
Rules This property is required. []PolicyRuleArgs
List of rules in the policy.
ApplicationId string
ID of the application the policy will be linked to
Description string
The description of the IAM policy.
GroupId string
ID of the group the policy will be linked to
Name string
The name of the IAM policy.
NoPrincipal bool

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

OrganizationId string
organization_id) The ID of the organization the policy is associated with.
Tags []string
The tags associated with the IAM policy.
UserId string
ID of the user the policy will be linked to
rules This property is required. List<PolicyRule>
List of rules in the policy.
applicationId String
ID of the application the policy will be linked to
description String
The description of the IAM policy.
groupId String
ID of the group the policy will be linked to
name String
The name of the IAM policy.
noPrincipal Boolean

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organizationId String
organization_id) The ID of the organization the policy is associated with.
tags List<String>
The tags associated with the IAM policy.
userId String
ID of the user the policy will be linked to
rules This property is required. PolicyRule[]
List of rules in the policy.
applicationId string
ID of the application the policy will be linked to
description string
The description of the IAM policy.
groupId string
ID of the group the policy will be linked to
name string
The name of the IAM policy.
noPrincipal boolean

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organizationId string
organization_id) The ID of the organization the policy is associated with.
tags string[]
The tags associated with the IAM policy.
userId string
ID of the user the policy will be linked to
rules This property is required. Sequence[PolicyRuleArgs]
List of rules in the policy.
application_id str
ID of the application the policy will be linked to
description str
The description of the IAM policy.
group_id str
ID of the group the policy will be linked to
name str
The name of the IAM policy.
no_principal bool

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organization_id str
organization_id) The ID of the organization the policy is associated with.
tags Sequence[str]
The tags associated with the IAM policy.
user_id str
ID of the user the policy will be linked to
rules This property is required. List<Property Map>
List of rules in the policy.
applicationId String
ID of the application the policy will be linked to
description String
The description of the IAM policy.
groupId String
ID of the group the policy will be linked to
name String
The name of the IAM policy.
noPrincipal Boolean

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organizationId String
organization_id) The ID of the organization the policy is associated with.
tags List<String>
The tags associated with the IAM policy.
userId String
ID of the user the policy will be linked to

Outputs

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

CreatedAt string
The date and time of the creation of the policy.
Editable bool
Whether the policy is editable.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
The date and time of the last update of the policy.
CreatedAt string
The date and time of the creation of the policy.
Editable bool
Whether the policy is editable.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
The date and time of the last update of the policy.
createdAt String
The date and time of the creation of the policy.
editable Boolean
Whether the policy is editable.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
The date and time of the last update of the policy.
createdAt string
The date and time of the creation of the policy.
editable boolean
Whether the policy is editable.
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
The date and time of the last update of the policy.
created_at str
The date and time of the creation of the policy.
editable bool
Whether the policy is editable.
id str
The provider-assigned unique ID for this managed resource.
updated_at str
The date and time of the last update of the policy.
createdAt String
The date and time of the creation of the policy.
editable Boolean
Whether the policy is editable.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
The date and time of the last update of the policy.

Look up Existing Policy Resource

Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_id: Optional[str] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        editable: Optional[bool] = None,
        group_id: Optional[str] = None,
        name: Optional[str] = None,
        no_principal: Optional[bool] = None,
        organization_id: Optional[str] = None,
        rules: Optional[Sequence[PolicyRuleArgs]] = None,
        tags: Optional[Sequence[str]] = None,
        updated_at: Optional[str] = None,
        user_id: Optional[str] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
resources:  _:    type: scaleway:iam:Policy    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:
ApplicationId string
ID of the application the policy will be linked to
CreatedAt string
The date and time of the creation of the policy.
Description string
The description of the IAM policy.
Editable bool
Whether the policy is editable.
GroupId string
ID of the group the policy will be linked to
Name string
The name of the IAM policy.
NoPrincipal bool

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

OrganizationId string
organization_id) The ID of the organization the policy is associated with.
Rules List<Pulumiverse.Scaleway.Iam.Inputs.PolicyRule>
List of rules in the policy.
Tags List<string>
The tags associated with the IAM policy.
UpdatedAt string
The date and time of the last update of the policy.
UserId string
ID of the user the policy will be linked to
ApplicationId string
ID of the application the policy will be linked to
CreatedAt string
The date and time of the creation of the policy.
Description string
The description of the IAM policy.
Editable bool
Whether the policy is editable.
GroupId string
ID of the group the policy will be linked to
Name string
The name of the IAM policy.
NoPrincipal bool

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

OrganizationId string
organization_id) The ID of the organization the policy is associated with.
Rules []PolicyRuleArgs
List of rules in the policy.
Tags []string
The tags associated with the IAM policy.
UpdatedAt string
The date and time of the last update of the policy.
UserId string
ID of the user the policy will be linked to
applicationId String
ID of the application the policy will be linked to
createdAt String
The date and time of the creation of the policy.
description String
The description of the IAM policy.
editable Boolean
Whether the policy is editable.
groupId String
ID of the group the policy will be linked to
name String
The name of the IAM policy.
noPrincipal Boolean

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organizationId String
organization_id) The ID of the organization the policy is associated with.
rules List<PolicyRule>
List of rules in the policy.
tags List<String>
The tags associated with the IAM policy.
updatedAt String
The date and time of the last update of the policy.
userId String
ID of the user the policy will be linked to
applicationId string
ID of the application the policy will be linked to
createdAt string
The date and time of the creation of the policy.
description string
The description of the IAM policy.
editable boolean
Whether the policy is editable.
groupId string
ID of the group the policy will be linked to
name string
The name of the IAM policy.
noPrincipal boolean

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organizationId string
organization_id) The ID of the organization the policy is associated with.
rules PolicyRule[]
List of rules in the policy.
tags string[]
The tags associated with the IAM policy.
updatedAt string
The date and time of the last update of the policy.
userId string
ID of the user the policy will be linked to
application_id str
ID of the application the policy will be linked to
created_at str
The date and time of the creation of the policy.
description str
The description of the IAM policy.
editable bool
Whether the policy is editable.
group_id str
ID of the group the policy will be linked to
name str
The name of the IAM policy.
no_principal bool

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organization_id str
organization_id) The ID of the organization the policy is associated with.
rules Sequence[PolicyRuleArgs]
List of rules in the policy.
tags Sequence[str]
The tags associated with the IAM policy.
updated_at str
The date and time of the last update of the policy.
user_id str
ID of the user the policy will be linked to
applicationId String
ID of the application the policy will be linked to
createdAt String
The date and time of the creation of the policy.
description String
The description of the IAM policy.
editable Boolean
Whether the policy is editable.
groupId String
ID of the group the policy will be linked to
name String
The name of the IAM policy.
noPrincipal Boolean

If the policy doesn't apply to a principal.

Important Only one of user_id, group_id, application_id and no_principal may be set.

organizationId String
organization_id) The ID of the organization the policy is associated with.
rules List<Property Map>
List of rules in the policy.
tags List<String>
The tags associated with the IAM policy.
updatedAt String
The date and time of the last update of the policy.
userId String
ID of the user the policy will be linked to

Supporting Types

PolicyRule
, PolicyRuleArgs

PermissionSetNames This property is required. List<string>
Names of permission sets bind to the rule.
Condition string

The condition of the rule.

TIP: You can use the Scaleway CLI to list the permissions details. e.g:

scw iam permission-set list
OrganizationId string
ID of organization scoped to the rule, this can be used to create a rule for all projects in an organization.
ProjectIds List<string>

List of project IDs scoped to the rule.

Important One organization_id or project_ids must be set per rule.

PermissionSetNames This property is required. []string
Names of permission sets bind to the rule.
Condition string

The condition of the rule.

TIP: You can use the Scaleway CLI to list the permissions details. e.g:

scw iam permission-set list
OrganizationId string
ID of organization scoped to the rule, this can be used to create a rule for all projects in an organization.
ProjectIds []string

List of project IDs scoped to the rule.

Important One organization_id or project_ids must be set per rule.

permissionSetNames This property is required. List<String>
Names of permission sets bind to the rule.
condition String

The condition of the rule.

TIP: You can use the Scaleway CLI to list the permissions details. e.g:

scw iam permission-set list
organizationId String
ID of organization scoped to the rule, this can be used to create a rule for all projects in an organization.
projectIds List<String>

List of project IDs scoped to the rule.

Important One organization_id or project_ids must be set per rule.

permissionSetNames This property is required. string[]
Names of permission sets bind to the rule.
condition string

The condition of the rule.

TIP: You can use the Scaleway CLI to list the permissions details. e.g:

scw iam permission-set list
organizationId string
ID of organization scoped to the rule, this can be used to create a rule for all projects in an organization.
projectIds string[]

List of project IDs scoped to the rule.

Important One organization_id or project_ids must be set per rule.

permission_set_names This property is required. Sequence[str]
Names of permission sets bind to the rule.
condition str

The condition of the rule.

TIP: You can use the Scaleway CLI to list the permissions details. e.g:

scw iam permission-set list
organization_id str
ID of organization scoped to the rule, this can be used to create a rule for all projects in an organization.
project_ids Sequence[str]

List of project IDs scoped to the rule.

Important One organization_id or project_ids must be set per rule.

permissionSetNames This property is required. List<String>
Names of permission sets bind to the rule.
condition String

The condition of the rule.

TIP: You can use the Scaleway CLI to list the permissions details. e.g:

scw iam permission-set list
organizationId String
ID of organization scoped to the rule, this can be used to create a rule for all projects in an organization.
projectIds List<String>

List of project IDs scoped to the rule.

Important One organization_id or project_ids must be set per rule.

Import

Policies can be imported using the {id}, e.g.

bash

$ pulumi import scaleway:iam/policy:Policy main 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.