Unable to update security group on aws transfer server

1.4k Views Asked by At

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?

2

There are 2 best solutions below

0
On

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's ModifyVPCEndpoint API to update Security Group once the server has been created.

Refer to the documentation here: EndpointDetails - AWS Transfer Family (Under SecurityGroupIds)

0
On

(Console) In order to modify the Security Group of an AWS Transfer server once created do the following:

  • Go to the VPC service
  • Go to "Endpoints"
  • Click on the Endpoint that has "transfer" on the Server Name field
  • Click on the "Security Groups" Tab
  • Click on "Edit Security Groups"