-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathrepos.tf
More file actions
64 lines (54 loc) · 1.65 KB
/
repos.tf
File metadata and controls
64 lines (54 loc) · 1.65 KB
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
55
56
57
58
59
60
61
62
63
64
terraform {
backend "s3" {
bucket = "<KUBEFIRST_STATE_STORE_BUCKET>"
key = "terraform/github/terraform.tfstate"
endpoint = "https://<CLUSTER_NAME>.us-east-1.linodeobjects.com" #! edit
region = "us-east-1" #! edit
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
force_path_style = true
}
required_providers {
github = {
source = "integrations/github"
version = "~> 5.17.0"
}
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
}
module "gitops" {
source = "./modules/repository"
repo_name = "<GIT_REPO_NAME> "
archive_on_destroy = false
auto_init = false # set to false if importing an existing repository
team_developers_id = github_team.developers.id
team_admins_id = github_team.admins.id
}
resource "github_repository_webhook" "gitops_atlantis_webhook" {
repository = module.gitops.repo_name
configuration {
url = "<GITOPS_REPO_ATLANTIS_WEBHOOK_URL>"
content_type = "json"
insecure_ssl = false
secret = var.atlantis_repo_webhook_secret
}
active = true
events = ["pull_request_review", "push", "issue_comment", "pull_request"]
}
variable "atlantis_repo_webhook_secret" {
type = string
default = ""
}
module "metaphor" {
source = "./modules/repository"
repo_name = "<METAPHOR_REPO_NAME>"
archive_on_destroy = false
auto_init = false # set to false if importing an existing repository
create_ecr = true
team_developers_id = github_team.developers.id
team_admins_id = github_team.admins.id
}