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 theaws.redshift.Cluster
resource’sdefault_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],
});
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"]])
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
})
}
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,
},
});
});
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());
}
}
resources:
example:
type: aws:redshift:ClusterIamRoles
properties:
clusterIdentifier: ${exampleAwsRedshiftCluster.clusterIdentifier}
iamRoleArns:
- ${exampleAwsIamRole.arn}
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 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.
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",
},
});
example, err := redshift.NewClusterIamRoles(ctx, "clusterIamRolesResource", &redshift.ClusterIamRolesArgs{
ClusterIdentifier: pulumi.String("string"),
DefaultIamRoleArn: pulumi.String("string"),
IamRoleArns: pulumi.StringArray{
pulumi.String("string"),
},
})
var clusterIamRolesResource = new ClusterIamRoles("clusterIamRolesResource", ClusterIamRolesArgs.builder()
.clusterIdentifier("string")
.defaultIamRoleArn("string")
.iamRoleArns("string")
.build());
cluster_iam_roles_resource = aws.redshift.ClusterIamRoles("clusterIamRolesResource",
cluster_identifier="string",
default_iam_role_arn="string",
iam_role_arns=["string"])
const clusterIamRolesResource = new aws.redshift.ClusterIamRoles("clusterIamRolesResource", {
clusterIdentifier: "string",
defaultIamRoleArn: "string",
iamRoleArns: ["string"],
});
type: aws:redshift:ClusterIamRoles
properties:
clusterIdentifier: string
defaultIamRoleArn: string
iamRoleArns:
- string
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:
- Cluster
Identifier string - The name of the Redshift Cluster IAM Roles.
- Default
Iam stringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- Iam
Role List<string>Arns - 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 string - The name of the Redshift Cluster IAM Roles.
- Default
Iam stringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- Iam
Role []stringArns - 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 String - The name of the Redshift Cluster IAM Roles.
- default
Iam StringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam
Role List<String>Arns - 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 string - The name of the Redshift Cluster IAM Roles.
- default
Iam stringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam
Role string[]Arns - 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_ strrole_ arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam_
role_ Sequence[str]arns - 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 String - The name of the Redshift Cluster IAM Roles.
- default
Iam StringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam
Role List<String>Arns - 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.
- Cluster
Identifier string - The name of the Redshift Cluster IAM Roles.
- Default
Iam stringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- Iam
Role List<string>Arns - 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 string - The name of the Redshift Cluster IAM Roles.
- Default
Iam stringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- Iam
Role []stringArns - 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 String - The name of the Redshift Cluster IAM Roles.
- default
Iam StringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam
Role List<String>Arns - 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 string - The name of the Redshift Cluster IAM Roles.
- default
Iam stringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam
Role string[]Arns - 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_ strrole_ arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam_
role_ Sequence[str]arns - 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 String - The name of the Redshift Cluster IAM Roles.
- default
Iam StringRole Arn - The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created.
- iam
Role List<String>Arns - 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
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.