Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples for resource_id usage #288

Merged
merged 5 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions docs/resources/azure_api_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_api_management(resource_group: 'inspec-resource-group-9', name: '
it { should exist }
end
```
```ruby
describe azure_api_management(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ApiManagement/service/{apim01}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_application_gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_application_gateway(resource_group: 'inspec-resource-group-9', na
it { should exist }
end
```
```ruby
describe azure_application_gateway(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/applicationGateways/{gatewayName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_cosmosdb_database_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_cosmosdb_database_account(resource_group: 'inspec-resource-group-
it { should exist }
end
```
```ruby
describe azure_cosmosdb_database_account(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_event_hub_authorization_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_event_hub_authorization_rule(resource_group: 'my-rg', namespace_n
it { should exist }
end
```
```ruby
describe azure_event_hub_authorization_rule(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_event_hub_event_hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_event_hub_event_hub(resource_group: 'my-rg', namespace_name: 'my-
it { should exist }
end
```
```ruby
describe azure_event_hub_event_hub(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_event_hub_namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_event_hub_namespace(resource_group: 'my-rg', name: 'my-event-hub-
it { should exist }
end
```
```ruby
describe azure_event_hub_namespace(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_hdinsight_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_hdinsight_cluster(resource_group: 'example', name: 'ClusterName')
it { should exist }
end
```
```ruby
describe azure_hdinsight_cluster(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_iothub.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_iothub(resource_group: 'my-rg', name: 'my-iot-hub') do
it { should exist }
end
```
```ruby
describe azure_iothub(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
7 changes: 6 additions & 1 deletion docs/resources/azure_iothub_event_hub_consumer_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ For an example `inspec.yml` file and how to set up your Azure credentials, refer

## Syntax

The `resource_group`, `resource_name`, `event_hub_endpoint` and `name` or the `resource_id` must be given as a parameter.
`resource_group`, `resource_name`, `event_hub_endpoint` and `name` or the `resource_id` must be given as a parameter.
```ruby
describe azure_iothub_event_hub_consumer_group(resource_group: 'my-rg', resource_name: 'my-iot-hub', event_hub_endpoint: 'myeventhub', name: 'my-consumer-group') do
it { should exist }
end
```
```ruby
describe azure_iothub_event_hub_consumer_group(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_key_vault.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ describe azure_key_vault(resource_group: 'inspec-resource-group', name: 'vault-1
its('name') { should cmp 'vault-101' }
end
```
```ruby
describe azure_key_vault(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.KeyVault/vaults/{vaultName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/azure_mysql_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ describe azure_mysql_database(resource_group: 'inspec-rg', server_name: 'custome
it { should exist }
end
```
```ruby
describe azure_mysql_database(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/databases/{databaseName}') do
it { should exist }
end
```
## Parameters

| Name | Description |
Expand Down