Dec9th's Opslog

aws_transfer_user의 home_directory_mappings 삭제 간 이슈

Terraform will perform the following actions:

  # aws_transfer_user.sftp_user will be updated in-place
  ~ resource "aws_transfer_user" "sftp_user" {
      ~ home_directory_type = "LOGICAL" -> "PATH"
        id                  = "s-29b24066bfaa4300a/santa"
        tags                = {}
        # (5 unchanged attributes hidden)

      - home_directory_mappings {
          - entry  = "/" -> null
          - target = "/dec9th-sftp" -> null
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_transfer_user.sftp_user: Modifying... [id=s-29b24066bfaa4300a/santa]
╷
│ Error: error updating Transfer User (s-29b24066bfaa4300a/santa): InvalidParameter: 1 validation error(s) found.
│ - minimum field size of 1, UpdateUserInput.HomeDirectoryMappings.
│ 
│ 
│   with aws_transfer_user.sftp_user,
│   on user.tf line 58, in resource "aws_transfer_user" "sftp_user":
│   58: resource "aws_transfer_user" "sftp_user" {
│ 
╵

사전 지식

조건 사항

해결 방법

  home_directory_type ="PATH"
  home_directory      = "/dec9th-sftp"
  
  #home_directory_type ="LOGICAL"
  home_directory_mappings {
    entry  = "/"
    target = "/${aws_s3_bucket.s3_bucket.id}"
  }