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

aws_datasync_location_smb subdirectory forces replacement #18493

Closed
shirish-qub opened this issue Mar 31, 2021 · 2 comments · Fixed by #19753
Closed

aws_datasync_location_smb subdirectory forces replacement #18493

shirish-qub opened this issue Mar 31, 2021 · 2 comments · Fixed by #19753
Labels
bug Addresses a defect in current functionality. service/datasync Issues and PRs that pertain to the datasync service.
Milestone

Comments

@shirish-qub
Copy link

shirish-qub commented Mar 31, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

  • aws_datasync_location_smb

Terraform Configuration Files

resource "aws_datasync_location_smb" "smb" {
  for_each = var.smb_subdirectory_map
    
  server_hostname = lookup(var.smb_server_hostname_map,each.key)
  subdirectory    = lookup(var.smb_subdirectory_map,each.key)

  user     = lookup(var.smb_user_map,each.key)
  password = lookup(var.smb_password_map,each.key)

  mount_options {
      version = "AUTOMATIC"
  }
  tags = {}

  agent_arns = local.agent_arn_list
}

Debug Output

Expected Behavior

Actual Behavior

  # module.smb_locations.aws_datasync_location_smb.smb["smb_sync"] must be replaced
-/+ resource "aws_datasync_location_smb" "smb" {
        agent_arns      = [
            "arn:aws:datasync:region:acc:agent/agent-04f7gg6tg6df446e74",
        ]
      ~ arn             = "arn:aws:datasync:region:acc:location/loc-022675ge70cfyyh8f2" -> (known after apply)
      + domain          = (known after apply)
      ~ id              = "arn:aws:datasync:region:acc:location/loc-022675ge70cfyyh8f2" -> (known after apply)
        password        = (sensitive value)
        server_hostname = "servername"
      ~ subdirectory    = "/dir/Applications/Tools/" -> "/dir/Applications/Tools/" # forces replacement
      - tags            = {} -> null
      ~ uri             = "smb://servername/dir$/Applications/Tools/" -> (known after apply)
        user            = "lin_user"

        mount_options {
            version = "AUTOMATIC"
        }
    }

It appears that the "subdirectory" is being replaced (with identical value) which causes the redo of the location and inturn redo of the task as well.

Steps to Reproduce

  1. terraform apply
  2. terraform plan
@ghost ghost added the service/datasync Issues and PRs that pertain to the datasync service. label Mar 31, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 31, 2021
@anGie44 anGie44 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 1, 2021
@github-actions github-actions bot added this to the v3.45.0 milestone Jun 10, 2021
@github-actions
Copy link

This functionality has been released in v3.45.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

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 Jul 12, 2021
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. service/datasync Issues and PRs that pertain to the datasync service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants