AWS Glue Connection

This page shows how to write Terraform and CloudFormation for AWS Glue Connection and write them securely.

aws_glue_connection (Terraform)

The Connection in AWS Glue can be configured in Terraform with the resource name aws_glue_connection. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

connection_properties.tf#L9
resource "aws_glue_connection" "glue_connection_properties_password_not_used" {
  connection_properties = {
    JDBC_CONNECTION_URL = "jdbc:mysql://example.com/exampledatabase"
    USERNAME            = "exampleusername"
  }
  name = "example"
main.tf#L1
resource "aws_glue_connection" "example" {
  connection_properties = {
    JDBC_CONNECTION_URL = var.connection_url
    PASSWORD            = var.password
    USERNAME            = var.username
  }
main.tf#L1
resource "aws_glue_connection" "glue_connection_vpc" {
  count = var.create ? 1 : 0

  name = var.name

  connection_properties = {
glue.tf#L1
resource "aws_glue_connection" "msk_connection" {
  name            = "msk_connection"
  description     = "Connection to MSK cluster"
  connection_type = "KAFKA"

  connection_properties = {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a Glue Connection resource.

AWS::Glue::Connection (CloudFormation)

The Connection in Glue can be configured in CloudFormation with the resource name AWS::Glue::Connection. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

GlueStack.yml#L57
    Type: 'AWS::Glue::Connection'
    Properties:
      CatalogId: !Ref 'AWS::AccountId'
      ConnectionInput:
        ConnectionType: JDBC
        ConnectionProperties:
GlueStack.yml#L57
    Type: 'AWS::Glue::Connection'
    Properties:
      CatalogId: !Ref 'AWS::AccountId'
      ConnectionInput:
        ConnectionType: JDBC
        ConnectionProperties:
GlueStack.yml#L57
    Type: 'AWS::Glue::Connection'
    Properties:
      CatalogId: !Ref 'AWS::AccountId'
      ConnectionInput:
        ConnectionType: JDBC
        ConnectionProperties:
cloudformation.yml#L49
    Type: 'AWS::Glue::Connection'
    Properties:
      CatalogId: !Ref AWS::AccountId
      ConnectionInput:
        ConnectionProperties:
          Description: "Connection to the VPC that grants access to the elastic search cluster."
templatewithjob.yml#L48
    Type: AWS::Glue::Connection
    Properties:
      CatalogId: !Ref AWS::AccountId
      ConnectionInput:
        Description: "Connect to PostgressSQL database."
        ConnectionType: "JDBC"
glue-stack.json#L59
      "Type": "AWS::Glue::Connection",
      "Properties": {
        "ConnectionInput": {
          "Description": "Aurora MySQL Connection",
          "ConnectionType": "JDBC",
          "MatchCriteria": [
glue-stack.json#L54
            "Type": "AWS::Glue::Connection",
            "Properties": {
                "ConnectionInput": {
                    "Description": "Aurora MySQL Connection",
                    "ConnectionType": "JDBC",
                    "MatchCriteria": [
GlueConnectionSpecification.json#L3
    "AWS::Glue::Connection.PhysicalConnectionRequirements": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-physicalconnectionrequirements.html",
      "Properties": {
        "AvailabilityZone": {
          "Required": false,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-physicalconnectionrequirements.html#cfn-glue-connection-physicalconnectionrequirements-availabilityzone",
aws_glue.json#L26
    "path": "/PropertyTypes/AWS::Glue::Connection.ConnectionInput/Properties/ConnectionType/Value",
    "value": {
      "ValueType": "AWS::Glue::Connection.ConnectionInput.ConnectionType"
    }
  },
  {
aws_glue.json#L26
    "path": "/PropertyTypes/AWS::Glue::Connection.ConnectionInput/Properties/ConnectionType/Value",
    "value": {
      "ValueType": "AWS::Glue::Connection.ConnectionInput.ConnectionType"
    }
  },
  {

Parameters

Explanation in CloudFormation Registry

The AWS::Glue::Connection resource specifies an AWS Glue connection to a data source. For more information, see Adding a Connection to Your Data Store and Connection Structure in the AWS Glue Developer Guide.

Frequently asked questions

What is AWS Glue Connection?

AWS Glue Connection is a resource for Glue of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Glue Connection?

For Terraform, the ffsclyh/config-lint, jaykakadiya93/Terraform and ArpanBalpande/tf_aws_s3_glue_redshift source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the awsdevops009/ETLGlue, cloudleader/AWS-Analytics and cloudleader/ETLAnalyticsUsingGlue source code examples are useful. See the CloudFormation Example section for further details.