File tree Expand file tree Collapse file tree 7 files changed +66
-0
lines changed
infra/modules/providers/devops Expand file tree Collapse file tree 7 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ .terraform
Original file line number Diff line number Diff line change 1+ export AZDO_PERSONAL_ACCESS_TOKEN =
2+ export AZDO_ORG_SERVICE_URL =
Original file line number Diff line number Diff line change 1+ data "azuredevops_project" "project" {
2+ project_name = var. project_name
3+ }
4+
5+ resource "azuredevops_variable_group" "variablegroup" {
6+ project_id = data. azuredevops_project . project . id
7+ name = var. variable_group_name
8+ description = var. variable_group_description
9+ allow_access = var. allow_access
10+
11+ dynamic "variable" {
12+ for_each = var. variables
13+ content {
14+ name = variable. value . name
15+ value = variable. value . value
16+ is_secret = variable. value . is_secret
17+ }
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ output "id" {
2+ value = azuredevops_project. project . id
3+ }
Original file line number Diff line number Diff line change 1+ project_name = ""
2+ variable_group_name = "test terraform"
3+ variables = [{
4+ name = "anyname"
5+ value = "any value"
6+ is_secret = false
7+ }]
Original file line number Diff line number Diff line change 1+ variable "project_name" {
2+ type = string
3+ description = " Azure DevOps project name that will be used to add the new variable group"
4+ }
5+
6+ variable "variable_group_name" {
7+ type = string
8+ description = " Azure DevOps Variable Group Name to be created"
9+ }
10+
11+
12+ variable "variable_group_description" {
13+ type = string
14+ description = " "
15+ default = " An optional field to add description about the variable group"
16+ }
17+
18+ variable "allow_access" {
19+ type = bool
20+ description = " A flag to detirmine if the variable group will allow to access all pipelines or not"
21+ default = true
22+ }
23+
24+ variable "variables" {
25+ type = list (object ({
26+ name = string
27+ value = string
28+ is_secret = bool
29+ }))
30+ }
31+
Original file line number Diff line number Diff line change 1+ provider "azuredevops" {
2+ version = " >= 0.0.1"
3+ }
You can’t perform that action at this time.
0 commit comments