Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Jun 30, 2021
1 parent 5b0dd7e commit ab50b68
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ resource "azurerm_management_group_policy_assignment" "test" {
}
metadata = jsonencode({
"category": "Testing"
"category" : "Testing"
})
}
`, template, data.RandomString, data.Locations.Primary)
Expand Down Expand Up @@ -338,8 +338,8 @@ resource "azurerm_management_group_policy_assignment" "test" {
description = "This is a policy assignment from an acceptance test"
display_name = "AccTest Policy %[2]s"
enforce = false
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomString)
Expand Down Expand Up @@ -373,7 +373,7 @@ resource "azurerm_policy_definition" "test" {
mode = "All"
display_name = "acctestpol-%[2]s"
description = "Description for %[2]s"
management_group_id = azurerm_management_group.test.group_id
management_group_id = azurerm_management_group.test.group_id
metadata = <<METADATA
{
"category": "%[3]s"
Expand Down Expand Up @@ -485,8 +485,8 @@ resource "azurerm_management_group_policy_assignment" "test" {
name = "acctestpol-%[2]s"
management_group_id = azurerm_management_group.test.id
policy_definition_id = azurerm_policy_definition.test.id
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ resource "azurerm_resource_group_policy_assignment" "test" {
name = "acctestpa-%[2]d"
resource_group_id = azurerm_resource_group.test.id
policy_definition_id = data.azurerm_policy_definition.test.id
parameters = jsonencode({
"listOfAllowedLocations" = {
"value" = [ azurerm_resource_group.test.location ]
parameters = jsonencode({
"listOfAllowedLocations" = {
"value" = [azurerm_resource_group.test.location]
}
})
}
Expand Down Expand Up @@ -267,7 +267,7 @@ resource "azurerm_resource_group_policy_assignment" "test" {
}
metadata = jsonencode({
"category": "Testing"
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -307,11 +307,11 @@ resource "azurerm_resource_group_policy_assignment" "test" {
description = "This is a policy assignment from an acceptance test"
display_name = "AccTest Policy %[2]d"
enforce = false
not_scopes = [
not_scopes = [
format("%%s/virtualMachines/testvm1", azurerm_resource_group.test.id)
]
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -343,8 +343,8 @@ resource "azurerm_resource_group_policy_assignment" "test" {
name = "acctestpa-%[2]d"
resource_group_id = azurerm_resource_group.test.id
policy_definition_id = azurerm_policy_definition.test.id
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -381,7 +381,7 @@ POLICY_RULE
func (r ResourceGroupAssignmentTestResource) template(data acceptance.TestData) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctest%[1]d"
name = "acctest%[1]d"
location = %[2]q
}
`, data.RandomInteger, data.Locations.Primary)
Expand Down
20 changes: 10 additions & 10 deletions azurerm/internal/services/policy/assignment_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ resource "azurerm_resource_policy_assignment" "test" {
name = "acctestpa-%[2]d"
resource_id = azurerm_virtual_network.test.id
policy_definition_id = data.azurerm_policy_definition.test.id
parameters = jsonencode({
"listOfAllowedLocations" = {
"value" = [ azurerm_resource_group.test.location ]
parameters = jsonencode({
"listOfAllowedLocations" = {
"value" = [azurerm_resource_group.test.location]
}
})
}
Expand Down Expand Up @@ -267,7 +267,7 @@ resource "azurerm_resource_policy_assignment" "test" {
}
metadata = jsonencode({
"category": "Testing"
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -307,11 +307,11 @@ resource "azurerm_resource_policy_assignment" "test" {
description = "This is a policy assignment from an acceptance test"
display_name = "AccTest Policy %[2]d"
enforce = false
not_scopes = [
not_scopes = [
format("%%s/subnets/subnet1", azurerm_virtual_network.test.id)
]
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -343,8 +343,8 @@ resource "azurerm_resource_policy_assignment" "test" {
name = "acctestpa-%[2]d"
resource_id = azurerm_virtual_network.test.id
policy_definition_id = azurerm_policy_definition.test.id
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -381,7 +381,7 @@ POLICY_RULE
func (r ResourceAssignmentTestResource) template(data acceptance.TestData) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctest%[1]d"
name = "acctest%[1]d"
location = %[2]q
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ resource "azurerm_subscription_policy_assignment" "test" {
}
metadata = jsonencode({
"category": "Testing"
"category" : "Testing"
})
}
`, template, data.RandomInteger, data.Locations.Primary)
Expand Down Expand Up @@ -307,11 +307,11 @@ resource "azurerm_subscription_policy_assignment" "test" {
description = "This is a policy assignment from an acceptance test"
display_name = "AccTest Policy %[2]d"
enforce = false
not_scopes = [
not_scopes = [
format("%%s/resourceGroups/blah", data.azurerm_subscription.test.id)
]
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down Expand Up @@ -342,8 +342,8 @@ resource "azurerm_subscription_policy_assignment" "test" {
name = "acctestpa-%[2]d"
subscription_id = data.azurerm_subscription.test.id
policy_definition_id = azurerm_policy_definition.test.id
metadata = jsonencode({
"category": "Testing"
metadata = jsonencode({
"category" : "Testing"
})
}
`, template, data.RandomInteger)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ Management Group Policy Assignments can be imported using the `resource id`, e.g

```shell
terraform import azurerm_management_group_policy_assignment.example /providers/Microsoft.Management/managementGroups/group1/providers/Microsoft.Authorization/policyAssignments/assignment1
```
```
8 changes: 4 additions & 4 deletions website/docs/r/resource_group_policy_assignment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ resource "azurerm_resource_group" "example" {
}
resource "azurerm_policy_definition" "example" {
name = "only-deploy-in-westeurope"
policy_type = "Custom"
mode = "All"
name = "only-deploy-in-westeurope"
policy_type = "Custom"
mode = "All"
policy_rule = <<POLICY_RULE
{
Expand Down Expand Up @@ -110,4 +110,4 @@ Resource Group Policy Assignments can be imported using the `resource id`, e.g.

```shell
terraform import azurerm_resource_group_policy_assignment.example /subscriptions/00000000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Authorization/policyAssignments/assignment1
```
```
8 changes: 4 additions & 4 deletions website/docs/r/resource_policy_assignment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ data "azurerm_virtual_network" "example" {
}
resource "azurerm_policy_definition" "example" {
name = "only-deploy-in-westeurope"
policy_type = "Custom"
mode = "All"
name = "only-deploy-in-westeurope"
policy_type = "Custom"
mode = "All"
policy_rule = <<POLICY_RULE
{
Expand Down Expand Up @@ -114,4 +114,4 @@ Resource Policy Assignments can be imported using the `resource id`, e.g.
terraform import azurerm_resource_policy_assignment.example "{resource}/providers/Microsoft.Authorization/policyAssignments/assignment1"
```

where `{resource}` is a Resource ID in the form `/subscriptions/00000000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/network1`.
where `{resource}` is a Resource ID in the form `/subscriptions/00000000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/network1`.
8 changes: 4 additions & 4 deletions website/docs/r/subscription_policy_assignment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Manages a Subscription Policy Assignment.
data "azurerm_subscription" "current" {}
resource "azurerm_policy_definition" "example" {
name = "only-deploy-in-westeurope"
policy_type = "Custom"
mode = "All"
name = "only-deploy-in-westeurope"
policy_type = "Custom"
mode = "All"
policy_rule = <<POLICY_RULE
{
Expand Down Expand Up @@ -107,4 +107,4 @@ Subscription Policy Assignments can be imported using the `resource id`, e.g.

```shell
terraform import azurerm_subscription_policy_assignment.example /subscriptions/00000000-0000-0000-000000000000/providers/Microsoft.Authorization/policyAssignments/assignment1
```
```

0 comments on commit ab50b68

Please sign in to comment.