Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

[WIP] Add specs for virtual hub #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
14 changes: 14 additions & 0 deletions specs/networksubnet/examples/terraform/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- !ruby/object:Provider::Azure::Example
resource: azurerm_subnet
prerequisites:
- !ruby/object:Provider::Azure::ExampleReference
product: resourcegroup
example: basic
- !ruby/object:Provider::Azure::ExampleReference
product: networkvirtualnetwork
example: basic
properties:
name: "<%= get_resource_name('subnet', 'snet') -%>"
resource_group_name: "${azurerm_resource_group.<%= resource_id_hint -%>.name}"
virtual_network_name: "${azurerm_virtual_network.<%= resource_id_hint -%>.name}"
address_prefix: "10.5.1.0/24"
6 changes: 6 additions & 0 deletions specs/networkvirtualhub/ansible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--- !ruby/object:Provider::Azure::Ansible::Config
author: audevbot
version_added: "2.9"
overrides: !ruby/object:Overrides::ResourceOverrides
VirtualHub: !ruby/object:Provider::Azure::Ansible::ResourceOverride
examples: []
598 changes: 598 additions & 0 deletions specs/networkvirtualhub/api.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- !ruby/object:Provider::Ansible::Example
task: !ruby/object:Provider::Ansible::Task
name: azure_rm_networkvirtualhub
description: VirtualHubDelete
code:
resource_group: myResourceGroup
name: myVirtualHub
state: absent

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- !ruby/object:Provider::Ansible::Example
task: !ruby/object:Provider::Ansible::Task
name: azure_rm_networkvirtualhub
description: VirtualHubPut
code:
resource_group: myResourceGroup
name: myVirtualHub
virtual_hub_parameters:
location: West US
tags:
key1: value1
properties:
virtualWan:
id: >-
/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group
}}/providers/Microsoft.Network/virtualWans/{{ virtual_wan_name }}
addressPrefix: 10.168.0.0/24

20 changes: 20 additions & 0 deletions specs/networkvirtualhub/examples/terraform/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- !ruby/object:Provider::Azure::Example
resource: azurerm_virtual_hub
prerequisites:
- !ruby/object:Provider::Azure::ExampleReference
product: resourcegroup
example: basic
- !ruby/object:Provider::Azure::ExampleReference
product: networkvirtualwan
example: basic
properties:
name: "<%= get_resource_name('virtualHubs', 'virtualhub') -%>"
resource_group: "${azurerm_resource_group.<%= resource_id_hint -%>.name}"
location: "${azurerm_resource_group.<%= resource_id_hint -%>.location}"
address_prefix: "10.0.1.0/24"
virtual_wan:
id: "${azurerm_virtual_wan.<%= resource_id_hint -%>.id}"
route_table:
routes:
address_prefixes: ["10.0.2.0/24", "10.0.3.0/24"]
next_hop_ip_address: "10.0.4.5"
35 changes: 35 additions & 0 deletions specs/networkvirtualhub/examples/terraform/complete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--- !ruby/object:Provider::Azure::Example
resource: azurerm_virtual_hub
prerequisites:
- !ruby/object:Provider::Azure::ExampleReference
product: resourcegroup
example: basic
- !ruby/object:Provider::Azure::ExampleReference
product: networkvirtualnetwork
example: basic
- !ruby/object:Provider::Azure::ExampleReference
product: networksubnet
example: basic
- !ruby/object:Provider::Azure::ExampleReference
product: networkvirtualwan
example: basic
properties:
name: "<%= get_resource_name('virtualHubs', 'virtualhub') -%>"
resource_group: "${azurerm_resource_group.<%= resource_id_hint -%>.name}"
location: "${azurerm_resource_group.<%= resource_id_hint -%>.location}"
address_prefix: "10.0.1.0/24"
virtual_wan:
id: "${azurerm_virtual_wan.<%= resource_id_hint -%>.id}"
virtual_network_connections:
name: "testConnection"
remote_virtual_network:
id: "${azurerm_virtual_network.<%= resource_id_hint -%>.id}"
allow_hub_to_remote_vnet_transit: "false"
allow_remote_vnet_to_use_hub_vnet_gateways: "false"
enable_internet_security: "false"
route_table:
routes:
address_prefixes: ["10.0.2.0/24", "10.0.3.0/24"]
next_hop_ip_address: "10.0.4.6"
tags:
env: "test"
56 changes: 56 additions & 0 deletions specs/networkvirtualhub/terraform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
--- !ruby/object:Provider::Azure::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
VirtualHub: !ruby/object:Provider::Azure::Terraform::ResourceOverride
azure_sdk_definition: !ruby/object:Api::Azure::SDKDefinitionOverride
create: !ruby/object:Api::Azure::SDKOperationDefinitionOverride
request:
'/properties/p2SVpnGateway': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: P2SVpnGateway
'/properties/expressRouteGateway': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: ExpressRouteGateway
'/properties/virtualNetworkConnections/properties': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: HubVirtualNetworkConnectionProperties
'/properties/routeTable/routes/nextHopIpAddress': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: NextHopIPAddress
read: !ruby/object:Api::Azure::SDKOperationDefinitionOverride
response:
'/properties/p2SVpnGateway': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: P2SVpnGateway
'/properties/expressRouteGateway': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: ExpressRouteGateway
'/properties/virtualNetworkConnections/properties': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: HubVirtualNetworkConnectionProperties
'/properties/routeTable/routes/nextHopIpAddress': !ruby/object:Api::Azure::SDKTypeDefinitionOverride
go_field_name: NextHopIPAddress
properties:
provisioningState: !ruby/object:Provider::Azure::Terraform::PropertyOverride
exclude: true
virtualNetworkConnections: !ruby/object:Provider::Azure::Terraform::PropertyOverride
acctests:
- !ruby/object:Provider::Azure::Terraform::AccTestDefinition
name: basic
steps: [basic]
- !ruby/object:Provider::Azure::Terraform::AccTestDefinition
name: complete
steps: [complete]
- !ruby/object:Provider::Azure::Terraform::AccTestDefinition
name: update
steps: [basic, complete]
document_examples:
- !ruby/object:Provider::Azure::Terraform::DocumentExampleReference
title: Vitual Hub Usage
example_name: basic
resource_name_hints:
resourceGroups: acctestRG
location: Eastus2
datasources: !ruby/object:Overrides::ResourceOverrides
VirtualHub: !ruby/object:Provider::Azure::Terraform::ResourceOverride
properties:
resourceGroup: !ruby/object:Provider::Azure::Terraform::PropertyOverride
description: The Name of the Resource Group where the App Service exists.
acctests:
- !ruby/object:Provider::Azure::Terraform::AccTestDefinition
name: basic
steps: [basic]
datasource_example_outputs:
virtual_hub_id: id
11 changes: 11 additions & 0 deletions specs/networkvirtualnetwork/examples/terraform/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- !ruby/object:Provider::Azure::Example
resource: azurerm_virtual_network
prerequisites:
- !ruby/object:Provider::Azure::ExampleReference
product: resourcegroup
example: basic
properties:
name: "<%= get_resource_name('virtualnetwork', 'vnet') -%>"
resource_group_name: "${azurerm_resource_group.<%= resource_id_hint -%>.name}"
location: "${azurerm_resource_group.<%= resource_id_hint -%>.location}"
address_space: ["10.5.0.0/16"]
10 changes: 10 additions & 0 deletions specs/networkvirtualwan/examples/terraform/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- !ruby/object:Provider::Azure::Example
resource: azurerm_virtual_wan
prerequisites:
- !ruby/object:Provider::Azure::ExampleReference
product: resourcegroup
example: basic
properties:
name: "<%= get_resource_name('virtualwan', 'vwan') -%>"
resource_group_name: ${azurerm_resource_group.<%= resource_id_hint -%>.name}
location: ${azurerm_resource_group.<%= resource_id_hint -%>.location}