Connection

class Connection : KotlinCustomResource

Provides a Glue Connection resource.

Example Usage

Non-VPC Connection

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Connection("example", {
connectionProperties: {
JDBC_CONNECTION_URL: "jdbc:mysql://example.com/exampledatabase",
PASSWORD: "examplepassword",
USERNAME: "exampleusername",
},
name: "example",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Connection("example",
connection_properties={
"JDBC_CONNECTION_URL": "jdbc:mysql://example.com/exampledatabase",
"PASSWORD": "examplepassword",
"USERNAME": "exampleusername",
},
name="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Connection("example", new()
{
ConnectionProperties =
{
{ "JDBC_CONNECTION_URL", "jdbc:mysql://example.com/exampledatabase" },
{ "PASSWORD", "examplepassword" },
{ "USERNAME", "exampleusername" },
},
Name = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := glue.NewConnection(ctx, "example", &glue.ConnectionArgs{
ConnectionProperties: pulumi.StringMap{
"JDBC_CONNECTION_URL": pulumi.String("jdbc:mysql://example.com/exampledatabase"),
"PASSWORD": pulumi.String("examplepassword"),
"USERNAME": pulumi.String("exampleusername"),
},
Name: pulumi.String("example"),
})
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.glue.Connection;
import com.pulumi.aws.glue.ConnectionArgs;
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 Connection("example", ConnectionArgs.builder()
.connectionProperties(Map.ofEntries(
Map.entry("JDBC_CONNECTION_URL", "jdbc:mysql://example.com/exampledatabase"),
Map.entry("PASSWORD", "examplepassword"),
Map.entry("USERNAME", "exampleusername")
))
.name("example")
.build());
}
}
resources:
example:
type: aws:glue:Connection
properties:
connectionProperties:
JDBC_CONNECTION_URL: jdbc:mysql://example.com/exampledatabase
PASSWORD: examplepassword
USERNAME: exampleusername
name: example

VPC Connection

For more information, see the AWS Documentation.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.Connection("example", {
connectionProperties: {
JDBC_CONNECTION_URL: `jdbc:mysql://${exampleAwsRdsCluster.endpoint}/exampledatabase`,
PASSWORD: "examplepassword",
USERNAME: "exampleusername",
},
name: "example",
physicalConnectionRequirements: {
availabilityZone: exampleAwsSubnet.availabilityZone,
securityGroupIdLists: [exampleAwsSecurityGroup.id],
subnetId: exampleAwsSubnet.id,
},
});
import pulumi
import pulumi_aws as aws
example = aws.glue.Connection("example",
connection_properties={
"JDBC_CONNECTION_URL": f"jdbc:mysql://{example_aws_rds_cluster['endpoint']}/exampledatabase",
"PASSWORD": "examplepassword",
"USERNAME": "exampleusername",
},
name="example",
physical_connection_requirements=aws.glue.ConnectionPhysicalConnectionRequirementsArgs(
availability_zone=example_aws_subnet["availabilityZone"],
security_group_id_lists=[example_aws_security_group["id"]],
subnet_id=example_aws_subnet["id"],
))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.Connection("example", new()
{
ConnectionProperties =
{
{ "JDBC_CONNECTION_URL", $"jdbc:mysql://{exampleAwsRdsCluster.Endpoint}/exampledatabase" },
{ "PASSWORD", "examplepassword" },
{ "USERNAME", "exampleusername" },
},
Name = "example",
PhysicalConnectionRequirements = new Aws.Glue.Inputs.ConnectionPhysicalConnectionRequirementsArgs
{
AvailabilityZone = exampleAwsSubnet.AvailabilityZone,
SecurityGroupIdLists = new[]
{
exampleAwsSecurityGroup.Id,
},
SubnetId = exampleAwsSubnet.Id,
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := glue.NewConnection(ctx, "example", &glue.ConnectionArgs{
ConnectionProperties: pulumi.StringMap{
"JDBC_CONNECTION_URL": pulumi.String(fmt.Sprintf("jdbc:mysql://%v/exampledatabase", exampleAwsRdsCluster.Endpoint)),
"PASSWORD": pulumi.String("examplepassword"),
"USERNAME": pulumi.String("exampleusername"),
},
Name: pulumi.String("example"),
PhysicalConnectionRequirements: &glue.ConnectionPhysicalConnectionRequirementsArgs{
AvailabilityZone: pulumi.Any(exampleAwsSubnet.AvailabilityZone),
SecurityGroupIdLists: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
SubnetId: pulumi.Any(exampleAwsSubnet.Id),
},
})
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.glue.Connection;
import com.pulumi.aws.glue.ConnectionArgs;
import com.pulumi.aws.glue.inputs.ConnectionPhysicalConnectionRequirementsArgs;
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 Connection("example", ConnectionArgs.builder()
.connectionProperties(Map.ofEntries(
Map.entry("JDBC_CONNECTION_URL", String.format("jdbc:mysql://%s/exampledatabase", exampleAwsRdsCluster.endpoint())),
Map.entry("PASSWORD", "examplepassword"),
Map.entry("USERNAME", "exampleusername")
))
.name("example")
.physicalConnectionRequirements(ConnectionPhysicalConnectionRequirementsArgs.builder()
.availabilityZone(exampleAwsSubnet.availabilityZone())
.securityGroupIdLists(exampleAwsSecurityGroup.id())
.subnetId(exampleAwsSubnet.id())
.build())
.build());
}
}
resources:
example:
type: aws:glue:Connection
properties:
connectionProperties:
JDBC_CONNECTION_URL: jdbc:mysql://${exampleAwsRdsCluster.endpoint}/exampledatabase
PASSWORD: examplepassword
USERNAME: exampleusername
name: example
physicalConnectionRequirements:
availabilityZone: ${exampleAwsSubnet.availabilityZone}
securityGroupIdLists:
- ${exampleAwsSecurityGroup.id}
subnetId: ${exampleAwsSubnet.id}

Import

Using pulumi import, import Glue Connections using the CATALOG-ID (AWS account ID if not custom) and NAME. For example:

$ pulumi import aws:glue/connection:Connection MyConnection 123456789012:MyConnection

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the Glue Connection.

Link copied to clipboard
val catalogId: Output<String>

The ID of the Data Catalog in which to create the connection. If none is supplied, the AWS account ID is used by default.

Link copied to clipboard

A map of key-value pairs used as parameters for this connection.

Link copied to clipboard
val connectionType: Output<String>?

The type of the connection. Supported are: CUSTOM, JDBC, KAFKA, MARKETPLACE, MONGODB, and NETWORK. Defaults to JDBC.

Link copied to clipboard
val description: Output<String>?

Description of the connection.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val matchCriterias: Output<List<String>>?

A list of criteria that can be used in selecting this connection.

Link copied to clipboard
val name: Output<String>

The name of the connection.

Link copied to clipboard

A map of physical connection requirements, such as VPC and SecurityGroup. Defined below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>