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_eventgrid_topic. Closes #286 #352

Merged
merged 2 commits into from
Oct 1, 2021
Merged

Conversation

bigdatasourav
Copy link
Contributor

@bigdatasourav bigdatasourav commented Sep 29, 2021

Integration test logs

Logs

SETUP: tests/azure_eventgrid_topic []

PRETEST: tests/azure_eventgrid_topic

TEST: tests/azure_eventgrid_topic
Running terraform

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # azurerm_eventgrid_topic.named_test_resource will be created
  + resource "azurerm_eventgrid_topic" "named_test_resource" {
      + endpoint                      = (known after apply)
      + id                            = (known after apply)
      + input_schema                  = "EventGridSchema"
      + location                      = "westus"
      + name                          = "turbottest95395"
      + primary_access_key            = (sensitive value)
      + public_network_access_enabled = true
      + resource_group_name           = "turbottest95395"
      + secondary_access_key          = (sensitive value)
    }

  # azurerm_resource_group.named_test_resource will be created
  + resource "azurerm_resource_group" "named_test_resource" {
      + id       = (known after apply)
      + location = "westus"
      + name     = "turbottest95395"
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + resource_aka       = (known after apply)
  + resource_aka_lower = (known after apply)
  + resource_id        = (known after apply)
  + resource_name      = "turbottest95395"
  + subscription_id    = "d46d7416-f95f-4771-bbb5-529d4c76659c"
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 5s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395]
azurerm_eventgrid_topic.named_test_resource: Creating...
azurerm_eventgrid_topic.named_test_resource: Still creating... [10s elapsed]
azurerm_eventgrid_topic.named_test_resource: Still creating... [20s elapsed]
azurerm_eventgrid_topic.named_test_resource: Still creating... [30s elapsed]
azurerm_eventgrid_topic.named_test_resource: Creation complete after 31s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395/providers/Microsoft.EventGrid/topics/turbottest95395]

Warning: Deprecated Resource

  with data.null_data_source.resource,
  on variable.tf line 27, in data "null_data_source" "resource":
  27: data "null_data_source" "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

(and one more similar warning elsewhere)

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

Outputs:

resource_aka = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395/providers/Microsoft.EventGrid/topics/turbottest95395"
resource_aka_lower = "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest95395/providers/microsoft.eventgrid/topics/turbottest95395"
resource_id = "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395/providers/Microsoft.EventGrid/topics/turbottest95395"
resource_name = "turbottest95395"
subscription_id = "d46d7416-f95f-4771-bbb5-529d4c76659c"

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395/providers/Microsoft.EventGrid/topics/turbottest95395",
    "name": "turbottest95395",
    "type": "Microsoft.EventGrid/topics"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395/providers/Microsoft.EventGrid/topics/turbottest95395",
    "name": "turbottest95395"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest95395/providers/Microsoft.EventGrid/topics/turbottest95395",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest95395/providers/microsoft.eventgrid/topics/turbottest95395"
    ],
    "name": "turbottest95395",
    "title": "turbottest95395"
  }
]
✔ PASSED

POSTTEST: tests/azure_eventgrid_topic

TEARDOWN: tests/azure_eventgrid_topic

SUMMARY:

1/1 passed.

Example query results

Results
> select
  name,
  id,
  type,
  provisioning_state
from
  azure_eventgrid_topic;
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------+
| name     | id                                                                                                                               | type                       | provisioning_state |
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------+
| tertnist | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/nist-test_group/providers/Microsoft.EventGrid/topics/tertnist | Microsoft.EventGrid/topics | Succeeded          |
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------+
> select
  name,
  id,
  type,
  private_endpoint_connections
from
  azure_eventgrid_topic
where
  private_endpoint_connections is null;
+------+----+------+------------------------------+
| name | id | type | private_endpoint_connections |
+------+----+------+------------------------------+
+------+----+------+------------------------------+
> select
  name,
  id,
  type,
  private_endpoint_connections
from
  azure_eventgrid_topic
where
  private_endpoint_connections is not null;
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------------------
| name     | id                                                                                                                               | type                       | private_endpoint_connections   
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------------------
| tertnist | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/nist-test_group/providers/Microsoft.EventGrid/topics/tertnist | Microsoft.EventGrid/topics | [{"endpointId":"/subscriptions/
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------------------
> select
  name,
  id,
  type,
  disable_local_auth
from
  azure_eventgrid_topic
where
  disable_local_auth;
+------+----+------+--------------------+
| name | id | type | disable_local_auth |
+------+----+------+--------------------+
+------+----+------+--------------------+
> select
  name,
  id,
  type,
  disable_local_auth
from
  azure_eventgrid_topic
where
  not disable_local_auth;
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------+
| name     | id                                                                                                                               | type                       | disable_local_auth |
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------+
| tertnist | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/nist-test_group/providers/Microsoft.EventGrid/topics/tertnist | Microsoft.EventGrid/topics | false              |
+----------+----------------------------------------------------------------------------------------------------------------------------------+----------------------------+--------------------+

@bigdatasourav bigdatasourav self-assigned this Sep 29, 2021
@bigdatasourav bigdatasourav linked an issue Sep 29, 2021 that may be closed by this pull request
Copy link
Contributor

@ParthaI ParthaI 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 34def50 into main Oct 1, 2021
@bigdatasourav bigdatasourav deleted the issue-286 branch October 1, 2021 05:17
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_eventgrid_topic
2 participants