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]: Unable to save IgnoreHeaderRows setting in aws_dms_endpoint #26957

Closed
jam2-hey opened this issue Sep 23, 2022 · 3 comments · Fixed by #28579
Closed

[Bug]: Unable to save IgnoreHeaderRows setting in aws_dms_endpoint #26957

jam2-hey opened this issue Sep 23, 2022 · 3 comments · Fixed by #28579
Assignees
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/dms Issues and PRs that pertain to the dms service.

Comments

@jam2-hey
Copy link

jam2-hey commented Sep 23, 2022

Terraform Core Version

1.2.0

AWS Provider Version

4.31.0

Affected Resource(s)

  • aws_dms_endpoint

Expected Behavior

Be able to apply IgnoreHeaderRows setting in a s3 DMS endpoint.

Actual Behavior

IgnoreHeaderRows setting did not saved.

Relevant Error/Panic Output Snippet

# aws_dms_endpoint.source_s3_demo_data_source will be updated in-place
  ~ resource "aws_dms_endpoint" "source_s3_demo_data_source" {
        id                          = "source-s3-demo-data-source"
        tags                        = {}
        # (7 unchanged attributes hidden)

      ~ s3_settings {
          ~ ignore_headers_row               = 0 -> 1
            # (30 unchanged attributes hidden)
        }
    }

Terraform Configuration Files

resource "aws_dms_endpoint" "source_s3_demo_data_source" {
  endpoint_id   = "source-s3-demo-data-source"
  endpoint_type = "source"
  engine_name   = "s3"

  s3_settings {
    bucket_name               = "demo-bucket"
    bucket_folder             = ""
    ignore_headers_row        = 1
    compression_type          = "NONE"
    data_format               = "csv"
    csv_delimiter             = ","
    external_table_definition = jsonencode({
      "TableCount" = 0,
      "Tables" = []
    })
    service_access_role_arn   = aws_iam_role.dms_s3_demo_data_source.arn
  }
}

resource "aws_iam_role" "dms_s3_demo_data_source" {
  assume_role_policy = data.aws_iam_policy_document.dms_assume_role.json
  name               = "dms-s3-demo-data-source"
}

data "aws_iam_policy_document" "dms_assume_role" {
  statement {
    actions = ["sts:AssumeRole"]

    principals {
      identifiers = ["dms.amazonaws.com"]
      type        = "Service"
    }
  }
}

Steps to Reproduce

  1. Apply the resource
  2. Apply the resource, again.
  3. Output will always showing ignore_headers_row will be updated. Viewing that endpoint on AWS Console also says that IgnoreHeaderRows is not present.

Debug Output

No response

Panic Output

No response

Important Factoids

I'm pretty sure there's a typo in s3_settings's schema:

"ignore_headers_row": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
ValidateFunc: validation.IntInSlice([]int{0, 1}),
},

It is supposed to be ignore_header_rows, NOT ignore_headers_row. Code below that all use ignore_header_rows correctly.

"IgnoreHeaderRows" is the correct name for this setting, according to AWS documataions.

References

No response

Would you like to implement a fix?

No response

@jam2-hey jam2-hey added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Sep 23, 2022
@github-actions github-actions bot added service/dms Issues and PRs that pertain to the dms service. service/iam Issues and PRs that pertain to the iam service. labels Sep 23, 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.

@jam2-hey jam2-hey changed the title [Bug]: aws_dms_endpoint -> s3_settings typo in schema [Bug]: Unable to save IgnoreHeaderRows setting in aws_dms_endpoint Sep 26, 2022
@justinretzolk
Copy link
Member

Hey @polyamide 👋 Thank you for taking the time to raise this, and for pointing out that typo; I believe that is indeed the issue here. For whoever picks this up:

@justinretzolk justinretzolk added good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. and removed needs-triage Waiting for first response or review from a maintainer. service/iam Issues and PRs that pertain to the iam service. labels Oct 27, 2022
@YakDriver YakDriver self-assigned this Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Feb 5, 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 Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/dms Issues and PRs that pertain to the dms service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants