Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: create glue crawler with delta_target without connection_name #27331

Closed
ConstantinoSchillebeeckx opened this issue Oct 19, 2022 · 6 comments · Fixed by #28156
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/glue Issues and PRs that pertain to the glue service.
Milestone

Comments

@ConstantinoSchillebeeckx
Copy link

ConstantinoSchillebeeckx commented Oct 19, 2022

Terraform Core Version

1.1.5

AWS Provider Version

4.24.0

Affected Resource(s)

aws_glue_crawler

Expected Behavior

I believe I should be able to create a Glue Crawler that uses a delta_target without specifying the connection_name; however it is required:

"connection_name": {
Type: schema.TypeString,
Required: true,
},

An AWS blog post describes this as being optional. Furthermore, I have manually setup a crawler in the console to use a delta target, the UI shows this connection as being optional:
image

The crawler I've setup, without a connection name, successfully crawls S3; introspecting that crawler with aws glue get-crawler --name "foo" --output json shows:

{
    "Crawler": {
        "Name": "foo",
        "Role": "foo",
        "Targets": {
            "S3Targets": [],
            "JdbcTargets": [],
            "MongoDBTargets": [],
            "DynamoDBTargets": [],
            "CatalogTargets": [],
            "DeltaTargets": [
                {
                    "DeltaTables": [
                        "s3://test-cs-glue-crawler/data/"
                    ],
                    "WriteManifest": true
                }
            ]
        },
        "DatabaseName": "foo",
        "Classifiers": [],
        "RecrawlPolicy": {
            "RecrawlBehavior": "CRAWL_EVERYTHING"
        },
        "SchemaChangePolicy": {
            "UpdateBehavior": "UPDATE_IN_DATABASE",
            "DeleteBehavior": "DEPRECATE_IN_DATABASE"
        },
        "LineageConfiguration": {
            "CrawlerLineageSettings": "DISABLE"
        },
        "State": "READY",
        "CrawlElapsedTime": 0,
        "CreationTime": 1665598443.0,
        "LastUpdated": 1665599113.0,
        "LastCrawl": {
            "Status": "SUCCEEDED",
            "LogGroup": "/aws-glue/crawlers",
            "LogStream": "foo",
            "MessagePrefix": "foo",
            "StartTime": 1665619047.0
        },
        "Version": 2,
        "LakeFormationConfiguration": {
            "UseLakeFormationCredentials": false,
            "AccountId": ""
        }
    }
}

Notice how DeltaTargets does not return any ConnectionName

Actual Behavior

Omitting connection_name produces terraform error:

╷
│ Error: Missing required argument
│ 
│   on crawler.tf line 60, in resource "aws_glue_crawler" "this":60:   delta_target {
│ 
│ The argument "connection_name" is required, but no definition was found.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

NA

Steps to Reproduce

apply resource

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

yes

@ConstantinoSchillebeeckx ConstantinoSchillebeeckx added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Oct 19, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/glue Issues and PRs that pertain to the glue service. label Oct 19, 2022
@ConstantinoSchillebeeckx ConstantinoSchillebeeckx changed the title [Bug]: [Bug]: create glue crawler with delta_target without connection_name Oct 19, 2022
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Oct 19, 2022
@olenm
Copy link

olenm commented Nov 7, 2022

a workaround for this is to create a new connection, type network, attach it to: vcp, subnet, and security group giving it full ingress+egress

@ConstantinoSchillebeeckx
Copy link
Author

FWIW you can provide a blank connection name

resource "aws_glue_crawler" "this" {
  database_name = "foo"
  name          = "bar"
  role          = module.crawler_role.iam_role_arn

  delta_target {
    connection_name = ""
    delta_tables    = ["buckets"]
    write_manifest  = true
  }
}

@olenm
Copy link

olenm commented Nov 7, 2022

@ConstantinoSchillebeeckx thanks, yes this worked for our setup as well. seems like easiest fix currently would be to update documentation then do code-magic later

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

This functionality has been released in v4.46.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
Copy link

github-actions bot commented Jan 8, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/glue Issues and PRs that pertain to the glue service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants