-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
30 lines (24 loc) · 741 Bytes
/
main.tf
File metadata and controls
30 lines (24 loc) · 741 Bytes
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
data "external" "github_token" {
# Github CLI does not have workflow permissions.
program = ["./scripts/get_gh_token.sh"]
}
module "managed_github_keys" {
providers = {
github = github
}
source = "./modules/github/managed_keys"
}
module "managed_github_repositories" {
providers = {
github = github,
external = external,
null = null,
}
github_user = data.github_user.current
github_repositories = { for repo, repo_attrs in var.github_repositories : repo => merge(repo_attrs, { "secrets" : lookup(var.secrets, repo, {}) }) }
pinned_versions = var.pinned_versions
source = "./modules/github/managed_repositories"
}
data "github_user" "current" {
username = var.github_username
}