Migrate from s3pypi 0.x to 1.x
masterIf you are upgrading from version 0.x (which used CloudFormation), you must import your existing resources into Terraform and rename index files to support the new CloudFront-to-S3-REST-API architecture.
- Import resources into Terraform:
$ terraform init
$ terraform import module.s3pypi.aws_s3_bucket.pypi example-bucket
$ terraform import module.s3pypi.aws_cloudfront_distribution.cdn EDFDVBD6EXAMPLE
$ terraform apply- Rename index objects:
Because the new configuration uses the S3 REST API instead of the S3 website endpoint, all
<package>/index.htmlobjects must be renamed to<package>/. Use the provided migration script:
$ scripts/migrate-s3-index.py example-bucketNote: If you prefer to keep using the old publicly accessible S3 website endpoint, use the --index.html flag and set --s3-put-args='ACL=public-read' during upload.