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]: server_certificate does not populate when using the aws_datasync_location_object_storage resource #32147

Open
drubah opened this issue Jun 21, 2023 · 3 comments
Labels
bug Addresses a defect in current functionality. service/datasync Issues and PRs that pertain to the datasync service.

Comments

@drubah
Copy link

drubah commented Jun 21, 2023

Terraform Core Version

1.5.1

AWS Provider Version

5.4.0

Affected Resource(s)

  • aws_datasync_location_object_storage

Expected Behavior

  • A DataSync location for a Snowball Edge S3 bucket should be created with the supplied certificate.
  • AWS console should reflect "Using provided certificate" under Server certificate verification.

Actual Behavior

  • A DataSync location for Snowball Edge S3 bucket is created but without the supplied certificate.
  • AWS console shows "Amazon Linux 2 CA Trust Profile" under Server certificate verification.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_datasync_location_object_storage" "local_storage" {
  server_protocol     = "HTTPS"
  server_certificate  = file(var.local_storage_certificate)
  agent_arns          = [aws_datasync_agent.datasync_agent.arn]
  server_hostname     = var.local_storage_hostname
  bucket_name         = var.local_storage_bucket
  access_key          = var.local_storage_ak
  secret_key          = var.local_storage_sk
}

Steps to Reproduce

  • Run terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

The file referenced with server_certificate is a PEM-encoded certificate for the Snowball device. When the location is created using the AWS console the same file is properly loaded and access to the Location is successful.

I have also tried referencing server_certificate as filebase64().

After a `terraform apply' the server_certificate for the resource in terraform.tfstate still shows as empty, i.e.:

            "server_certificate": "",

Successive 'terraform applies' try to change the server_certificate resource (and says that the resource has been updated) yet it never is reflected within the console.

References

No response

Would you like to implement a fix?

None

@drubah drubah added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jun 21, 2023
@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/datasync Issues and PRs that pertain to the datasync service. label Jun 21, 2023
@drubah drubah changed the title [Bug]: [Bug]: server_certificate does not populate when using the aws_datasync_location_object_storage resource Jun 21, 2023
@justinretzolk
Copy link
Member

justinretzolk commented Jun 21, 2023

Hey @drubah 👋 Thank you for taking the time to raise this! Can you give me an idea of what the value for var.local_storage_certificate is? Debug logs (redacted as needed) may also help, if you're able to provide them.

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 21, 2023
@drubah
Copy link
Author

drubah commented Jun 22, 2023

Hi @justinretzolk, the value of local_storage_certificate is the full path to the PEM-encoded file, e.g., /Users/me/Desktop/cert.pem.

I've also attached redacted debug logs. This line stuck out:

2023-06-22T08:43:22.443-0500 [WARN]  Provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value for aws_datasync_location_object_storage.local_storage, but we are tolerating it because it is using the legacy plugin SDK.

debug.txt

Please let me know if there's anything else I can provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/datasync Issues and PRs that pertain to the datasync service.
Projects
None yet
Development

No branches or pull requests

2 participants