Skip to content

Commit

Permalink
updating documentation and tests following last comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pchanvallon committed Jan 12, 2023
1 parent 2612bd5 commit 5540c19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,61 +30,11 @@ func TestAccPrivateDNSResolverDnsForwardingRulesetDataSource_basic(t *testing.T)

func (d PrivateDNSResolverDnsForwardingRulesetDataSource) basic(data acceptance.TestData) string {
return fmt.Sprintf(`
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "test" {
name = "acctest-rg-%[2]d"
location = "%[1]s"
}
resource "azurerm_virtual_network" "test" {
name = "acctest-rg-%[2]d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
address_space = ["10.0.0.0/16"]
}
resource "azurerm_subnet" "test" {
name = "outbounddns"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test.name
address_prefixes = ["10.0.0.64/28"]
delegation {
name = "Microsoft.Network.dnsResolvers"
service_delegation {
actions = ["Microsoft.Network/virtualNetworks/subnets/join/action"]
name = "Microsoft.Network/dnsResolvers"
}
}
}
resource "azurerm_private_dns_resolver" "test" {
name = "acctest-dr-%[2]d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
virtual_network_id = azurerm_virtual_network.test.id
}
resource "azurerm_private_dns_resolver_outbound_endpoint" "test" {
name = "acctest-droe-%[2]d"
private_dns_resolver_id = azurerm_private_dns_resolver.test.id
location = azurerm_private_dns_resolver.test.location
subnet_id = azurerm_subnet.test.id
}
resource "azurerm_private_dns_resolver_dns_forwarding_ruleset" "test" {
name = "acctest-drdfr-%[2]d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
private_dns_resolver_outbound_endpoint_ids = [azurerm_private_dns_resolver_outbound_endpoint.test.id]
}
%s
data "azurerm_private_dns_resolver_dns_forwarding_ruleset" "test" {
name = azurerm_private_dns_resolver_dns_forwarding_ruleset.test.name
resource_group_name = azurerm_resource_group.test.name
}
`, data.Locations.Primary, data.RandomInteger)
`, PrivateDNSResolverForwardingRuleResource{}.basic(data))
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ In addition to the Arguments listed above - the following Attributes are exporte

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions:

* `read` - (Defaults to 5 minutes) Used when retrieving the Private DNS SRV Record.
* `read` - (Defaults to 5 minutes) Used when retrieving the Private DNS Resolver Dns Forwarding Ruleset.

0 comments on commit 5540c19

Please sign in to comment.