Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.
This repository was archived by the owner on May 23, 2024. It is now read-only.

Cloudformation output produced for AWS::Glue::Connection is incorrect #37

Open
@alytle

Description

@alytle

Describe the bug
When recording a Glue Connection, the resulting Cloudformation text is malformed.

Related Mapping
glue.createConnection

Related Language
Cloudformation

To Reproduce

  1. Create a Glue Connection from

Expected behavior
This is what I get currently:

AWSTemplateFormatVersion: "2010-09-09"
Metadata:
    Generator: "console-recorder"
Description: ""
Resources:
    glue2a9e07f:
        Type: "AWS::Glue::Connection"
        Properties:
            ConnectionInput: 
              - 
                action: "com.amazonaws.console.glue.awssdk.shared.context.AWSGlueContext.createConnection"
                parameters: 
                  - 
                    connectionInput: 
                        physicalConnectionRequirements: 
                            availabilityZone: "us-east-1d"
                            subnetId: "<redacted>"
                            securityGroupIdList: 
                              - "<redacted>"
                        connectionType: "JDBC"
                        description: ""
                        name: "my-connection-name"
                        connectionProperties: 
                            USERNAME: "<redacted>"
                            PASSWORD: "<redacted>"
                            JDBC_CONNECTION_URL: "jdbc:<redacted>"
                            JDBC_ENFORCE_SSL: "true"

It should be something like:

AWSTemplateFormatVersion: "2010-09-09"
Description: ""

Resources:
  GlueAuroraCrawler:
    Type: "AWS::Glue::Connection"
    Properties:
      ConnectionInput:
        PhysicalConnectionRequirements:
          AvailabilityZone: "us-east-1d"
          SubnetId: "<redacted>"
          SecurityGroupIdList:
            - "<redacted>"
        ConnectionType: "JDBC"
        Description: ""
        Name: "my-connection-name"
        ConnectionProperties:
          USERNAME: "<redacted>"
          PASSWORD: "<redacted>"
          JDBC_CONNECTION_URL: "jdbc:<redacted>"
          JDBC_ENFORCE_SSL: "true"
      CatalogId: !Ref AWS::AccountId

Screenshots
n/a

Additional context
Having a look at the Boto3 code, it looks like this might not be a Cloudformation output problem, but rather how you're parsing the Glue API call results.

If you're accepting PRs, I can take a stab at fixing this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions