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_resource_link closes #211 #252

Merged
merged 7 commits into from
Aug 12, 2021
Merged

Add table azure_resource_link closes #211 #252

merged 7 commits into from
Aug 12, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 11, 2021

Integration test logs

Logs
Terraform doesn't support it.

Example query results

Results

Basic Info

select
  name,
  id,
  type,
  source_id,
  target_id
from
  azure_resource_link;
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name                                             | id                                                                                                                                                                                                                             | type                      | source_id                                                                                                                                  | target_id                                                                                                                                                                                                                                                                                                            |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ASR-Protect-c0ba105a-1669-4fcb-80fe-a3af89adbfb6 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/hipaa-hitrust/providers/microsoft.compute/virtualmachines/raj-test-lab/providers/Microsoft.Resources/links/ASR-Protect-c0ba105a-1669-4fcb-80fe-a3af89adbfb6 | Microsoft.Resources/links | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/hipaa-hitrust/providers/microsoft.compute/virtualmachines/raj-test-lab/ | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbot_rg/providers/microsoft.recoveryservices/vaults/vault789/replicationfabrics/asr-a2a-default-southindia/replicationprotectioncontainers/asr-a2a-default-southindia-container/replicationprotecteditems/c0ba105a-1669-4fcb-80fe-a3af89adbfb6/ |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

List of resource links with virtual machines

select
  name,
  id,
  source_id,
  target_id
from
  azure_resource_link
where
  source_id LIKE '%virtualmachines%';
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name                                             | id                                                                                                                                                                                                                             | type                      | source_id                                                                                                                                  | target_id                                                                                                                                                                                                                                                                                                            |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ASR-Protect-c0ba105a-1669-4fcb-80fe-a3af89adbfb6 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/hipaa-hitrust/providers/microsoft.compute/virtualmachines/raj-test-lab/providers/Microsoft.Resources/links/ASR-Protect-c0ba105a-1669-4fcb-80fe-a3af89adbfb6 | Microsoft.Resources/links | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/hipaa-hitrust/providers/microsoft.compute/virtualmachines/raj-test-lab/ | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbot_rg/providers/microsoft.recoveryservices/vaults/vault789/replicationfabrics/asr-a2a-default-southindia/replicationprotectioncontainers/asr-a2a-default-southindia-container/replicationprotecteditems/c0ba105a-1669-4fcb-80fe-a3af89adbfb6/ |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Get resource link by id

select name, id, source_id from azure_resource_link where id = '/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbot_rg/providers/microsoft.compute/virtualmachines/partha-test/providers/Microsoft.Resources/links/ASR-Protect-e5b8be2b-9136-47ad-a81d-7b3bb699ca53'
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------
| name                                             | id                                                                                                                                                     
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------
| ASR-Protect-e5b8be2b-9136-47ad-a81d-7b3bb699ca53 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbot_rg/providers/microsoft.compute/virtualmachines/partha-test/providers/Microsof
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------

@ParthaI ParthaI self-assigned this Aug 11, 2021
@ParthaI ParthaI linked an issue Aug 11, 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

@bigdatasourav bigdatasourav merged commit 118adc7 into main Aug 12, 2021
@bigdatasourav bigdatasourav deleted the issue-211 branch August 12, 2021 13:06
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_resource_link
4 participants