Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ provider "azurerm" {
}

module "policy" {
source = "../../"
source = "git::https://github.com/OT-terraform-azure-modules/terraform-azure-policies.git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source URL should not be GITHUB URL but Terraform Registry URL.

source = "OT-terraform-azure-modules/policies/azure"
version = "0.0.2"

policy_manner = "Policy"
policy_name = "test"
policy_type = "Custom"
Expand Down Expand Up @@ -83,8 +83,12 @@ module "policy" {
## Case 2: Module Usage for initiative policy

```hcl
provider "azurerm" {
features {}
}

module "policy" {
source = "../../"
source = "git::https://github.com/OT-terraform-azure-modules/terraform-azure-policies.git"
policy_manner = "Initiative"
policy_name = "test"
policy_type = "Custom"
Expand Down
6 changes: 5 additions & 1 deletion example/initiative/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
provider "azurerm" {
features {}
}

module "policy" {
source = "../../"
source = "git::https://github.com/OT-terraform-azure-modules/terraform-azure-policies.git"
policy_manner = "Initiative"
policy_name = "test"
policy_type = "Custom"
Expand Down
2 changes: 1 addition & 1 deletion example/policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ provider "azurerm" {
}

module "policy" {
source = "../../"
source = "git::https://github.com/OT-terraform-azure-modules/terraform-azure-policies.git"
policy_manner = "Policy"
policy_name = "test"
policy_type = "Custom"
Expand Down
3 changes: 0 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
provider "azurerm" {
features {}
}

resource "azurerm_policy_definition" "policy" {
count = var.policy_type == "Custom" && var.policy_manner == "Policy" ? 1 : 0
Expand Down