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

Fix column access_control inconsistent state in table azure_logic_app_workflow closes #484 #486

Merged
merged 4 commits into from
Jun 1, 2022

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented May 6, 2022

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_logic_app_workflow []

PRETEST: tests/azure_logic_app_workflow

TEST: tests/azure_logic_app_workflow
Running terraform
data.azurerm_client_config.current: Refreshing state...
data.null_data_source.resource: Refreshing state...
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 5s [id=/subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107]
azurerm_logic_app_workflow.named_test_resource: Creating...
azurerm_logic_app_workflow.named_test_resource: Creation complete after 8s [id=/subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107/providers/Microsoft.Logic/workflows/turbottest70107]

Warning: Deprecated Resource

  on variables.tf line 29, in data "null_data_source" "resource":
  29: 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


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

Outputs:

location = eastus
resource_aka = azure:///subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107/providers/Microsoft.Logic/workflows/turbottest70107
resource_aka_lower = azure:///subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourcegroups/turbottest70107/providers/microsoft.logic/workflows/turbottest70107
resource_id = /subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107/providers/Microsoft.Logic/workflows/turbottest70107
resource_name = turbottest70107
subscription_id = f5t37416-f95f-4771-bbb5-529d4c76ef46

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107/providers/Microsoft.Logic/workflows/turbottest70107",
    "name": "turbottest70107",
    "region": "eastus",
    "resource_group": "turbottest70107",
    "subscription_id": "f5t37416-f95f-4771-bbb5-529d4c76ef46",
    "type": "Microsoft.Logic/workflows"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107/providers/Microsoft.Logic/workflows/turbottest70107",
    "name": "turbottest70107",
    "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/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourceGroups/turbottest70107/providers/Microsoft.Logic/workflows/turbottest70107",
      "azure:///subscriptions/f5t37416-f95f-4771-bbb5-529d4c76ef46/resourcegroups/turbottest70107/providers/microsoft.logic/workflows/turbottest70107"
    ],
    "name": "turbottest70107",
    "title": "turbottest70107"
  }
]
✔ PASSED

POSTTEST: tests/azure_logic_app_workflow

TEARDOWN: tests/azure_logic_app_workflow

SUMMARY:

1/1 passed.

Example query results

Results
After the creation of logic app  workflow
> select access_control from azure_logic_app_workflow
+----------------+
| access_control |
+----------------+
| <null>         |
+----------------+
After configuring the access control to a IP range

> select access_control from azure_logic_app_workflow
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| access_control                                                                                                                                                   |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"actions":{"allowedCallerIpAddresses":[{"addressRange":"123.123.123.123/32"}]},"triggers":{"allowedCallerIpAddresses":[{"addressRange":"123.123.123.123/32"}]}} |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
After modifying the access control to any IP

> select access_control from azure_logic_app_workflow
+----------------+
| access_control |
+----------------+
| <null>         |
+----------------+

@ParthaI ParthaI requested a review from bigdatasourav May 6, 2022 11:04
@ParthaI ParthaI self-assigned this May 6, 2022
Copy link
Contributor

@cbruno10 cbruno10 left a comment

Choose a reason for hiding this comment

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

@ParthaI Please see comments - I didn't review any of the functionality though, so @bigdatasourav should still do that.

azure/table_azure_logic_app_workflow.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bigdatasourav bigdatasourav left a comment

Choose a reason for hiding this comment

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

LGTM

@misraved misraved merged commit b02009d into main Jun 1, 2022
@misraved misraved deleted the issue-484 branch June 1, 2022 06:40
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.

Fix column access_control inconsistent state in table azure_logic_app_workflow
4 participants