-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Vijay Jadhav <[email protected]>
- Loading branch information
1 parent
60a581f
commit 643b9fd
Showing
6 changed files
with
21 additions
and
75 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,9 @@ | ||
terraform { | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
} | ||
} | ||
|
||
backend "s3" { | ||
bucket = "" | ||
key = "states/terraform.tfstate" | ||
region = "eu-west-2" | ||
encrypt = true | ||
dynamodb_table = "" | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "eu-west-2" | ||
} | ||
|
||
#locals { | ||
# web_url = var.environment == "production" ? var.domain_name : "${var.environment}.${var.domain_name}" | ||
# bucket_name = var.environment == "production" ? var.bucket_name : "${var.environment}.${var.bucket_name}" | ||
#} | ||
|
||
locals { | ||
common_tags = { | ||
COST_CENTRE = var.COST_CENTRE | ||
PRODUCT = var.product | ||
COMPONENT = var.component | ||
COST_CENTRE = var.tags.COST_CENTRE | ||
PRODUCT = var.tags.product | ||
COMPONENT = var.tags.component | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,11 @@ | ||
#Global | ||
variable "product" { | ||
description = "The name of the product" | ||
type = string | ||
variable "tags" { | ||
type = any | ||
} | ||
|
||
variable "component" { | ||
description = "The name of the component" | ||
type = string | ||
variable "cloud_front_vars" { | ||
type = any | ||
} | ||
|
||
variable "COST_CENTRE" { | ||
description = "The cost code of the project" | ||
type = string | ||
} | ||
|
||
|
||
#Cloudfront | ||
|
||
variable "cloudfront_aliases" { | ||
description = "CloudFront aliases to apply using custom DNS record" | ||
type = list(string) | ||
default = [] | ||
} | ||
|
||
variable "cloudfront_price_class" { | ||
description = "Price class for the CloudFront distribution" | ||
type = string | ||
default = "PriceClass_100" | ||
} | ||
|
||
|
||
#IAM | ||
|
||
variable "repository" { | ||
description = "The repository containing the files for the static site" | ||
type = string | ||
validation { | ||
condition = startswith(var.repository, "UKHomeOffice/") | ||
error_message = "Should be in the UKHomeOffice organisation" | ||
} | ||
} | ||
variable "aws_region" { | ||
type = string | ||
} |