-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgithub.tf
73 lines (68 loc) · 2.57 KB
/
github.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
resource "github_repository" "gitops" {
name = "gitops"
description = "My awesome codebase"
auto_init = true
visibility = "private"
}
# resource "github_branch" "main" {
# repository = github_repository.gitops.name
# branch = "main"
# }
# Add a deploy key
resource "github_repository_deploy_key" "gitops_repository_deploy_key" {
depends_on = [github_repository.gitops]
title = "gitops"
repository = "gitops"
key = tls_private_key.gitops_repo.public_key_openssh
read_only = "false"
}
resource "github_repository_file" "cluster" {
repository = github_repository.gitops.name
branch = "main"
file = "cluster.yaml"
content = file("${path.module}/gitops/cluster.yaml")
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "terraform@example.com"
overwrite_on_create = true
}
resource "github_repository_file" "helm-operator" {
repository = github_repository.gitops.name
branch = "main"
file = "helm-operator.yaml"
content = file("${path.module}/gitops/helm-operator.yaml")
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "terraform@example.com"
overwrite_on_create = true
}
resource "github_repository_file" "helm-operator-crd" {
repository = github_repository.gitops.name
branch = "main"
file = "helm-operator-crd.yaml"
content = file("${path.module}/gitops/helm-operator-crd.yaml")
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "terraform@example.com"
overwrite_on_create = true
}
resource "github_repository_file" "crossplane" {
repository = github_repository.gitops.name
branch = "main"
file = "cronssplane.yaml"
content = file("${path.module}/gitops/crossplane.yaml")
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "terraform@example.com"
overwrite_on_create = true
}
resource "github_repository_file" "rdspostgresql" {
repository = github_repository.gitops.name
branch = "main"
file = "rdspostgresql.yaml"
content = file("${path.module}/gitops/rdspostgresql.yaml")
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "terraform@example.com"
overwrite_on_create = true
}