Skip to content

Commit 701a559

Browse files
committed
updating build definition and repo
1 parent 53ffefd commit 701a559

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

terraform/main.tf

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,10 @@ resource "azuredevops_project" "this_project" {
1717
}
1818
}
1919

20-
21-
### Create a new Git repository
22-
23-
resource "azuredevops_git_repository" "infra_git_repo" {
24-
project_id = azuredevops_project.this_project.id
25-
name = "Infra-Test"
26-
27-
initialization {
28-
init_type = "Import"
29-
source_type = "Git"
30-
source_url = var.infra_git_repo
31-
# service_connection_id = azuredevops_serviceendpoint_github.this_github.id
32-
}
33-
34-
}
35-
3620
### Create a new Git repository for FastAPI
3721
resource "azuredevops_git_repository" "fast_api_git_repo" {
3822
project_id = azuredevops_project.this_project.id
39-
name = "FastAPI-Test"
23+
name = "azure-python-fastapi"
4024

4125
initialization {
4226
init_type = "Import"
@@ -50,17 +34,16 @@ resource "azuredevops_git_repository" "fast_api_git_repo" {
5034
### Create Build Definition ###
5135
resource "azuredevops_build_definition" "this_definition" {
5236
project_id = azuredevops_project.this_project.id
53-
name = "Terraform-Infra-Main"
54-
path = "\\Terraform"
37+
name = "Default"
5538

5639
ci_trigger {
5740
use_yaml = var.use_yaml
5841
}
5942

6043

6144
repository {
62-
repo_type = "TfsGit"
63-
repo_id = azuredevops_git_repository.infra_git_repo.id
45+
repo_type = "default"
46+
repo_id = azuredevops_git_repository.fast_api_git_repo.id
6447
branch_name = "main"
6548
yml_path = ".azdo-pipelines/azure-pipelines.yml"
6649
}
@@ -73,8 +56,7 @@ resource "azuredevops_build_definition" "this_definition" {
7356

7457
variable {
7558
name = "ApplicationName"
76-
value = "FastAPI"
77-
59+
value = "Python FastAPI"
7860
}
7961
}
8062

0 commit comments

Comments
 (0)