1. Packages
  2. AWS
  3. API Docs
  4. redshift
  5. ClusterIamRoles
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.redshift.ClusterIamRoles

Explore with Pulumi AI

Provides a Redshift Cluster IAM Roles resource.

NOTE: A Redshift cluster’s default IAM role can be managed both by this resource’s default_iam_role_arn argument and the aws.redshift.Cluster resource’s default_iam_role_arn argument. Do not configure different values for both arguments. Doing so will cause a conflict of default IAM roles.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.redshift.ClusterIamRoles("example", {
    clusterIdentifier: exampleAwsRedshiftCluster.clusterIdentifier,
    iamRoleArns: [exampleAwsIamRole.arn],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.redshift.ClusterIamRoles("example",
    cluster_identifier=example_aws_redshift_cluster["clusterIdentifier"],
    iam_role_arns=[example_aws_iam_role["arn"]])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := redshift.NewClusterIamRoles(ctx, "example", &redshift.ClusterIamRolesArgs{
			ClusterIdentifier: pulumi.Any(exampleAwsRedshiftCluster.ClusterIdentifier),
			IamRoleArns: pulumi.StringArray{
				exampleAwsIamRole.Arn,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.RedShift.ClusterIamRoles("example", new()
    {
        ClusterIdentifier = exampleAwsRedshiftCluster.ClusterIdentifier,
        IamRoleArns = new[]
        {
            exampleAwsIamRole.Arn,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.redshift.ClusterIamRoles;
import com.pulumi.aws.redshift.ClusterIamRolesArgs;
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 example = new ClusterIamRoles("example", ClusterIamRolesArgs.builder()
            .clusterIdentifier(exampleAwsRedshiftCluster.clusterIdentifier())
            .iamRoleArns(exampleAwsIamRole.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:redshift:ClusterIamRoles
    properties:
      clusterIdentifier: ${exampleAwsRedshiftCluster.clusterIdentifier}
      iamRoleArns:
        - ${exampleAwsIamRole.arn}
Copy

Create ClusterIamRoles Resource

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

Constructor syntax

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

@overload
def ClusterIamRoles(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    cluster_identifier: Optional[str] = None,
                    default_iam_role_arn: Optional[str] = None,
                    iam_role_arns: Optional[Sequence[str]] = None)
func NewClusterIamRoles(ctx *Context, name string, args ClusterIamRolesArgs, opts ...ResourceOption) (*ClusterIamRoles, error)
public ClusterIamRoles(string name, ClusterIamRolesArgs args, CustomResourceOptions? opts = null)
public ClusterIamRoles(String name, ClusterIamRolesArgs args)
public ClusterIamRoles(String name, ClusterIamRolesArgs args, CustomResourceOptions options)
type: aws:redshift:ClusterIamRoles
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. ClusterIamRolesArgs
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. ClusterIamRolesArgs
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. ClusterIamRolesArgs
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. ClusterIamRolesArgs
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. ClusterIamRolesArgs
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 clusterIamRolesResource = new Aws.RedShift.ClusterIamRoles("clusterIamRolesResource", new()
{
    ClusterIdentifier = "string",
    DefaultIamRoleArn = "string",
    IamRoleArns = new[]
    {
        "string",
    },
});
Copy
example, err := redshift.NewClusterIamRoles(ctx, "clusterIamRolesResource", &redshift.ClusterIamRolesArgs{
	ClusterIdentifier: pulumi.String("string"),
	DefaultIamRoleArn: pulumi.String("string"),
	IamRoleArns: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var clusterIamRolesResource = new ClusterIamRoles("clusterIamRolesResource", ClusterIamRolesArgs.builder()
    .clusterIdentifier("string")
    .defaultIamRoleArn("string")
    .iamRoleArns("string")
    .build());
Copy
cluster_iam_roles_resource = aws.redshift.ClusterIamRoles("clusterIamRolesResource",
    cluster_identifier="string",
    default_iam_role_arn="string",
    iam_role_arns=["string"])
Copy
const clusterIamRolesResource = new aws.redshift.ClusterIamRoles("clusterIamRolesResource", {
    clusterIdentifier: "string",
    defaultIamRoleArn: "string",
    iamRoleArns: ["string"],
});
Copy
type: aws:redshift:ClusterIamRoles
properties:
    clusterIdentifier: string
    defaultIamRoleArn: string
    iamRoleArns:
        - string
Copy

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

ClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
string
The name of the Redshift Cluster IAM Roles.
DefaultIamRoleArn string
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
IamRoleArns List<string>
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
ClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
string
The name of the Redshift Cluster IAM Roles.
DefaultIamRoleArn string
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
IamRoleArns []string
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
clusterIdentifier
This property is required.
Changes to this property will trigger replacement.
String
The name of the Redshift Cluster IAM Roles.
defaultIamRoleArn String
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iamRoleArns List<String>
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
clusterIdentifier
This property is required.
Changes to this property will trigger replacement.
string
The name of the Redshift Cluster IAM Roles.
defaultIamRoleArn string
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iamRoleArns string[]
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
cluster_identifier
This property is required.
Changes to this property will trigger replacement.
str
The name of the Redshift Cluster IAM Roles.
default_iam_role_arn str
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iam_role_arns Sequence[str]
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
clusterIdentifier
This property is required.
Changes to this property will trigger replacement.
String
The name of the Redshift Cluster IAM Roles.
defaultIamRoleArn String
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iamRoleArns List<String>
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.

Outputs

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

Get an existing ClusterIamRoles 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?: ClusterIamRolesState, opts?: CustomResourceOptions): ClusterIamRoles
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_identifier: Optional[str] = None,
        default_iam_role_arn: Optional[str] = None,
        iam_role_arns: Optional[Sequence[str]] = None) -> ClusterIamRoles
func GetClusterIamRoles(ctx *Context, name string, id IDInput, state *ClusterIamRolesState, opts ...ResourceOption) (*ClusterIamRoles, error)
public static ClusterIamRoles Get(string name, Input<string> id, ClusterIamRolesState? state, CustomResourceOptions? opts = null)
public static ClusterIamRoles get(String name, Output<String> id, ClusterIamRolesState state, CustomResourceOptions options)
resources:  _:    type: aws:redshift:ClusterIamRoles    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:
ClusterIdentifier Changes to this property will trigger replacement. string
The name of the Redshift Cluster IAM Roles.
DefaultIamRoleArn string
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
IamRoleArns List<string>
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
ClusterIdentifier Changes to this property will trigger replacement. string
The name of the Redshift Cluster IAM Roles.
DefaultIamRoleArn string
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
IamRoleArns []string
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
clusterIdentifier Changes to this property will trigger replacement. String
The name of the Redshift Cluster IAM Roles.
defaultIamRoleArn String
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iamRoleArns List<String>
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
clusterIdentifier Changes to this property will trigger replacement. string
The name of the Redshift Cluster IAM Roles.
defaultIamRoleArn string
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iamRoleArns string[]
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
cluster_identifier Changes to this property will trigger replacement. str
The name of the Redshift Cluster IAM Roles.
default_iam_role_arn str
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iam_role_arns Sequence[str]
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
clusterIdentifier Changes to this property will trigger replacement. String
The name of the Redshift Cluster IAM Roles.
defaultIamRoleArn String
The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
iamRoleArns List<String>
A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.

Import

Using pulumi import, import Redshift Cluster IAM Roless using the cluster_identifier. For example:

$ pulumi import aws:redshift/clusterIamRoles:ClusterIamRoles examplegroup1 example
Copy

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

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.