Skip to content
This repository has been 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 opened this issue Mar 26, 2019 · 1 comment
Open

Comments

@alytle
Copy link

alytle commented Mar 26, 2019

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.

@iann0036
Copy link
Owner

PRs happily accepted if you have the time, otherwise I'll fix this up in a few days.

Thanks for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants