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_iothub. Closes #214 #232

Merged
merged 6 commits into from
Aug 6, 2021
Merged

Add table azure_iothub. Closes #214 #232

merged 6 commits into from
Aug 6, 2021

Conversation

bigdatasourav
Copy link
Contributor

@bigdatasourav bigdatasourav commented Aug 5, 2021

Integration test logs

Logs
SETUP: tests/azure_iothub []

PRETEST: tests/azure_iothub

TEST: tests/azure_iothub
Running terraform
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 3s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696]
azurerm_eventhub_namespace.named_test_resource: Creating...
azurerm_storage_account.named_test_resource: Creating...
azurerm_eventhub_namespace.named_test_resource: Still creating... [10s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [10s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [20s elapsed]
azurerm_eventhub_namespace.named_test_resource: Still creating... [20s elapsed]
azurerm_storage_account.named_test_resource: Still creating... [30s elapsed]
azurerm_eventhub_namespace.named_test_resource: Still creating... [30s elapsed]
azurerm_storage_account.named_test_resource: Creation complete after 36s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.Storage/storageAccounts/turbottest64696]
azurerm_storage_container.named_test_resource: Creating...
azurerm_storage_container.named_test_resource: Creation complete after 3s [id=https://turbottest64696.blob.core.windows.net/turbottest64696]
azurerm_eventhub_namespace.named_test_resource: Still creating... [40s elapsed]
azurerm_eventhub_namespace.named_test_resource: Still creating... [50s elapsed]
azurerm_eventhub_namespace.named_test_resource: Still creating... [1m0s elapsed]
azurerm_eventhub_namespace.named_test_resource: Still creating... [1m10s elapsed]
azurerm_eventhub_namespace.named_test_resource: Creation complete after 1m15s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.EventHub/namespaces/turbottest64696]
azurerm_eventhub.named_test_resource: Creating...
azurerm_eventhub.named_test_resource: Creation complete after 6s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.EventHub/namespaces/turbottest64696/eventhubs/turbottest64696]
azurerm_eventhub_authorization_rule.named_test_resource: Creating...
azurerm_eventhub_authorization_rule.named_test_resource: Creation complete after 7s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.EventHub/namespaces/turbottest64696/eventhubs/turbottest64696/authorizationRules/turbottest64696]
azurerm_iothub.named_test_resource: Creating...
azurerm_iothub.named_test_resource: Still creating... [10s elapsed]
azurerm_iothub.named_test_resource: Still creating... [20s elapsed]
azurerm_iothub.named_test_resource: Still creating... [30s elapsed]
azurerm_iothub.named_test_resource: Still creating... [40s elapsed]
azurerm_iothub.named_test_resource: Still creating... [50s elapsed]
azurerm_iothub.named_test_resource: Still creating... [1m0s elapsed]
azurerm_iothub.named_test_resource: Still creating... [1m10s elapsed]
azurerm_iothub.named_test_resource: Still creating... [1m20s elapsed]
azurerm_iothub.named_test_resource: Still creating... [1m30s elapsed]
azurerm_iothub.named_test_resource: Still creating... [1m40s elapsed]
azurerm_iothub.named_test_resource: Still creating... [1m50s elapsed]
azurerm_iothub.named_test_resource: Still creating... [2m0s elapsed]
azurerm_iothub.named_test_resource: Still creating... [2m10s elapsed]
azurerm_iothub.named_test_resource: Still creating... [2m20s elapsed]
azurerm_iothub.named_test_resource: Still creating... [2m30s elapsed]
azurerm_iothub.named_test_resource: Still creating... [2m40s elapsed]
azurerm_iothub.named_test_resource: Still creating... [2m50s elapsed]
azurerm_iothub.named_test_resource: Still creating... [3m0s elapsed]
azurerm_iothub.named_test_resource: Still creating... [3m10s elapsed]
azurerm_iothub.named_test_resource: Creation complete after 3m14s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.Devices/IotHubs/turbottest64696]

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 21, in provider "azurerm":
  21:   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: 7 added, 0 changed, 0 destroyed.

Outputs:

location = "eastus"
resource_aka = "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.Devices/IotHubs/turbottest64696"
resource_aka_lower = "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest64696/providers/microsoft.devices/iothubs/turbottest64696"
resource_id = "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.Devices/IotHubs/turbottest64696"
resource_name = "turbottest64696"
subscription_id = "d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8"

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

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest64696/providers/Microsoft.Devices/IotHubs/turbottest64696",
    "name": "turbottest64696",
    "type": "Microsoft.Devices/IotHubs"
  }
]
✔ 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/turbottest64696/providers/Microsoft.Devices/IotHubs/turbottest64696",
      "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest64696/providers/microsoft.devices/iothubs/turbottest64696"
    ],
    "name": "turbottest64696",
    "title": "turbottest64696"
  }
]
✔ PASSED

POSTTEST: tests/azure_iothub

TEARDOWN: tests/azure_iothub

SUMMARY:

1/1 passed.

Example query results

Results
> select
  name,
  id,
  region,
  type
from
  azure_iothub;
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------+
| name            | id                                                                                                                                     | region | type                      |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------+
| turbottest58802 | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest58802/providers/Microsoft.Devices/IotHubs/turbottest58802 | eastus | Microsoft.Devices/IotHubs |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------+
> select
  name,
  id,
  region,
  type
from
  azure_iothub
where
  state <> 'Active';
+------+----+--------+------+
| name | id | region | type |
+------+----+--------+------+
+------+----+--------+------+
> select
  name,
  id,
  region,
  type
from
  azure_iothub
where
  state = 'Active';
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------+
| name            | id                                                                                                                                     | region | type                      |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------+
| turbottest58802 | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest58802/providers/Microsoft.Devices/IotHubs/turbottest58802 | eastus | Microsoft.Devices/IotHubs |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+--------+---------------------------+

bigdatasourav added 2 commits August 4, 2021 13:52
@bigdatasourav bigdatasourav self-assigned this Aug 5, 2021
bigdatasourav added 2 commits August 5, 2021 13:42
@bigdatasourav bigdatasourav linked an issue Aug 5, 2021 that may be closed by this pull request
},
{
Name: "public_network_access",
Description: "Whether requests from public network are allowed.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Description: "Whether requests from public network are allowed.",
Description: "Indicates whether requests from public network are allowed.",

},
{
Name: "enable_file_upload_notifications",
Description: "If True, file upload notifications are enabled for the iot hub.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Description: "If True, file upload notifications are enabled for the iot hub.",
Description: "Indicates if file upload notifications are enabled for the iot hub.",

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

@bigdatasourav bigdatasourav merged commit 37f5b2d into main Aug 6, 2021
@bigdatasourav bigdatasourav deleted the issue-214 branch August 6, 2021 11:25
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_iothub
3 participants