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_logic_app_workflow. Closes #213 #230

Merged
merged 6 commits into from
Aug 5, 2021
Merged

Conversation

bigdatasourav
Copy link
Contributor

@bigdatasourav bigdatasourav commented Aug 4, 2021

Integration test logs

Logs
SETUP: tests/azure_logic_app_workflow []

PRETEST: tests/azure_logic_app_workflow

TEST: tests/azure_logic_app_workflow
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/turbottest62834]
azurerm_logic_app_workflow.named_test_resource: Creating...
azurerm_logic_app_workflow.named_test_resource: Still creating... [10s elapsed]
azurerm_logic_app_workflow.named_test_resource: Creation complete after 12s [id=/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest62834/providers/Microsoft.Logic/workflows/turbottest62834]

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: 2 added, 0 changed, 0 destroyed.

Outputs:

location = "eastus"
resource_aka = "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest62834/providers/Microsoft.Logic/workflows/turbottest62834"
resource_aka_lower = "azure:///subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourcegroups/turbottest62834/providers/microsoft.logic/workflows/turbottest62834"
resource_id = "/subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest62834/providers/Microsoft.Logic/workflows/turbottest62834"
resource_name = "turbottest62834"
subscription_id = "d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8"

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

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

POSTTEST: tests/azure_logic_app_workflow

TEARDOWN: tests/azure_logic_app_workflow

SUMMARY:

1/1 passed.

Example query results

Results
> select
  name,
  id,
  state,
  type
from
  azure_logic_app_workflow;
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+
| name            | id                                                                                                                                     | state   | type                      |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+
| turbottest63531 | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest63531/providers/Microsoft.Logic/workflows/turbottest63531 | Enabled | Microsoft.Logic/workflows |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+

> select
  name,
  id,
  state,
  type
from
  azure_logic_app_workflow
where
  state = 'Disabled';
+------+----+-------+------+
| name | id | state | type |
+------+----+-------+------+
+------+----+-------+------+
> select
  name,
  id,
  state,
  type
from
  azure_logic_app_workflow
where
  state = 'Enabled';
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+
| name            | id                                                                                                                                     | state   | type                      |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+
| turbottest63531 | /subscriptions/d7245080-b4ae-4fe5-b6fa-2e71b3dae6c8/resourceGroups/turbottest63531/providers/Microsoft.Logic/workflows/turbottest63531 | Enabled | Microsoft.Logic/workflows |
+-----------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+

bigdatasourav added 2 commits August 4, 2021 14:38
@bigdatasourav bigdatasourav self-assigned this Aug 4, 2021
@bigdatasourav bigdatasourav linked an issue Aug 4, 2021 that may be closed by this pull request
bigdatasourav added 2 commits August 4, 2021 16:48
},
{
Name: "provisioning_state",
Description: "Workflow provisioning state.",
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: "Workflow provisioning state.",
Description: "The provisioning state of the workflow.",

},
{
Name: "created_time",
Description: "Specifies the time, the workflow was created.",
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: "Specifies the time, the workflow was created.",
Description: "The time the workflow was created.",

Get: &plugin.GetConfig{
KeyColumns: plugin.AllColumns([]string{"name", "resource_group"}),
Hydrate: getLogicAppWorkflow,
ShouldIgnoreError: isNotFoundError([]string{"ResourceNotFound", "ResourceGroupNotFound"}),
Copy link
Contributor

Choose a reason for hiding this comment

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

In case of invalid input to name we are getting 400 error code , please check handle this error code.

Copy link
Contributor

@khushboo9024 khushboo9024 left a comment

Choose a reason for hiding this comment

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

Please see comments.

bigdatasourav added 2 commits August 5, 2021 18:08
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

@rajlearner17 rajlearner17 reopened this Aug 5, 2021
@bigdatasourav bigdatasourav reopened this Aug 5, 2021
@bigdatasourav bigdatasourav merged commit 088826c into main Aug 5, 2021
@bigdatasourav bigdatasourav deleted the issue-213 branch August 5, 2021 13:57
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_logic_app_workflow
3 participants