File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ locals {
1717 topics = []
1818 vulnerability_alerts = true
1919 }
20+
2021 confs = merge (local. settings , var. settings )
2122}
2223
@@ -73,11 +74,11 @@ resource "github_repository" "this" {
7374# Add a deploy key
7475resource "github_repository_deploy_key" "this" {
7576 depends_on = [github_repository . this ]
76- count = try (var. key , null ) != null ? 1 : 0
77- title = var. name
77+ count = length (var. deploy_keys )
78+ title = var. deploy_keys [ count . index ] . title
7879 repository = github_repository. this . name
79- key = file (var. key )
80- read_only = var. read_only
80+ key = file (var. deploy_keys [ count . index ] . key )
81+ read_only = lookup ( var. deploy_keys [ count . index ], " read_only" , true )
8182}
8283
8384resource "github_actions_secret" "this" {
Original file line number Diff line number Diff line change @@ -14,16 +14,14 @@ variable "visibility" {
1414 default = " private"
1515}
1616
17- variable "key" {
18- type = string
19- description = " filename pub for repository deploy key."
20- default = null
21- }
22-
23- variable "read_only" {
24- type = bool
25- description = " enabled read_only or no."
26- default = true
17+ variable "deploy_keys" {
18+ type = list (object ({
19+ title = string
20+ key = string
21+ read_only = bool
22+ }))
23+ description = " The name of repositories."
24+ default = []
2725}
2826
2927variable "secrets" {
You can’t perform that action at this time.
0 commit comments