ClusterIamRoles

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

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

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

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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(aws_redshift_cluster.Example.Cluster_identifier),
			IamRoleArns: pulumi.StringArray{
				aws_iam_role.Example.Arn,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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(aws_redshift_cluster.example().cluster_identifier())
            .iamRoleArns(aws_iam_role.example().arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.redshift.ClusterIamRoles("example",
    cluster_identifier=aws_redshift_cluster["example"]["cluster_identifier"],
    iam_role_arns=[aws_iam_role["example"]["arn"]])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.redshift.ClusterIamRoles("example", {
    clusterIdentifier: aws_redshift_cluster.example.cluster_identifier,
    iamRoleArns: [aws_iam_role.example.arn],
});
resources:
  example:
    type: aws:redshift:ClusterIamRoles
    properties:
      clusterIdentifier: ${aws_redshift_cluster.example.cluster_identifier}
      iamRoleArns:
        - ${aws_iam_role.example.arn}

Create ClusterIamRoles Resource

new ClusterIamRoles(name: string, args: ClusterIamRolesArgs, opts?: CustomResourceOptions);
@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)
@overload
def ClusterIamRoles(resource_name: str,
                    args: ClusterIamRolesArgs,
                    opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args ClusterIamRolesArgs
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 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 string
The unique name of the resource.
args ClusterIamRolesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterIamRolesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClusterIamRolesArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The ClusterIamRoles resource accepts the following input properties:

ClusterIdentifier 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 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 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 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 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 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)
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:
ClusterIdentifier 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 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 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 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 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 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

Redshift Cluster IAM Roless can be imported using the cluster_identifier, e.g.,

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.