Terraform Azure Web app deployment not pulling public forked repository code

Scenario

I’m attempting to deploy a sample .NET Hello World Webapp to Azure, referencing a forked GitHub repository. The deployment process indicates that it is referencing my forked repository, but the GitHub Actions workflow does not trigger, and the web app is not deployed from the forked repo. I’ve tinkered with various settings with the terraform config, to no avail.

Issue

Despite configuring the repository and providing the GitHub authentication token, the GitHub Actions workflow is not triggered, and the web app is not deployed from the forked repository. I’ve also tinkered with setting the manual_integration variable of the source control slot to no avail.

Question:

Is there an additional authentication step or configuration that I’m missing between GitHub and the Azure portal to ensure the deployment triggers and pulls the code from my forked repository?

I am being patient post-deployment and waiting 10 minutes for the site to show. And it does work when deployed manually in the Azure portal.

Any help would be greatly appreciated! Thank you!

Terraform config:

webapp.tf

resource "azurerm_service_plan" "srv_plan" {
  name                = "${local.prefix}service-plan"
  location            = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name
  sku_name            = var.webapp_sku
  os_type             = var.webappos
  tags                = local.common_tags
}

resource "azurerm_windows_web_app" "dot_net_web_app" {
  name                          = "${local.prefix}dotnet-app"
  location                      = azurerm_resource_group.rg.location
  resource_group_name           = azurerm_resource_group.rg.name
  service_plan_id               = azurerm_service_plan.srv_plan.id
  https_only                    = true
  public_network_access_enabled = false
  enabled                       = true
  webdeploy_publish_basic_authentication_enabled = true

  site_config {
    always_on           = true
    minimum_tls_version = var.tls_version
    application_stack {
      current_stack  = var.stack
      dotnet_version = var.stack_version
    }
  }
}

resource "azurerm_source_control_token" "source_token" {
  type         = "GitHub"
  token        = var.github_auth_token
  token_secret = var.github_auth_token
}

resource "azurerm_windows_web_app_slot" "slot" {
  name           = "${local.prefix}app-slot"
  app_service_id = azurerm_windows_web_app.dot_net_web_app.id
  site_config {}
}

resource "azurerm_app_service_source_control_slot" "git_source" {
  slot_id                = azurerm_windows_web_app_slot.slot.id
  repo_url               = var.webapp_repo_url
  branch                 = var.webapp_repo_branch
  use_mercurial          = false
  use_manual_integration = false
  depends_on             = [azurerm_source_control_token.source_token]
  github_action_configuration {
    generate_workflow_file = false
  }
}

variables.tf

variable "webapp_sku" {
  type    = string
  default = "P1v2"
}

variable "webappos" {
  type    = string
  default = "Windows"
}

variable "tls_version" {
  type    = string
  default = "1.2"
}

variable "stack" {
  type    = string
  default = "dotnet"
}

variable "stack_version" {
  type    = string
  default = "v7.0"
}

variable "subresource" {
  type    = list(string)
  default = ["sites"]
}

variable "webapp_repo_url" {
  type    = string
  default = "https://github.com/ZimCanIT/hello-world-webapp"
}

variable "webapp_repo_branch" {
  type    = string
  default = "main"
}

variable "github_auth_token" {
  type        = string
  sensitive   = true
  description = "Token for authorization"
}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật