Skip to content

Instantly share code, notes, and snippets.

@rajkshah14
rajkshah14 / main.tf
Created November 30, 2020 21:00 — forked from sarkis/main.tf
Terraform S3 website redirect (http and https) using S3, CloudFront, ACM (Example redirects (http/https)://www.example.com -> https://example.com)
data "aws_route53_zone" "example_com" {
name = "example.com."
private_zone = false
}
resource "aws_acm_certificate" "example_com" {
domain_name = "example.com"
subject_alternative_names = ["www.example.com"]
validation_method = "DNS"