I'm looking for whitelisting Ip addresses to secure an internet facing transfer server via terraform but unfortunately terraform AWS provider still doesn't support adding new security group to vpc endpoint via terraform aws transfer resource.
I tried to update server using aws cli command but getting an error "An error occurred (InvalidRequestException) when calling the UpdateServer operation: Changing Security Group is not supported"
Any suggestion?
Assuming they are using EndpointType=VPC, the
UpdateServer
command does not support updating SecurityGroups.Attaching a Security Group can either be done at server creation time using
CreateServer
or use EC2'sModifyVPCEndpoint
API to update Security Group once the server has been created.Refer to the documentation here: EndpointDetails - AWS Transfer Family (Under SecurityGroupIds)