Skip to content

Commit

Permalink
modify per review
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo committed Jul 8, 2020
1 parent 34d4172 commit 3b522f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func testAccAzureRMVirtualHubConnection_basic(data acceptance.TestData) string {
template := testAccAzureRMVirtualHubConnection_template(data)
return fmt.Sprintf(`
%s
resource "azurerm_virtual_hub_connection" "test" {
name = "acctestbasicvhubconn-%d"
virtual_hub_id = azurerm_virtual_hub.test.id
Expand All @@ -199,6 +200,7 @@ func testAccAzureRMVirtualHubConnection_requiresImport(data acceptance.TestData)
template := testAccAzureRMVirtualHubConnection_basic(data)
return fmt.Sprintf(`
%s
resource "azurerm_virtual_hub_connection" "import" {
name = azurerm_virtual_hub_connection.test.name
virtual_hub_id = azurerm_virtual_hub_connection.test.virtual_hub_id
Expand All @@ -211,33 +213,39 @@ func testAccAzureRMVirtualHubConnection_complete(data acceptance.TestData) strin
template := testAccAzureRMVirtualHubConnection_template(data)
return fmt.Sprintf(`
%s
resource "azurerm_virtual_network" "test2" {
name = "acctestvirtnet2%d"
address_space = ["10.6.0.0/16"]
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
}
resource "azurerm_network_security_group" "test2" {
name = "acctestnsg2%d"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
}
resource "azurerm_subnet" "test2" {
name = "acctestsubnet2%d"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test2.name
address_prefixes = ["10.6.1.0/24"]
}
resource "azurerm_subnet_network_security_group_association" "test2" {
subnet_id = azurerm_subnet.test2.id
network_security_group_id = azurerm_network_security_group.test2.id
}
resource "azurerm_virtual_hub_connection" "test" {
name = "acctestvhubconn-%d"
virtual_hub_id = azurerm_virtual_hub.test.id
remote_virtual_network_id = azurerm_virtual_network.test.id
internet_security_enabled = false
}
resource "azurerm_virtual_hub_connection" "test2" {
name = "acctestvhubconn2-%d"
virtual_hub_id = azurerm_virtual_hub.test.id
Expand All @@ -251,6 +259,7 @@ func testAccAzureRMVirtualHubConnection_enableInternetSecurity(data acceptance.T
template := testAccAzureRMVirtualHubConnection_template(data)
return fmt.Sprintf(`
%s
resource "azurerm_virtual_hub_connection" "test" {
name = "acctestbasicvhubconn-%d"
virtual_hub_id = azurerm_virtual_hub.test.id
Expand All @@ -265,36 +274,43 @@ func testAccAzureRMVirtualHubConnection_template(data acceptance.TestData) strin
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "test" {
name = "acctestRG-vhub-%d"
location = "%s"
}
resource "azurerm_virtual_network" "test" {
name = "acctestvirtnet%d"
address_space = ["10.5.0.0/16"]
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
}
resource "azurerm_network_security_group" "test" {
name = "acctestnsg%d"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
}
resource "azurerm_subnet" "test" {
name = "acctestsubnet%d"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test.name
address_prefixes = ["10.5.1.0/24"]
}
resource "azurerm_subnet_network_security_group_association" "test" {
subnet_id = azurerm_subnet.test.id
network_security_group_id = azurerm_network_security_group.test.id
}
resource "azurerm_virtual_wan" "test" {
name = "acctestvwan-%d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
}
resource "azurerm_virtual_hub" "test" {
name = "acctest-VHUB-%d"
resource_group_name = azurerm_resource_group.test.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ func resourceArmVirtualHubConnection() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Deprecated: "this property has been deprecated in the API and will be removed in version 3.0 of the provider",
Deprecated: "Due to a breaking behavioural change in the Azure API this property is no longer functional and will be removed in version 3.0 of the provider",
},

// TODO 3.0: remove this property
"vitual_network_to_hub_gateways_traffic_allowed": {
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
Deprecated: "this property has been deprecated in the API and will be removed in version 3.0 of the provider",
Deprecated: "Due to a breaking behavioural change in the Azure API this property is no longer functional and will be removed in version 3.0 of the provider",
},

"internet_security_enabled": {
Expand Down
6 changes: 0 additions & 6 deletions website/docs/r/virtual_hub_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ The following arguments are supported:

---

* `hub_to_vitual_network_traffic_allowed` - (Optional / **Deprecated** ) Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created.

* `vitual_network_to_hub_gateways_traffic_allowed` - (Optional / **Deprecated** ) Is Remote Virtual Network traffic allowed to transit the Hub's Virtual Network Gateway's? Changing this forces a new resource to be created.

-> **NOTE** Please ensure that you deploy either a [Site-to-Site](https://www.terraform.io/docs/providers/azurerm/r/vpn_gateway.html)/[Point-to-Site](https://www.terraform.io/docs/providers/azurerm/r/point_to_site_vpn_gateway.html) VPN gateway or an [ExpressRoute gateway](https://www.terraform.io/docs/providers/azurerm/r/express_route_gateway.html) in the Virtual Hub before enabling this field.

* `internet_security_enabled` - (Optional) Should Internet Security be enabled to secure internet traffic? Changing this forces a new resource to be created.

## Attributes Reference
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/virtual_wan.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ The following arguments are supported:

* `allow_branch_to_branch_traffic` - (Optional) Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`.

* `allow_vnet_to_vnet_traffic` - (Optional / **Deprecated** ) Boolean flag to specify whether VNet to VNet traffic is allowed. Defaults to `false`.

* `office365_local_breakout_category` - (Optional) Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`.

* `type` - (Optional) Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`.
Expand Down

0 comments on commit 3b522f1

Please sign in to comment.