-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
- Loading branch information
Showing
4 changed files
with
232 additions
and
197 deletions.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
docs-chef-io/content/inspec/resources/azure_service_fabric_mesh_network.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
+++ | ||
title = "azure_service_fabric_mesh_network Resource" | ||
platform = "azure" | ||
draft = false | ||
gh_repo = "inspec-azure" | ||
|
||
[menu.inspec] | ||
title = "azure_service_fabric_mesh_network" | ||
identifier = "inspec/resources/azure/azure_service_fabric_mesh_network Resource" | ||
parent = "inspec/resources/azure" | ||
+++ | ||
|
||
Use the `azure_service_fabric_mesh_network` InSpec audit resource to test properties of an Azure Service Fabric Mesh network. | ||
|
||
## Azure REST API Version, Endpoint, and HTTP Client Parameters | ||
|
||
{{% inspec_azure_common_parameters %}} | ||
|
||
## Installation | ||
|
||
{{% inspec_azure_install %}} | ||
|
||
## Syntax | ||
|
||
`name`, `resource_group` is a required parameter. | ||
|
||
```ruby | ||
describe azure_service_fabric_mesh_network(resource_group: 'RESOURCE_GROUP', name: 'SERVICE_FABRIC_MESH_NETWORK_NAME') do | ||
it { should exist } | ||
its('type') { should eq 'Microsoft.ServiceFabricMesh/networks' } | ||
its('location') { should eq 'eastus' } | ||
end | ||
``` | ||
|
||
```ruby | ||
describe azure_service_fabric_mesh_network(resource_group: 'RESOURCE_GROUP', name: 'SERVICE_FABRIC_MESH_NETWORK_NAME') do | ||
it { should exist } | ||
end | ||
``` | ||
|
||
## Parameters | ||
|
||
`name` | ||
: Name of the Azure Service Fabric Mesh networks to test. | ||
|
||
`resource_group` | ||
: Azure resource group that the targeted resource resides in. `MyResourceGroup`. | ||
|
||
The parameter set should be provided for a valid query: | ||
- `resource_group` and `name` | ||
|
||
## Properties | ||
|
||
`id` | ||
: Resource Id. | ||
|
||
`name` | ||
: Resource name. | ||
|
||
`type` | ||
: Resource type. `Microsoft.ServiceFabricMesh/networks`. | ||
|
||
`location` | ||
: The Geo-location where the resource lives. | ||
|
||
`properties` | ||
: The properties of the Service Fabric Mesh network. | ||
|
||
`properties.addressPrefix` | ||
: the address prefix for this network. | ||
|
||
`properties.provisioningState` | ||
: State of the resource. | ||
|
||
`properties.ingressConfig.qosLevel` | ||
: The QoS tier for ingress. | ||
|
||
|
||
For properties applicable to all resources, such as `type`, `name`, `id`, `properties`, refer to [`azure_generic_resource`]({{< relref "azure_generic_resource.md#properties" >}}). | ||
|
||
Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/servicefabric/sfmeshrp-api-network_get) for other properties available. | ||
|
||
## Examples | ||
|
||
**Test that the Service Fabric Mesh network is provisioned successfully.** | ||
|
||
```ruby | ||
describe azure_service_fabric_mesh_network(resource_group: 'RESOURCE_GROUP', name: 'SERVICE_FABRIC_MESH_NETWORK_NAME') do | ||
its('properties.provisioningState') { should eq 'Succeeded' } | ||
end | ||
``` | ||
|
||
## Matchers | ||
|
||
{{% inspec_matchers_link %}} | ||
|
||
### exists | ||
|
||
```ruby | ||
# If a Service Fabric Mesh network is found it will exist | ||
|
||
describe azure_service_fabric_mesh_network(resource_group: 'RESOURCE_GROUP', name: 'SERVICE_FABRIC_MESH_NETWORK_NAME') do | ||
it { should exist } | ||
end | ||
# if Service Fabric Mesh network is not found it will not exist | ||
|
||
describe azure_service_fabric_mesh_network(resource_group: 'RESOURCE_GROUP', name: 'SERVICE_FABRIC_MESH_NETWORK_NAME') do | ||
it { should_not exist } | ||
end | ||
``` | ||
|
||
## Azure Permissions | ||
|
||
{{% azure_permissions_service_principal role="reader" %}} |
118 changes: 118 additions & 0 deletions
118
docs-chef-io/content/inspec/resources/azure_service_fabric_mesh_networks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
+++ | ||
title = "azure_service_fabric_mesh_networks Resource" | ||
platform = "azure" | ||
draft = false | ||
gh_repo = "inspec-azure" | ||
|
||
[menu.inspec] | ||
title = "azure_service_fabric_mesh_networks" | ||
identifier = "inspec/resources/azure/azure_service_fabric_mesh_networks Resource" | ||
parent = "inspec/resources/azure" | ||
+++ | ||
|
||
Use the `azure_service_fabric_mesh_networks` InSpec audit resource to test properties of all Azure Service Fabric Mesh networks. | ||
|
||
## Azure REST API Version, Endpoint, and HTTP Client Parameters | ||
|
||
{{% inspec_azure_common_parameters %}} | ||
|
||
## Installation | ||
|
||
{{% inspec_azure_install %}} | ||
|
||
## Syntax | ||
|
||
An `azure_service_fabric_mesh_networks` resource block returns all Azure Service Fabric Mesh networks. | ||
|
||
```ruby | ||
describe azure_service_fabric_mesh_networks do | ||
#... | ||
end | ||
``` | ||
|
||
## Parameters | ||
|
||
`resource_group` _(optional)_ | ||
: Azure resource group that the targeted resource resides in. | ||
|
||
## Properties | ||
|
||
`ids` | ||
: A list of resource IDs. | ||
|
||
: **Field**: `id` | ||
|
||
`names` | ||
: A list of resource Names. | ||
|
||
: **Field**: `name` | ||
|
||
`types` | ||
: A list of the resource types. | ||
|
||
: **Field**: `type` | ||
|
||
`properties` | ||
: A list of Properties for all the Service Fabric Mesh networks. | ||
|
||
: **Field**: `properties` | ||
|
||
`locations` | ||
: A list of the Geo-locations. | ||
|
||
: **Field**: `location` | ||
|
||
`provisioningStates` | ||
: A list of provisioning states of the Service Fabric Mesh networks. | ||
|
||
: **Field**: `provisioningState` | ||
|
||
`addressPrefixes` | ||
: A list of address prefixes. | ||
|
||
: **Field**: `addressPrefix` | ||
|
||
{{% inspec_filter_table %}} | ||
|
||
## Examples | ||
|
||
**Loop through Service Fabric Mesh networks by their names.** | ||
|
||
```ruby | ||
azure_service_fabric_mesh_networks(resource_group: 'RESOURCE_GROUP').names.each do |name| | ||
describe azure_service_fabric_mesh_network(resource_group: 'RESOURCE_GROUP', name: name) do | ||
it { should exist } | ||
end | ||
end | ||
``` | ||
|
||
**Test that there are Service Fabric Mesh networks that are successfully provisioned.** | ||
|
||
```ruby | ||
describe azure_service_fabric_mesh_networks(resource_group: 'RESOURCE_GROUP').where(provisioningState: 'Succeeded') do | ||
it { should exist } | ||
end | ||
``` | ||
|
||
## Matchers | ||
|
||
{{% inspec_matchers_link %}} | ||
|
||
### exists | ||
|
||
```ruby | ||
# Should not exist if no Service Fabric Mesh networks are present | ||
|
||
describe azure_service_fabric_mesh_networks(resource_group: 'RESOURCE_GROUP') do | ||
it { should_not exist } | ||
end | ||
# Should exist if the filter returns at least one Service Fabric Mesh networks | ||
|
||
describe azure_service_fabric_mesh_networks(resource_group: 'RESOURCE_GROUP') do | ||
it { should exist } | ||
end | ||
``` | ||
|
||
## Azure Permissions | ||
|
||
{{% azure_permissions_service_principal role="reader" %}} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.