Skip to content

This is a Terraform module to create users for the AWS SFTP service based on custom identity provider using AWS Secrets Manager.

License

Notifications You must be signed in to change notification settings

StratusGrid/terraform-aws-transfer-server-custom-idp-user

Repository files navigation

Contact Us | Stratusphere FinOps | StratusGrid Home | Blog

terraform-aws-transfer-server-custom-idp-user

GitHub: StratusGrid/terraform-aws-transfer-server-custom-idp-user

This is a Terraform module to create users for the AWS SFTP service based on custom identity provider using AWS Secrets Manager. To create the server and the identity provider, use this module.

Example Usage:

Create one user to login in the AWS Transfer server.

# Creation of the AWS Transfer server and the custom IDP provider
module "transfer-server-custom-idp" {
  name_prefix = var.name_prefix
  source  = "StratusGrid/transfer-server-custom-idp/aws"
  version = "1.1.0"

  region = var.region
}

# Creation of one user named firstuser. Don't forget to change its password from the default value in AWS Secret Manager
module "transfer-server-custom-idp-user" {
  name_prefix = var.name_prefix
  source  = "StratusGrid/transfer-server-custom-idp-user/aws"
  version = "1.1.0"

  s3_bucket_name = "bucket-to-store-files-via-sftp"
  transfer_server_id = module.transfer-server-custom-idp.transfer_server_id
  user_name = "firstuser"
  read_only = false
}

Resources

Name Type
aws_iam_role.sftp_transfer_server_user resource
aws_iam_role_policy.sftp_lambda_role_policy resource
aws_iam_role_policy.sftp_transfer_server_user resource
aws_kms_key.secrets_encryption resource
aws_secretsmanager_secret.secret resource
aws_secretsmanager_secret_version.secret resource

Inputs

Name Description Type Default Required
input_tags Map of tags to apply to resources map(string) {} no
name_prefix String to use as prefix on object names string n/a yes
name_suffix String to append to object names. This is optional, so start with dash if using string "" no
read_only Define if the user is created with read-only privileges bool false no
s3_bucket_name Transfer Server S3 bucket name string n/a yes
secret_access_lambda_role Name of the role used by the secret-accessing Lambda. Used to add additional permissions as needed. May cause KMS errors if omitted. string "" no
secrets_prefix Prefix used to create AWS Secrets string "SFTP" no
ssh_key SSH Key for transfer server user string "" no
user_home HOME path for transfer server user. Mustn't start or end with / string "" no
user_name User name for SFTP server string n/a yes

Outputs

No outputs.


Note: Manual changes to the README will be overwritten when the documentation is updated. To update the documentation, run terraform-docs -c .config/.terraform-docs.yml .

About

This is a Terraform module to create users for the AWS SFTP service based on custom identity provider using AWS Secrets Manager.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages