Skip to content

Terraform module that deploys a private PyPI server.

Notifications You must be signed in to change notification settings

infrahouse/terraform-aws-pypiserver

Repository files navigation

terraform-aws-pypiserver

The module creates a private PyPI server

Note: The VPC must set enable_dns_hostnames and enable_dns_support to true.

Usage

module "pypiserver" {
  source  = "infrahouse/pypiserver/aws"
  version = "~> 1.0"
  providers = {
    aws     = aws
    aws.dns = aws
  }
  asg_subnets           = var.subnet_private_ids
  internet_gateway_id   = var.internet_gateway_id
  load_balancer_subnets = var.subnet_public_ids
  ssh_key_name          = aws_key_pair.test.key_name
  zone_id               = data.aws_route53_zone.test_zone.zone_id
}

Requirements

Name Version
terraform ~> 1.5
aws ~> 5.11
random ~> 3.6

Providers

Name Version
aws ~> 5.11
random ~> 3.6

Modules

Name Source Version
pypiserver registry.infrahouse.com/infrahouse/ecs/aws 5.0.0
pypiserver_secret registry.infrahouse.com/infrahouse/secret/aws 1.0.0

Resources

Name Type
aws_efs_file_system.packages resource
aws_efs_mount_target.packages resource
aws_security_group.efs resource
aws_vpc_security_group_egress_rule.efs resource
aws_vpc_security_group_ingress_rule.efs resource
aws_vpc_security_group_ingress_rule.efs_icmp resource
random_password.password resource
random_pet.username resource
aws_availability_zones.available data source
aws_caller_identity.current data source
aws_region.current data source
aws_route53_zone.zone data source
aws_subnet.selected data source
aws_vpc.selected data source

Inputs

Name Description Type Default Required
asg_instance_type EC2 instances type string "t3.micro" no
asg_subnets Auto Scaling Group Subnets. list(string) n/a yes
dns_names List of hostnames the module will create in var.zone_id. list(string)
[
"pypiserver"
]
no
environment Name of environment. string "development" no
internet_gateway_id Internet gateway id. Usually created by 'infrahouse/service-network/aws' string n/a yes
load_balancer_subnets Load Balancer Subnets. list(string) n/a yes
secret_readers List of role ARNs that will have read permissions of the PyPI secret. list(string) null no
service_name Service name. string "pypiserver" no
ssh_key_name ssh key name installed in ECS host instances. string n/a yes
zone_id Zone where DNS records will be created for the service and certificate validation. string n/a yes

Outputs

Name Description
pypi_password Password to access PyPI server.
pypi_server_urls List of PyPI server URLs.
pypi_user_secret AWS secret that stores PyPI username/password
pypi_user_secret_arn AWS secret ARN that stores PyPI username/password
pypi_username Username to access PyPI server.

About

Terraform module that deploys a private PyPI server.

Resources

Stars

Watchers

Forks

Packages

No packages published