Connector Profile
    Provides an AppFlow connector profile resource. For information about AppFlow flows, see the Amazon AppFlow API Reference. For specific information about creating an AppFlow connector profile, see the CreateConnectorProfile page in the Amazon AppFlow API Reference.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.iam.getPolicy({
    name: "AmazonRedshiftAllCommandsFullAccess",
});
const exampleRole = new aws.iam.Role("example", {
    name: "example_role",
    managedPolicyArns: [test.arn],
    assumeRolePolicy: JSON.stringify({
        Version: "2012-10-17",
        Statement: [{
            Action: "sts:AssumeRole",
            Effect: "Allow",
            Sid: "",
            Principal: {
                Service: "ec2.amazonaws.com",
            },
        }],
    }),
});
const exampleBucketV2 = new aws.s3.BucketV2("example", {bucket: "example_bucket"});
const exampleCluster = new aws.redshift.Cluster("example", {
    clusterIdentifier: "example_cluster",
    databaseName: "example_db",
    masterUsername: "exampleuser",
    masterPassword: "examplePassword123!",
    nodeType: "dc1.large",
    clusterType: "single-node",
});
const exampleConnectorProfile = new aws.appflow.ConnectorProfile("example", {
    name: "example_profile",
    connectorType: "Redshift",
    connectionMode: "Public",
    connectorProfileConfig: {
        connectorProfileCredentials: {
            redshift: {
                password: exampleCluster.masterPassword,
                username: exampleCluster.masterUsername,
            },
        },
        connectorProfileProperties: {
            redshift: {
                bucketName: exampleBucketV2.name,
                databaseUrl: pulumi.interpolate`jdbc:redshift://${exampleCluster.endpoint}/${exampleCluster.databaseName}`,
                roleArn: exampleRole.arn,
            },
        },
    },
});Content copied to clipboard
import pulumi
import json
import pulumi_aws as aws
example = aws.iam.get_policy(name="AmazonRedshiftAllCommandsFullAccess")
example_role = aws.iam.Role("example",
    name="example_role",
    managed_policy_arns=[test["arn"]],
    assume_role_policy=json.dumps({
        "Version": "2012-10-17",
        "Statement": [{
            "Action": "sts:AssumeRole",
            "Effect": "Allow",
            "Sid": "",
            "Principal": {
                "Service": "ec2.amazonaws.com",
            },
        }],
    }))
example_bucket_v2 = aws.s3.BucketV2("example", bucket="example_bucket")
example_cluster = aws.redshift.Cluster("example",
    cluster_identifier="example_cluster",
    database_name="example_db",
    master_username="exampleuser",
    master_password="examplePassword123!",
    node_type="dc1.large",
    cluster_type="single-node")
example_connector_profile = aws.appflow.ConnectorProfile("example",
    name="example_profile",
    connector_type="Redshift",
    connection_mode="Public",
    connector_profile_config=aws.appflow.ConnectorProfileConnectorProfileConfigArgs(
        connector_profile_credentials=aws.appflow.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsArgs(
            redshift=aws.appflow.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsRedshiftArgs(
                password=example_cluster.master_password,
                username=example_cluster.master_username,
            ),
        ),
        connector_profile_properties=aws.appflow.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesArgs(
            redshift=aws.appflow.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesRedshiftArgs(
                bucket_name=example_bucket_v2.name,
                database_url=pulumi.Output.all(example_cluster.endpoint, example_cluster.database_name).apply(lambda endpoint, database_name: f"jdbc:redshift://{endpoint}/{database_name}"),
                role_arn=example_role.arn,
            ),
        ),
    ))Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
    var example = Aws.Iam.GetPolicy.Invoke(new()
    {
        Name = "AmazonRedshiftAllCommandsFullAccess",
    });
    var exampleRole = new Aws.Iam.Role("example", new()
    {
        Name = "example_role",
        ManagedPolicyArns = new[]
        {
            test.Arn,
        },
        AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["Version"] = "2012-10-17",
            ["Statement"] = new[]
            {
                new Dictionary<string, object?>
                {
                    ["Action"] = "sts:AssumeRole",
                    ["Effect"] = "Allow",
                    ["Sid"] = "",
                    ["Principal"] = new Dictionary<string, object?>
                    {
                        ["Service"] = "ec2.amazonaws.com",
                    },
                },
            },
        }),
    });
    var exampleBucketV2 = new Aws.S3.BucketV2("example", new()
    {
        Bucket = "example_bucket",
    });
    var exampleCluster = new Aws.RedShift.Cluster("example", new()
    {
        ClusterIdentifier = "example_cluster",
        DatabaseName = "example_db",
        MasterUsername = "exampleuser",
        MasterPassword = "examplePassword123!",
        NodeType = "dc1.large",
        ClusterType = "single-node",
    });
    var exampleConnectorProfile = new Aws.AppFlow.ConnectorProfile("example", new()
    {
        Name = "example_profile",
        ConnectorType = "Redshift",
        ConnectionMode = "Public",
        ConnectorProfileConfig = new Aws.AppFlow.Inputs.ConnectorProfileConnectorProfileConfigArgs
        {
            ConnectorProfileCredentials = new Aws.AppFlow.Inputs.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsArgs
            {
                Redshift = new Aws.AppFlow.Inputs.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsRedshiftArgs
                {
                    Password = exampleCluster.MasterPassword,
                    Username = exampleCluster.MasterUsername,
                },
            },
            ConnectorProfileProperties = new Aws.AppFlow.Inputs.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesArgs
            {
                Redshift = new Aws.AppFlow.Inputs.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesRedshiftArgs
                {
                    BucketName = exampleBucketV2.Name,
                    DatabaseUrl = Output.Tuple(exampleCluster.Endpoint, exampleCluster.DatabaseName).Apply(values =>
                    {
                        var endpoint = values.Item1;
                        var databaseName = values.Item2;
                        return $"jdbc:redshift://{endpoint}/{databaseName}";
                    }),
                    RoleArn = exampleRole.Arn,
                },
            },
        },
    });
});Content copied to clipboard
package main
import (
	"encoding/json"
	"fmt"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appflow"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.LookupPolicy(ctx, &iam.LookupPolicyArgs{
			Name: pulumi.StringRef("AmazonRedshiftAllCommandsFullAccess"),
		}, nil)
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Action": "sts:AssumeRole",
					"Effect": "Allow",
					"Sid":    "",
					"Principal": map[string]interface{}{
						"Service": "ec2.amazonaws.com",
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
			Name: pulumi.String("example_role"),
			ManagedPolicyArns: pulumi.StringArray{
				test.Arn,
			},
			AssumeRolePolicy: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		exampleBucketV2, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
			Bucket: pulumi.String("example_bucket"),
		})
		if err != nil {
			return err
		}
		exampleCluster, err := redshift.NewCluster(ctx, "example", &redshift.ClusterArgs{
			ClusterIdentifier: pulumi.String("example_cluster"),
			DatabaseName:      pulumi.String("example_db"),
			MasterUsername:    pulumi.String("exampleuser"),
			MasterPassword:    pulumi.String("examplePassword123!"),
			NodeType:          pulumi.String("dc1.large"),
			ClusterType:       pulumi.String("single-node"),
		})
		if err != nil {
			return err
		}
		_, err = appflow.NewConnectorProfile(ctx, "example", &appflow.ConnectorProfileArgs{
			Name:           pulumi.String("example_profile"),
			ConnectorType:  pulumi.String("Redshift"),
			ConnectionMode: pulumi.String("Public"),
			ConnectorProfileConfig: &appflow.ConnectorProfileConnectorProfileConfigArgs{
				ConnectorProfileCredentials: &appflow.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsArgs{
					Redshift: &appflow.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsRedshiftArgs{
						Password: exampleCluster.MasterPassword,
						Username: exampleCluster.MasterUsername,
					},
				},
				ConnectorProfileProperties: &appflow.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesArgs{
					Redshift: &appflow.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesRedshiftArgs{
						BucketName: exampleBucketV2.Name,
						DatabaseUrl: pulumi.All(exampleCluster.Endpoint, exampleCluster.DatabaseName).ApplyT(func(_args []interface{}) (string, error) {
							endpoint := _args[0].(string)
							databaseName := _args[1].(string)
							return fmt.Sprintf("jdbc:redshift://%v/%v", endpoint, databaseName), nil
						}).(pulumi.StringOutput),
						RoleArn: exampleRole.Arn,
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.redshift.Cluster;
import com.pulumi.aws.redshift.ClusterArgs;
import com.pulumi.aws.appflow.ConnectorProfile;
import com.pulumi.aws.appflow.ConnectorProfileArgs;
import com.pulumi.aws.appflow.inputs.ConnectorProfileConnectorProfileConfigArgs;
import com.pulumi.aws.appflow.inputs.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsArgs;
import com.pulumi.aws.appflow.inputs.ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsRedshiftArgs;
import com.pulumi.aws.appflow.inputs.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesArgs;
import com.pulumi.aws.appflow.inputs.ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesRedshiftArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 example = IamFunctions.getPolicy(GetPolicyArgs.builder()
            .name("AmazonRedshiftAllCommandsFullAccess")
            .build());
        var exampleRole = new Role("exampleRole", RoleArgs.builder()
            .name("example_role")
            .managedPolicyArns(test.arn())
            .assumeRolePolicy(serializeJson(
                jsonObject(
                    jsonProperty("Version", "2012-10-17"),
                    jsonProperty("Statement", jsonArray(jsonObject(
                        jsonProperty("Action", "sts:AssumeRole"),
                        jsonProperty("Effect", "Allow"),
                        jsonProperty("Sid", ""),
                        jsonProperty("Principal", jsonObject(
                            jsonProperty("Service", "ec2.amazonaws.com")
                        ))
                    )))
                )))
            .build());
        var exampleBucketV2 = new BucketV2("exampleBucketV2", BucketV2Args.builder()
            .bucket("example_bucket")
            .build());
        var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
            .clusterIdentifier("example_cluster")
            .databaseName("example_db")
            .masterUsername("exampleuser")
            .masterPassword("examplePassword123!")
            .nodeType("dc1.large")
            .clusterType("single-node")
            .build());
        var exampleConnectorProfile = new ConnectorProfile("exampleConnectorProfile", ConnectorProfileArgs.builder()
            .name("example_profile")
            .connectorType("Redshift")
            .connectionMode("Public")
            .connectorProfileConfig(ConnectorProfileConnectorProfileConfigArgs.builder()
                .connectorProfileCredentials(ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsArgs.builder()
                    .redshift(ConnectorProfileConnectorProfileConfigConnectorProfileCredentialsRedshiftArgs.builder()
                        .password(exampleCluster.masterPassword())
                        .username(exampleCluster.masterUsername())
                        .build())
                    .build())
                .connectorProfileProperties(ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesArgs.builder()
                    .redshift(ConnectorProfileConnectorProfileConfigConnectorProfilePropertiesRedshiftArgs.builder()
                        .bucketName(exampleBucketV2.name())
                        .databaseUrl(Output.tuple(exampleCluster.endpoint(), exampleCluster.databaseName()).applyValue(values -> {
                            var endpoint = values.t1;
                            var databaseName = values.t2;
                            return String.format("jdbc:redshift://%s/%s", endpoint,databaseName);
                        }))
                        .roleArn(exampleRole.arn())
                        .build())
                    .build())
                .build())
            .build());
    }
}Content copied to clipboard
resources:
  exampleRole:
    type: aws:iam:Role
    name: example
    properties:
      name: example_role
      managedPolicyArns:
        - ${test.arn}
      assumeRolePolicy:
        fn::toJSON:
          Version: 2012-10-17
          Statement:
            - Action: sts:AssumeRole
              Effect: Allow
              Sid:
              Principal:
                Service: ec2.amazonaws.com
  exampleBucketV2:
    type: aws:s3:BucketV2
    name: example
    properties:
      bucket: example_bucket
  exampleCluster:
    type: aws:redshift:Cluster
    name: example
    properties:
      clusterIdentifier: example_cluster
      databaseName: example_db
      masterUsername: exampleuser
      masterPassword: examplePassword123!
      nodeType: dc1.large
      clusterType: single-node
  exampleConnectorProfile:
    type: aws:appflow:ConnectorProfile
    name: example
    properties:
      name: example_profile
      connectorType: Redshift
      connectionMode: Public
      connectorProfileConfig:
        connectorProfileCredentials:
          redshift:
            password: ${exampleCluster.masterPassword}
            username: ${exampleCluster.masterUsername}
        connectorProfileProperties:
          redshift:
            bucketName: ${exampleBucketV2.name}
            databaseUrl: jdbc:redshift://${exampleCluster.endpoint}/${exampleCluster.databaseName}
            roleArn: ${exampleRole.arn}
variables:
  example:
    fn::invoke:
      Function: aws:iam:getPolicy
      Arguments:
        name: AmazonRedshiftAllCommandsFullAccessContent copied to clipboard
Import
Using pulumi import, import AppFlow Connector Profile using the connector profile arn. For example:
$ pulumi import aws:appflow/connectorProfile:ConnectorProfile profile arn:aws:appflow:us-west-2:123456789012:connectorprofile/example-profileContent copied to clipboard