Skip to content

Commit f700536

Browse files
committed
init
0 parents  commit f700536

8 files changed

+491
-0
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
planfile
2+
.terraform

Diff for: Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
SHELL := /bin/bash
3+
4+
.PHONY: plan apply
5+
6+
plan:
7+
@terraform plan -out planfile
8+
9+
apply: planfile
10+
@terraform apply
11+
rm planfile

Diff for: dev.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
export TF_VAR_github_token="$(pass lal-terraform-token)"

Diff for: init.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
#terraform init
3+
terraform import github_repository.dockerfiles dockerfiles
4+
terraform import github_repository.lal lal
5+
terraform import github_repository.lal-build_xyz lal-build.xyz
6+
terraform import github_branch_protection.dockerfiles_master dockerfiles:master
7+
terraform import github_branch_protection.lal_master lal:master
8+
#terraform import github_branch_protection.lal-build_xyz_master lal-build.xyz:master
9+
terraform import github_membership.membership_bencord0 lalbuild:bencord0
10+
#terraform import github_repository_webhook.lal-build_xyz-heroku lal-build.xyz/17491857

Diff for: main.tf

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
provider "github" {
2+
token = "${var.github_token}"
3+
organization = "lalbuild"
4+
}
5+
6+
# repositories
7+
8+
resource "github_repository" "dockerfiles" {
9+
name = "dockerfiles"
10+
has_issues = true
11+
description = "Demo environments for lal"
12+
}
13+
14+
resource "github_repository" "lal" {
15+
name = "lal"
16+
has_issues = true
17+
has_downloads = true
18+
has_wiki = true
19+
description = "A strict, language-agnostic build system and dependency manager"
20+
}
21+
22+
resource "github_repository" "lal-build_xyz" {
23+
name = "lal-build.xyz"
24+
description = "Documentation page"
25+
homepage_url = "https://lal-build.xyz"
26+
}
27+
28+
resource "github_repository" "terraform-plans" {
29+
name = "terraform-plans"
30+
description = "Infrastructure configs"
31+
}
32+
33+
# branch protection
34+
35+
resource "github_branch_protection" "dockerfiles_master" {
36+
repository = "dockerfiles"
37+
branch = "master"
38+
enforce_admins = "true"
39+
}
40+
41+
resource "github_branch_protection" "lal_master" {
42+
repository = "lal"
43+
branch = "master"
44+
enforce_admins = "true"
45+
}
46+
47+
48+
resource "github_branch_protection" "terraform-plans_master" {
49+
repository = "terraform-plans"
50+
branch = "master"
51+
enforce_admins = "true"
52+
}
53+
54+
# members
55+
56+
resource "github_membership" "membership_bencord0" {
57+
username = "bencord0"
58+
role = "member"
59+
}
60+
61+
# webhooks
62+
63+
#resource "github_repository_webhook" "lal-build_xyz-heroku" {
64+
# repository = "lal-build.xyz"
65+
#
66+
# name = "web"
67+
#
68+
# configuration {
69+
# url = "https://kolkrabbi.heroku.com/hooks/github"
70+
# content_type = "json"
71+
# insecure_ssl = false
72+
# #secret = "" can't retrieve this..
73+
# }
74+
#
75+
# active = true
76+
#
77+
# events = ["*"]
78+
#}

Diff for: terraform.tfstate

+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{
2+
"version": 3,
3+
"terraform_version": "0.11.0",
4+
"serial": 7,
5+
"lineage": "2cf07785-84fe-4ec5-b36a-2b21c808efba",
6+
"modules": [
7+
{
8+
"path": [
9+
"root"
10+
],
11+
"outputs": {},
12+
"resources": {
13+
"github_branch_protection.dockerfiles_master": {
14+
"type": "github_branch_protection",
15+
"depends_on": [],
16+
"primary": {
17+
"id": "dockerfiles:master",
18+
"attributes": {
19+
"branch": "master",
20+
"enforce_admins": "true",
21+
"id": "dockerfiles:master",
22+
"repository": "dockerfiles",
23+
"required_pull_request_reviews.#": "0",
24+
"required_status_checks.#": "0",
25+
"restrictions.#": "0"
26+
},
27+
"meta": {},
28+
"tainted": false
29+
},
30+
"deposed": [],
31+
"provider": "provider.github"
32+
},
33+
"github_branch_protection.lal_master": {
34+
"type": "github_branch_protection",
35+
"depends_on": [],
36+
"primary": {
37+
"id": "lal:master",
38+
"attributes": {
39+
"branch": "master",
40+
"enforce_admins": "true",
41+
"id": "lal:master",
42+
"repository": "lal",
43+
"required_pull_request_reviews.#": "0",
44+
"required_status_checks.#": "0",
45+
"restrictions.#": "0"
46+
},
47+
"meta": {},
48+
"tainted": false
49+
},
50+
"deposed": [],
51+
"provider": "provider.github"
52+
},
53+
"github_membership.membership_bencord0": {
54+
"type": "github_membership",
55+
"depends_on": [],
56+
"primary": {
57+
"id": "lalbuild:bencord0",
58+
"attributes": {
59+
"id": "lalbuild:bencord0",
60+
"role": "member",
61+
"username": "bencord0"
62+
},
63+
"meta": {},
64+
"tainted": false
65+
},
66+
"deposed": [],
67+
"provider": "provider.github"
68+
},
69+
"github_repository.dockerfiles": {
70+
"type": "github_repository",
71+
"depends_on": [],
72+
"primary": {
73+
"id": "dockerfiles",
74+
"attributes": {
75+
"allow_merge_commit": "true",
76+
"allow_rebase_merge": "true",
77+
"allow_squash_merge": "true",
78+
"default_branch": "master",
79+
"description": "Demo environments for lal",
80+
"full_name": "lalbuild/dockerfiles",
81+
"git_clone_url": "git://github.com/lalbuild/dockerfiles.git",
82+
"has_downloads": "false",
83+
"has_issues": "true",
84+
"has_wiki": "false",
85+
"homepage_url": "",
86+
"http_clone_url": "https://github.com/lalbuild/dockerfiles.git",
87+
"id": "dockerfiles",
88+
"name": "dockerfiles",
89+
"private": "false",
90+
"ssh_clone_url": "[email protected]:lalbuild/dockerfiles.git",
91+
"svn_url": "https://github.com/lalbuild/dockerfiles"
92+
},
93+
"meta": {},
94+
"tainted": false
95+
},
96+
"deposed": [],
97+
"provider": "provider.github"
98+
},
99+
"github_repository.lal": {
100+
"type": "github_repository",
101+
"depends_on": [],
102+
"primary": {
103+
"id": "lal",
104+
"attributes": {
105+
"allow_merge_commit": "true",
106+
"allow_rebase_merge": "true",
107+
"allow_squash_merge": "true",
108+
"default_branch": "master",
109+
"description": "A strict, language-agnostic build system and dependency manager",
110+
"full_name": "lalbuild/lal",
111+
"git_clone_url": "git://github.com/lalbuild/lal.git",
112+
"has_downloads": "true",
113+
"has_issues": "true",
114+
"has_wiki": "true",
115+
"homepage_url": "",
116+
"http_clone_url": "https://github.com/lalbuild/lal.git",
117+
"id": "lal",
118+
"name": "lal",
119+
"private": "false",
120+
"ssh_clone_url": "[email protected]:lalbuild/lal.git",
121+
"svn_url": "https://github.com/lalbuild/lal"
122+
},
123+
"meta": {},
124+
"tainted": false
125+
},
126+
"deposed": [],
127+
"provider": "provider.github"
128+
},
129+
"github_repository.lal-build_xyz": {
130+
"type": "github_repository",
131+
"depends_on": [],
132+
"primary": {
133+
"id": "lal-build.xyz",
134+
"attributes": {
135+
"allow_merge_commit": "true",
136+
"allow_rebase_merge": "true",
137+
"allow_squash_merge": "true",
138+
"default_branch": "master",
139+
"description": "Documentation page",
140+
"full_name": "lalbuild/lal-build.xyz",
141+
"git_clone_url": "git://github.com/lalbuild/lal-build.xyz.git",
142+
"has_downloads": "false",
143+
"has_issues": "false",
144+
"has_wiki": "false",
145+
"homepage_url": "https://lal-build.xyz",
146+
"http_clone_url": "https://github.com/lalbuild/lal-build.xyz.git",
147+
"id": "lal-build.xyz",
148+
"name": "lal-build.xyz",
149+
"private": "false",
150+
"ssh_clone_url": "[email protected]:lalbuild/lal-build.xyz.git",
151+
"svn_url": "https://github.com/lalbuild/lal-build.xyz"
152+
},
153+
"meta": {},
154+
"tainted": false
155+
},
156+
"deposed": [],
157+
"provider": "provider.github"
158+
},
159+
"github_repository.terraform-plans": {
160+
"type": "github_repository",
161+
"depends_on": [],
162+
"primary": {
163+
"id": "terraform-plans",
164+
"attributes": {
165+
"allow_merge_commit": "true",
166+
"allow_rebase_merge": "true",
167+
"allow_squash_merge": "true",
168+
"default_branch": "master",
169+
"description": "Infrastructure configs",
170+
"full_name": "lalbuild/terraform-plans",
171+
"git_clone_url": "git://github.com/lalbuild/terraform-plans.git",
172+
"has_downloads": "false",
173+
"has_issues": "false",
174+
"has_wiki": "false",
175+
"homepage_url": "",
176+
"http_clone_url": "https://github.com/lalbuild/terraform-plans.git",
177+
"id": "terraform-plans",
178+
"name": "terraform-plans",
179+
"private": "false",
180+
"ssh_clone_url": "[email protected]:lalbuild/terraform-plans.git",
181+
"svn_url": "https://github.com/lalbuild/terraform-plans"
182+
},
183+
"meta": {},
184+
"tainted": false
185+
},
186+
"deposed": [],
187+
"provider": "provider.github"
188+
}
189+
},
190+
"depends_on": []
191+
}
192+
]
193+
}

0 commit comments

Comments
 (0)