-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
35 lines (31 loc) · 1.03 KB
/
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
terraform {
required_version = ">= 0.12"
backend "s3" {
key = "researchhub/terraform.tfstate"
}
}
# NOTE: aws provider v4 is the last to support Terraform v0.12-0.15, therefore we specify versions less than 5.0.0.
# as Jenkins currently is on v0.12.31 of Terraform.
provider "aws" {
version = ">= 3.41.0, < 5.0.0"
region = var.aws_region
profile = var.aws_profile
ignore_tags {
key_prefixes = ["AutoTag"]
}
}
locals {
common_tags = {
"Department" = var.department
"BusinessService" = var.business_service
"Application" = var.application
"ProjectCode" = var.project_code
"CostCentre" = var.cost_centre
"WikiLink" = var.wiki_link
"Faculty" = var.faculty
}
all_urls = compact(concat([var.dns_entry, var.dns_entry_secondary, var.lb_dns_name], var.secondary_addresses, var.secondary_addresses_secondary))
scheme_urls = [for url in local.all_urls : join("", ["https://", url])]
}
data "aws_caller_identity" "current" {}
data "aws_iam_account_alias" "current" {}