Skip to content

Commit

Permalink
adding config + pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorOKane-Kainos committed Jul 4, 2024
1 parent d245d3f commit c43ca92
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion components/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
module "tags" {
source = "git::https://github.com/hmcts/terraform-module-common-tags.git?ref=master"
environment = var.env
product = var.product
builtFrom = var.builtFrom
}

resource "azurerm_resource_group" "rg" {
name = var.resource_group_name
location = var.location
tags = module.tags.common_tags
}

resource "azurerm_storage_account" "sa" {
name = var.storage_account_name
resource_group_name = azurerm_resource_group.rg.name
location = azurerm_resource_group.rg.location
account_tier = "Standard"
account_replication_type = "LRS"
tags = module.tags.common_tags
}

resource "azurerm_storage_container" "tfstate" {
name = "tfstate"
storage_account_name = azurerm_storage_account.sa.name
container_access_type = "private"

}

# Output existing branches for debugging
output "existing_branches" {
value = data.github_branch.existing_branches
Expand Down Expand Up @@ -40,7 +69,7 @@ resource "github_branch_protection_v3" "branch_protection" {

lifecycle {
ignore_changes = [
# Allows the branch protection rules to reapply in the case of a rule being deleted.
# Ignore changes to the branch protection rules
etag
]
}
Expand Down

0 comments on commit c43ca92

Please sign in to comment.