Skip to content

Commit

Permalink
Merge branch 'main' into support-migrate-project-solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
sathish-progress authored Sep 16, 2021
2 parents daf1f7a + f3c3fa4 commit 0b084b7
Show file tree
Hide file tree
Showing 103 changed files with 3,650 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .expeditor/buildkite/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ruby -v
bundle --version

echo "--- bundle install"
bundle install --jobs=7 --retry=3 --without tools maintenance deploy
bundle config set --local without tools maintenance deploy
bundle install --jobs=7 --retry=3
bundle update

echo "+++ bundle exec rake lint"
Expand Down
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# Changelog
<!-- latest_release 1.68.0 -->
<!-- latest_release 1.68.5 -->
## [v1.68.5](https://github.com/inspec/inspec-azure/tree/v1.68.5) (2021-09-14)

#### Merged Pull Requests
- Add vale linter [#444](https://github.com/inspec/inspec-azure/pull/444) ([IanMadd](https://github.com/IanMadd))
<!-- latest_release -->

## [v1.68.4](https://github.com/inspec/inspec-azure/tree/v1.68.4) (2021-09-14)

#### Merged Pull Requests
- Fix YAML frontmatter lines in resource docs pages [#479](https://github.com/inspec/inspec-azure/pull/479) ([IanMadd](https://github.com/IanMadd))

## [v1.68.3](https://github.com/inspec/inspec-azure/tree/v1.68.3) (2021-09-14)

#### Merged Pull Requests
- F/linked service [#430](https://github.com/inspec/inspec-azure/pull/430) ([sa-progress](https://github.com/sa-progress))

## [v1.68.2](https://github.com/inspec/inspec-azure/tree/v1.68.2) (2021-09-14)

#### Merged Pull Requests
- Update rubocop requirement from ~&gt; 1.20.0 to ~&gt; 1.21.0 [#478](https://github.com/inspec/inspec-azure/pull/478) ([dependabot[bot]](https://github.com/dependabot[bot]))

## [v1.68.1](https://github.com/inspec/inspec-azure/tree/v1.68.1) (2021-09-02)

#### Merged Pull Requests
- skip nested nil values in array [#449](https://github.com/inspec/inspec-azure/pull/449) ([sathish-progress](https://github.com/sathish-progress))

## [v1.68.0](https://github.com/inspec/inspec-azure/tree/v1.68.0) (2021-08-31)

#### Merged Pull Requests
- Support azure synapse notebooks [#422](https://github.com/inspec/inspec-azure/pull/422) ([sathish-progress](https://github.com/sathish-progress))
<!-- latest_release -->

## [v1.67.0](https://github.com/inspec/inspec-azure/tree/v1.67.0) (2021-08-31)

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ end

group :development, :test do
gem 'minitest'
gem 'rubocop', '~> 1.20.0'
gem 'rubocop', '~> 1.21.0'
end
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ The following is a list of static resources.
- [azure_container_registries](docs/resources/azure_container_registries.md)
- [azure_container_registry](docs/resources/azure_container_registry.md)
- [azure_cosmosdb_database_account](docs/resources/azure_cosmosdb_database_account.md)
- [azure_data_factories](docs/resources/azure_data_factories.md)
- [azure_data_factory](docs/resources/azure_data_factory.md)
- [azure_data_factory_linked_service](docs/resources/azure_data_factory_linked_service.md)
- [azure_data_factory_linked_services](docs/resources/azure_data_factory_linked_services.md)
- [azure_db_migration_service](docs/resources/azure_db_migration_service.md)
- [azure_db_migration_services](docs/resources/azure_db_migration_services.md)
- [azure_ddos_protection_resource](docs/resources/azure_ddos_protection_resource.md)
Expand Down Expand Up @@ -421,7 +425,7 @@ They can be defined as environment variables or resource parameters (has priorit

If you'd like to contribute to this project please see [Contributing Rules](CONTRIBUTING.md).

For a detailed walk-through of resource creation, see the [Resource Creation Guide](docs/resource_creation_guide.md).
For a detailed walk-through of resource creation, see the [Resource Creation Guide](dev-docs/resource_creation_guide.md).

### Developing a Static Resource

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.68.0
1.68.5
File renamed without changes.
17 changes: 17 additions & 0 deletions docs/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Vale configuration file.
#
# For more information, see https://errata-ai.gitbook.io/vale/getting-started/configuration.

StylesPath = tools/vale
MinAlertLevel = suggestion

[*.md]
BasedOnStyles = Microsoft, write-good, chef

Microsoft.Contractions = NO
Microsoft.Headings = NO
Microsoft.GeneralURL = NO
Microsoft.RangeFormat = NO

# Ignore SVG markup
TokenIgnores = (\*\*\{\w*\}\*\*)
84 changes: 84 additions & 0 deletions docs/resources/azure_data_factory_linked_service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: About the azure_data_factory_linked_service Resource
platform: azure
---

# azure_data_factory_linked_service

Use the `azure_data_factory_linked_service` InSpec audit resource to test the properties of an Azure Linked service.

## Azure REST API Version, Endpoint, and HTTP Client Parameters

This resource interacts with API versions supported by the resource provider. The `api_version` is defined as a resource parameter.
If not provided, the latest version is used. For more information, refer to [`azure_generic_resource`](azure_generic_resource.md).

Unless defined, `azure_cloud` global endpoint and default values for the HTTP client is used. For more information, refer to the resource pack [README](../../README.md). For API related info : [`Azure Linked Services Docs`](https://docs.microsoft.com/en-us/rest/api/datafactory/linked-services/get).

## Availability

### Installation

This resource is available in the [InSpec Azure resource pack](https://github.com/inspec/inspec-azure). For an example, `inspec.yml` file and how to set up your Azure credentials, refer to resource pack [README](../../README.md#Service-Principal).

## Syntax

`resource_group`, `linked_service_name`, and `factory_name` are required parameters.

```ruby
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, factory_name: `FACTORY_NAME`, linked_service_name: `LINKED_SERVICE_NAME`) do
end
```

## Parameters

| Name | Description |
|--------------------------------|-----------------------------------------------------------------------------------|
| resource_group | Azure resource group that the targeted resource resides in. |
| factory_name | The factory name. |
| linked_service_name | The name of the linked service. |

All the parameter sets are required for a valid query:

- `resource_group` , `factory_name`, and `linked_service_name`.

## Properties

| Name | Description |
|--------------------------------|----------------------------------------------------------------------------------|
| name | Name of the Azure resource to test. |
| type | The resource type. |
| linked_service_type | The linked services type. |
| type_properties | The properties of linked service type. |
| properties | The properties of the resource. |

## Examples

### Test that a Linked Service exists

```ruby
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, factory_name: `FACTORY_NAME`, linked_service_name: `LINKED_SERVICE_NAME`) do
it { should exist }
end
```

### Test that a linked service does not exist

```ruby
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, factory_name: `FACTORY_NAME`, linked_service_name: 'should not exit') do
it { should_not exist }
end
```

### Test properties of a linked service

```ruby
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, name: 'FACTORY_NAME') do
its('name') { should eq linked_service_name1 }
its('type') { should eq 'Microsoft.DataFactory/factories/linkedservices' }
its('linked_service_type') { should eq 'MYSQL' }
end
```

## Azure Permissions

Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `contributor` role on the subscription you wish to test.
86 changes: 86 additions & 0 deletions docs/resources/azure_data_factory_linked_services.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: About the azure_data_factory_linked_service Resource
platform: azure
---

# azure_data_factory_linked_service

Use the `azure_data_factory_linked_service` InSpec audit resource to test the properties related to linked services for a resource group or the entire subscription.

## Azure REST API Version, Endpoint, and HTTP Client Parameters

This resource interacts with API versions supported by the resource provider. The `api_version` is defined as a resource parameter. If not provided, the latest version is used. For more information, refer to [`azure_generic_resource`](azure_generic_resource.md).

Unless defined, `azure_cloud` global endpoint and default values for the HTTP client is used. For more information, refer to the resource pack [README](../../README.md). For information on API, refer [`Azure Linked Services Docs`](https://docs.microsoft.com/en-us/rest/api/datafactory/linked-services/list-by-factory).

## Availability

### Installation

This resource is available in the [InSpec Azure resource pack](https://github.com/inspec/inspec-azure). For an example, `inspec.yml` file and how to set up your Azure credentials, refer to resource pack [README](../../README.md#Service-Principal).

## Syntax

An `azure_data_factory_linked_service` resource block returns all Azure Linked Services, either within a Resource Group (if provided), or within an entire Subscription.

```ruby
describe (resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
#...
end
```

`resource_group` and `factory_name` are required parameters.

## Parameters

| Name | Description |
|--------------------------------|-----------------------------------------------------------------------------------|
| resource_group | Azure resource group that the targeted resource resides in. |
| factory_name | Azure factory name for which linked services are retrived. |

## Properties

| Property | Description | Filter Criteria<superscript>*</superscript> |
|-----------------|---------------------------------------------------------|-----------------------|
| names | A list of the unique resource names. | `name` |
| ids | A list of Linked Services IDs. | `id` |
| properties | A list of properties for the resource | `properties` |
| provisioning_states | The linked services provisioning state. | `provisioning_state` |
| linked_service_types | The type of linked service resource. | `linked_service_type` |
| type_properties | The linked service type of properties. | `type_properties` |

<superscript>*</superscript> For information on how to use filter criteria on plural resources, refer to [FilterTable usage](https://github.com/inspec/inspec/blob/master/dev-docs/filtertable-usage.md).

## Examples

### Test if any linked services exist in the resource group

```ruby
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
it { should exist }
its('names') { should include "factory_name" }
end
```

### Test that there aren't any Linked Services in a resource group

```ruby
# Should not exist if no Linked Services are in the resource group
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
it { should_not exist }
end
```

### Filter Linked Services in a resource group by properties

```ruby
describe azure_data_factory_linked_service(resource_group: `RESOURCE_GROUP`, factory_name: 'FACTORY_NAME') do
its('names') { should include linked_service_name1 }
its('types') { should include 'Microsoft.DataFactory/factories/linkedservices' }
its('linked_service_types') { should include('MySql') }
end
```

## Azure Permissions

Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `contributor` role on the subscription you wish to test.
2 changes: 1 addition & 1 deletion docs/resources/azure_ddos_protection_resource.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: About the azure_ddos_protection_resource Resource
platform: azure
---
---

# azure_ddos_protection_resource

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/azure_ddos_protection_resources.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: About the azure_ddos_protection_resources Resource
platform: azure
---
---

# azure_ddos_protection_resources

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/azure_dns_zones_resource.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: About the azure_dns_zones_resource Resource
platform: azure
---
---

# azure_dns_zones_resource

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/azure_dns_zones_resources.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: About the azure_dns_zones_resources Resource
platform: azure
---
---

# azure_dns_zones_resources

Expand Down
Loading

0 comments on commit 0b084b7

Please sign in to comment.