Skip to content

Commit ad0d081

Browse files
committed
refactor
1 parent 449e9f7 commit ad0d081

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

hello-world.yml

-19
This file was deleted.

main.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ terraform {
1414

1515

1616
resource "azuredevops_project" "test" {
17-
project_name = "Test Project"
18-
description = "Test Project Description"
17+
project_name = var.project_name
18+
description = var.project_description
1919
visibility = "private"
20-
version_control = "Git"
21-
work_item_template = "Agile"
20+
version_control = var.version_control
21+
work_item_template = var.work_item_template
2222

2323
features = {
2424
"testplans" = "disabled"
@@ -28,7 +28,7 @@ resource "azuredevops_project" "test" {
2828

2929
resource "azuredevops_git_repository" "repo" {
3030
project_id = azuredevops_project.test.id
31-
name = "Sample Empty Git Repository"
31+
name = var.repo_name
3232
initialization {
3333
init_type = "Uninitialized"
3434
}

variable.tf

+28
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,32 @@ variable "subscription_name" {
1313
variable "project_admin_user_email" {
1414
type = string
1515
description = "The email address of the user who will be the admin of the DevOps Project"
16+
}
17+
18+
variable "repo_name" {
19+
type = string
20+
description = "The name of your Code Repository"
21+
}
22+
23+
variable "work_item_template" {
24+
type = string
25+
description = "Azure DevOps Work Item Template"
26+
default = "Agile"
27+
}
28+
29+
variable "version_control" {
30+
type = string
31+
description = "TFVC or Git"
32+
default = "Git"
33+
}
34+
35+
variable "project_description" {
36+
type = string
37+
description = "Please enter a description for your DevOps Project"
38+
default = "Please enter a description for your DevOps Project"
39+
}
40+
41+
variable "project_name" {
42+
type = string
43+
description = "Please enter a name for your project"
1644
}

0 commit comments

Comments
 (0)