This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not change the order of these default values. it will force the build to destory and rebuid | |
variable "s3_bucket_names" { | |
type = list | |
default = ["bucket1.app", | |
"bucket2.app", | |
"bucket3.app" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure the AWS Provider | |
provider "aws" { | |
access_key = var.aws_access_key | |
secret_key = var.aws_secret_key | |
region = var.aws_region | |
} | |
/*-------------------------------------------------- | |
* S3 Buckets | |
* The resource block will create all the buckets in the variable array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s3_id: <%= ENV['AWS_ACCESS_KEY_ID'] %> | |
s3_secret: <%= ENV['AWS_SECRET_ACCESS_KEY'] %> | |
s3_bucket: mysite.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: cgswong/aws | |
pipelines: | |
branches: | |
master: | |
- step: | |
script: | |
- aws s3 --region "us-east-1" sync public/ s3://mysite.com --cache-control "public, max-age=14400" --delete |