connection
This component provisions Glue connections.
Usage
Stack Level: Regional
components:
terraform:
glue/connection/example/redshift:
metadata:
component: glue/connection
vars:
connection_name: "jdbc-redshift"
connection_description: "Glue Connection for Redshift"
connection_type: "JDBC"
db_type: "redshift"
connection_db_name: "analytics"
ssm_path_username: "/glue/redshift/admin_user"
ssm_path_password: "/glue/redshift/admin_password"
ssm_path_endpoint: "/glue/redshift/endpoint"
physical_connection_enabled: true
vpc_component_name: "vpc"
Variables
Required Variables
connection_type
(string
) requiredThe type of the connection. Supported are: JDBC, MONGODB, KAFKA, and NETWORK. Defaults to JDBC
region
(string
) requiredAWS Region
vpc_component_name
(string
) requiredVPC component name
Optional Variables
catalog_id
(string
) optionalThe ID of the Data Catalog in which to create the connection. If none is supplied, the AWS account ID is used by default
Default value:
null
connection_db_name
(string
) optionalDatabase name that the Glue connector will reference
Default value:
null
connection_description
(string
) optionalConnection description
Default value:
null
connection_name
(string
) optionalConnection name. If not provided, the name will be generated from the context
Default value:
null
connection_properties
(map(string)
) optionalA map of key-value pairs used as parameters for this connection
Default value:
null
db_type
(string
) optionalDatabase type for the connection URL:
postgres
orredshift
Default value:
"redshift"
match_criteria
(list(string)
) optionalA list of criteria that can be used in selecting this connection
Default value:
null
physical_connection_enabled
(bool
) optionalFlag to enable/disable physical connection
Default value:
false
security_group_allow_all_egress
(bool
) optionalA convenience that adds to the rules a rule that allows all egress.
If this is false and no egress rules are specified viarules
orrule-matrix
, then no egress will be allowed.Default value:
true
security_group_create_before_destroy
(bool
) optionalSet
true
to enable terraformcreate_before_destroy
behavior on the created security group.
We only recommend setting thisfalse
if you are importing an existing security group
that you do not want replaced and therefore need full control over its name.
Note that changing this value will always cause the security group to be replaced.Default value:
true
security_group_ingress_cidr_blocks
(list(string)
) optionalA list of CIDR blocks for the the cluster Security Group to allow ingress to the cluster security group
Default value:
[ ]
security_group_ingress_from_port
(number
) optionalStart port on which the Glue connection accepts incoming connections
Default value:
0
security_group_ingress_to_port
(number
) optionalEnd port on which the Glue connection accepts incoming connections
Default value:
0
ssm_path_endpoint
(string
) optionalDatabase endpoint SSM path
Default value:
null
ssm_path_password
(string
) optionalDatabase password SSM path
Default value:
null
ssm_path_username
(string
) optionalDatabase username SSM path
Default value:
null
target_security_group_rules
(list(any)
) optionalAdditional Security Group rules that allow Glue to communicate with the target database
Default value:
[ ]
Context Variables
The following variables are defined in the context.tf
file of this module and part of the terraform-null-label pattern.
context.tf
file of this module and part of the terraform-null-label pattern.Outputs
connection_arn
Glue connection ARN
connection_id
Glue connection ID
connection_name
Glue connection name
security_group_arn
The ARN of the Security Group associated with the Glue connection
security_group_id
The ID of the Security Group associated with the Glue connection
security_group_name
The name of the Security Group and associated with the Glue connection
Dependencies
Requirements
terraform
, version:>= 1.3.0
aws
, version:>= 4.0
utils
, version:>= 1.15.0
Providers
aws
, version:>= 4.0
Modules
Name | Version | Source | Description |
---|---|---|---|
glue_connection | 0.4.0 | cloudposse/glue/aws//modules/glue-connection | n/a |
iam_roles | latest | ../../account-map/modules/iam-roles | n/a |
security_group | 2.2.0 | cloudposse/security-group/aws | n/a |
target_security_group | 2.2.0 | cloudposse/security-group/aws | This allows adding the necessary Security Group rules for Glue to communicate with Redshift |
this | 0.25.0 | cloudposse/label/null | n/a |
vpc | 1.8.0 | cloudposse/stack-config/yaml//modules/remote-state | n/a |
Resources
The following resources are used by this module:
Data Sources
The following data sources are used by this module:
aws_ssm_parameter.endpoint
(data source)aws_ssm_parameter.password
(data source)aws_ssm_parameter.user
(data source)aws_subnet.selected
(data source)
References
- cloudposse/terraform-aws-components - Cloud Posse's upstream component