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 table azure_data_factory. Closes #156 #158

Merged
merged 5 commits into from
Jul 8, 2021
Merged

Add table azure_data_factory. Closes #156 #158

merged 5 commits into from
Jul 8, 2021

Conversation

rajeshbal65
Copy link
Contributor

Integration test logs

Logs
No env file present for the current environment:  staging
 Falling back to .env config
No env file present for the current environment:  staging
customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined

SETUP: tests/azure_data_factory []

PRETEST: tests/azure_data_factory

TEST: tests/azure_data_factory
Running terraform
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 4s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476]
azurerm_data_factory.named_test_resource: Creating...
azurerm_data_factory.named_test_resource: Still creating... [10s elapsed]
azurerm_data_factory.named_test_resource: Creation complete after 15s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476/providers/Microsoft.DataFactory/factories/turbottest69476]

Warning: Deprecated Resource

The null_data_source was historically used to construct intermediate values to
re-use elsewhere in configuration, the same can now be achieved using locals


Warning: Version constraints inside provider configuration blocks are deprecated

  on variables.tf line 22, in provider "azurerm":
  22:   version         = "=1.36.0"

Terraform 0.13 and earlier allowed provider version constraints inside the
provider configuration block, but that is now deprecated and will be removed
in a future version of Terraform. To silence this warning, move the provider
version constraint into the required_providers block.


Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Outputs:

resource_aka = "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476/providers/Microsoft.DataFactory/factories/turbottest69476"
resource_aka_lower = "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest69476/providers/microsoft.datafactory/factories/turbottest69476"
resource_id = "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476/providers/Microsoft.DataFactory/factories/turbottest69476"
resource_name = "turbottest69476"
subscription_id = "d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8"

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476/providers/Microsoft.DataFactory/factories/turbottest69476",
    "name": "turbottest69476",
    "region": "eastus",
    "resource_group": "turbottest69476",
    "subscription_id": "d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8",
    "tags": {
      "name": "turbottest69476"
    },
    "type": "Microsoft.DataFactory/factories"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476/providers/Microsoft.DataFactory/factories/turbottest69476",
    "name": "turbottest69476",
    "type": "Microsoft.DataFactory/factories"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql
null
✔ PASSED

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest69476/providers/Microsoft.DataFactory/factories/turbottest69476",
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest69476/providers/microsoft.datafactory/factories/turbottest69476"
    ],
    "name": "turbottest69476",
    "tags": {
      "name": "turbottest69476"
    },
    "title": "turbottest69476"
  }
]
✔ PASSED

POSTTEST: tests/azure_data_factory

TEARDOWN: tests/azure_data_factory

SUMMARY:

1/1 passed.

Example query results

Results
### Basic info

```sql
select
  name,
  id,
  type,
  provisioning_state,
  etag
from
  azure_data_factory;

+-------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+--------------------+----------------------------------------+
| name        | id                                                                                                                                 | type                            | provisioning_state | etag                                   |
+-------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+--------------------+----------------------------------------+
| test-rajesh | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbot_rg/providers/Microsoft.DataFactory/factories/test-rajesh | Microsoft.DataFactory/factories | Succeeded          | "90017c20-0000-0100-0000-60dbff910000" |
+-------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+--------------------+----------------------------------------+

List system assigned identity type Factories

select
  name,
  id,
  type,
  identity ->> 'type' as identity_type
from
  azure_data_factory
where
  identity ->> 'type' = 'SystemAssigned';

+-------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+----------------+
| name        | id                                                                                                                                 | type                            | identity_type  |
+-------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+----------------+
| test-rajesh | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbot_rg/providers/Microsoft.DataFactory/factories/test-rajesh | Microsoft.DataFactory/factories | SystemAssigned |
+-------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+----------------+

List factories with plubic network access is allowed

select
  name,
  id,
  type,
  public_network_access
from
  azure_data_factory
where
  public_network_access = 'Enabled';

+------+----+------+-----------------------+
| name | id | type | public_network_access |
+------+----+------+-----------------------+
+------+----+------+-----------------------+
</details>

@rajeshbal65 rajeshbal65 self-assigned this Jul 1, 2021
@rajeshbal65 rajeshbal65 linked an issue Jul 1, 2021 that may be closed by this pull request
Copy link
Contributor

@rajlearner17 rajlearner17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cbruno10 cbruno10 self-requested a review July 8, 2021 18:35
@cbruno10 cbruno10 merged commit b19fad1 into main Jul 8, 2021
@cbruno10 cbruno10 deleted the issue-156 branch July 8, 2021 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table azure_data_factory
4 participants