A terraform module to deploy a Frontend Project on cloudfront (Amazon CDN)
- Terraform v0.8.5 or higher
- AWS Certificate Arn
project
- project namebrands
- list of brandenvironment
- environment name (i.e. dev,test,prod)region
- aws regiondefault_root_path
- project default root path (default "")alias_domain_suffix
- Alias Suffix Domain Namessl_cert_id
- The ssl Certificate id (if you want to use the certificate's arn, you do not have to set this variable)ssl_cert_arn
- The ssl Certificate arn (if you want to use the certificate's id, you do not have to set this variable)list_public_register_alias_domain
- A list of comma-separated list of aliasesdefault_ttl
- default ttl (default "3600")max_ttl
- max ttl (default "86400")min_ttl
- min ttl (default "0")cache_compress
- Compress resources (default true)
module "cloudfront-s3" {
source = "github.com/tierratelematics/terraform-aws-cloudfront-frontend"
project = "ninjagoat-frontend"
environment = "dev"
region = "eu-west-1"
alias_domain_suffix = "tierra.io"
ssl_cert_id = "idSSLCert"
list_public_register_alias_domain = ["prettygoat-fe.tierratelematics.com"]
brands = ["main"]
}
You can now use more than one alias using a comma separated list of domain names:
module "cloudfront-s3" {
source = "github.com/tierratelematics/terraform-aws-cloudfront-frontend"
project = "ninjagoat-frontend"
environment = "dev"
region = "eu-west-1"
alias_domain_suffix = "tierra.io"
ssl_cert_id = "idSSLCert"
list_public_register_alias_domain = ["prettygoat-fe.tierratelematics.com,example.com"]
brands = ["main"]
}
list_bucket_name
- aws bucket nameslist_cloudfront_url
- aws cloudfront urlscloufront_hosted_zone_id
- aws cloudfront hosted zone idlist_dns_internal_domain
- DNS internal domainslist_dns_public_domain
- DNS public domains
Copyright 2017 Tierra SpA
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.