hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.73k stars 9.09k forks source link

[Enhancement]: Add AZURESQL to Glue Connection Type #37233

Closed fshskadz closed 1 month ago

fshskadz commented 4 months ago

Terraform Core Version

1.5.6

AWS Provider Version

5.47.0

Affected Resource(s)

Expected Behavior

Accepts all allowed connection types

Actual Behavior

Does not allow AZURESQL connection type

Relevant Error/Panic Output Snippet

│ Error: expected connection_type to be one of ["JDBC" "SFTP" "MONGODB" "KAFKA" "NETWORK" "MARKETPLACE" "CUSTOM"], got AZURESQL

Terraform Configuration Files


resource "aws_glue_connection" "Reporting" {
  connection_properties = {
    JDBC_CONNECTION_URL = "jdbc:sqlserver://server1.database.windows.net;databaseName=mydb;Persist Security Info=True;"
    SECRET_ID           = data.aws_secretsmanager_secret.dev.name
  }

  connection_type = "AZURESQL"
  name            = "Reporting"

  physical_connection_requirements {
    security_group_id_list = [var.security_group_id]
    subnet_id              = var.subnet_id
    availability_zone      = var.availability_zone
  }

Steps to Reproduce

Use AZURESQL as the connection_type

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

acwwat commented 4 months ago

This is a bit of a strange issue. The AWS API and downstream client docs all indicate that only several connection types are supported when I can see 21 in the AWS Management Console. When I create an Azure SQL connection in the console, CloudTrail shows that it is passing AZURESQL as the value for ConnectionType. This seems like a huge miss that AWS shouldn't have, but you never know. I opened an AWS support case to inquire about it - if I receive any updates I'll add another comment.

acwwat commented 3 months ago

Here's an update after going back and forth with AWS support for two weeks.

Basically they confirmed that the list of supported values for ConnectionType is not complete, and the following values are missing from the documentation and the enum:

AZURESQL, SNOWFLAKE, OPENSEARCH, AZURECOSMOS, BIGQUERY

AWS is still working on updating the documentation, however I am less confident about them triggering the downstream updates to the SDKs. The support person seems to be evasive with my questions on getting someone to fix the SDKs as well.

Since the resource code is validating against the enum, we can either wait or manually append these values to a slice to at least add the support. That should be easy enough, however acceptance tests will be difficult as it involves third-party solutions. @justinretzolk, wonder if you could weigh in and see what the best approach is with dealing with this issue.

Meanwhile I'll continue to push to get an answer on downstream SDK updates with the proper values.

fshskadz commented 3 months ago

@acwwat - Thank you so much for putting so much effort in!

acwwat commented 3 months ago

Additional back-and-forth with AWS support has not been productive and I was basically told to talk to my account manager because AWS support does not have access to product roadmaps. They won't even acknowledge that they've communicated the need to update the downstream SDKs, so I will take that as a no...

Instead of punishing end-users for this bug, I've decided to just work around the problem by adding the supported values and cross checking with the API requests from creating the connections in the Console. Will be submitting a PR shortly.

fshskadz commented 2 months ago

Hey @acwwat - did this ever happen? Just got asked to deploy our code to prod and having this done would make my life about 480 times easier, so we don't have to do all this part by hand. Thanks again for all. your work on this!

acwwat commented 2 months ago

Hey @acwwat - did this ever happen? Just got asked to deploy our code to prod and having this done would make my life about 480 times easier, so we don't have to do all this part by hand. Thanks again for all. your work on this!

Hi @fshskadz The PR was completed earlier and is currently waiting to be prioritized and merged. I unfortunately don't have a say as to when it will be incorporated - need a maintainer to chime in.

github-actions[bot] commented 1 month ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] commented 1 month ago

This functionality has been released in v5.60.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 2 weeks ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.