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
resource "aws_glue_connection" "glue_connection_properties_password_not_used" {
connection_properties = {
JDBC_CONNECTION_URL = "jdbc:mysql://example.com/exampledatabase"
USERNAME = "exampleusername"
}
name = "example"
resource "aws_glue_connection" "example" {
connection_properties = {
JDBC_CONNECTION_URL = var.connection_url
PASSWORD = var.password
USERNAME = var.username
}
resource "aws_glue_connection" "glue_connection_vpc" {
count = var.create ? 1 : 0
name = var.name
connection_properties = {
resource "aws_glue_connection" "msk_connection" {
name = "msk_connection"
description = "Connection to MSK cluster"
connection_type = "KAFKA"
connection_properties = {
Parameters
-
arn
optional computed - string -
catalog_id
optional computed - string -
connection_properties
required - map from string to string -
connection_type
optional - string -
description
optional - string -
id
optional computed - string -
match_criteria
optional - list of string -
name
required - string -
physical_connection_requirements
list block-
availability_zone
optional - string -
security_group_id_list
optional - set of string -
subnet_id
optional - string
-
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
Type: 'AWS::Glue::Connection'
Properties:
CatalogId: !Ref 'AWS::AccountId'
ConnectionInput:
ConnectionType: JDBC
ConnectionProperties:
Type: 'AWS::Glue::Connection'
Properties:
CatalogId: !Ref 'AWS::AccountId'
ConnectionInput:
ConnectionType: JDBC
ConnectionProperties:
Type: 'AWS::Glue::Connection'
Properties:
CatalogId: !Ref 'AWS::AccountId'
ConnectionInput:
ConnectionType: JDBC
ConnectionProperties:
Type: 'AWS::Glue::Connection'
Properties:
CatalogId: !Ref AWS::AccountId
ConnectionInput:
ConnectionProperties:
Description: "Connection to the VPC that grants access to the elastic search cluster."
Type: AWS::Glue::Connection
Properties:
CatalogId: !Ref AWS::AccountId
ConnectionInput:
Description: "Connect to PostgressSQL database."
ConnectionType: "JDBC"
"Type": "AWS::Glue::Connection",
"Properties": {
"ConnectionInput": {
"Description": "Aurora MySQL Connection",
"ConnectionType": "JDBC",
"MatchCriteria": [
"Type": "AWS::Glue::Connection",
"Properties": {
"ConnectionInput": {
"Description": "Aurora MySQL Connection",
"ConnectionType": "JDBC",
"MatchCriteria": [
"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",
"path": "/PropertyTypes/AWS::Glue::Connection.ConnectionInput/Properties/ConnectionType/Value",
"value": {
"ValueType": "AWS::Glue::Connection.ConnectionInput.ConnectionType"
}
},
{
"path": "/PropertyTypes/AWS::Glue::Connection.ConnectionInput/Properties/ConnectionType/Value",
"value": {
"ValueType": "AWS::Glue::Connection.ConnectionInput.ConnectionType"
}
},
{
Parameters
-
ConnectionInput
required - ConnectionInput -
CatalogId
required - String
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.