-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
54 lines (44 loc) · 884 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
terraform {
required_version = "1.3.9"
required_providers {
aws = {
source = "hashicorp/aws"
version = "4.57.1"
}
}
}
provider "aws" {
region = "us-east-1"
default_tags {
tags = {
env = var.env
owner = "SRE"
project = "static-site-fancy"
}
}
}
data "aws_caller_identity" "current" {}
variable "hosted_zone_id" {
type = string
description = "Target Route53 Hosted Zone"
}
variable "env" {
type = string
description = "Current Environment"
}
variable "subdomain" {
type = string
description = "Current Subdomain"
nullable = true
}
variable "artifact_version" {
type = string
description = "Current Artifact Version"
}
variable "bucket" {
type = string
description = "Source S3 Bucket"
}
output "url" {
value = format("https://%s", local.hostname)
}