Skip to content

Commit

Permalink
Add table azure_data_lake_analytics_account. Closes turbot#245 (turbo…
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdatasourav authored Aug 12, 2021
1 parent 081dae3 commit 61c11a5
Show file tree
Hide file tree
Showing 14 changed files with 524 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"id": "{{ output.resource_id.value }}",
"name": "{{ resourceName }}",
"resource_group": "{{ resourceName }}",
"subscription_id": "{{ output.subscription_id.value }}",
"type": "Microsoft.DataLakeAnalytics/accounts"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name, id, type, resource_group, subscription_id
from azure.azure_data_lake_analytics_account
where name = '{{ resourceName }}' and resource_group = '{{ resourceName }}';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"id": "{{ output.resource_id.value }}",
"name": "{{ resourceName }}",
"type": "Microsoft.DataLakeAnalytics/accounts"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name, id, type
from azure.azure_data_lake_analytics_account
where name = '{{ resourceName }}';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
null
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name
from azure.azure_data_lake_analytics_account
where name = 'dummy-{{ resourceName }}' and resource_group = '{{ resourceName }}';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"akas": [
"{{ output.resource_aka.value }}",
"{{ output.resource_aka_lower.value }}"
],
"title": "{{ resourceName }}"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select title, akas
from azure.azure_data_lake_analytics_account
where name = '{{ resourceName }}' and resource_group = '{{ resourceName }}';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
73 changes: 73 additions & 0 deletions azure-test/tests/azure_data_lake_analytics_account/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
variable "resource_name" {
type = string
default = "steampipe-test"
description = "Name of the resource used throughout the test."
}

variable "azure_environment" {
type = string
default = "public"
description = "Azure environment used for the test."
}

variable "azure_subscription" {
type = string
default = "3510ae4d-530b-497d-8f30-53b9616fc6c1"
description = "Azure subscription used for the test."
}

provider "azurerm" {
# Cannot be passed as a variable
version = "=1.36.0"
environment = var.azure_environment
subscription_id = var.azure_subscription
}

data "azurerm_client_config" "current" {}

data "null_data_source" "resource" {
inputs = {
scope = "azure:///subscriptions/${data.azurerm_client_config.current.subscription_id}"
}
}

resource "azurerm_resource_group" "named_test_resource" {
name = var.resource_name
location = "East US2"
}

resource "azurerm_data_lake_store" "named_test_resource" {
name = var.resource_name
resource_group_name = azurerm_resource_group.named_test_resource.name
location = azurerm_resource_group.named_test_resource.location
encryption_state = "Enabled"
encryption_type = "ServiceManaged"
}

resource "azurerm_data_lake_analytics_account" "named_test_resource" {
name = var.resource_name
resource_group_name = azurerm_resource_group.named_test_resource.name
location = azurerm_resource_group.named_test_resource.location

default_store_account_name = azurerm_data_lake_store.named_test_resource.name
}

output "resource_aka" {
value = "azure://${azurerm_data_lake_analytics_account.named_test_resource.id}"
}

output "resource_aka_lower" {
value = "azure://${lower(azurerm_data_lake_analytics_account.named_test_resource.id)}"
}

output "resource_name" {
value = var.resource_name
}

output "resource_id" {
value = azurerm_data_lake_analytics_account.named_test_resource.id
}

output "subscription_id" {
value = var.azure_subscription
}
1 change: 1 addition & 0 deletions azure/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func Plugin(ctx context.Context) *plugin.Plugin {
"azure_data_factory": tableAzureDataFactory(ctx),
"azure_data_factory_dataset": tableAzureDataFactoryDataset(ctx),
"azure_data_factory_pipeline": tableAzureDataFactoryPipeline(ctx),
"azure_data_lake_analytics_account": tableAzureDataLakeAnalyticsAccount(ctx),
"azure_data_lake_store": tableAzureDataLakeStore(ctx),
"azure_diagnostic_setting": tableAzureDiagnosticSetting(ctx),
"azure_eventhub_namespace": tableAzureEventHubNamespace(ctx),
Expand Down
Loading

0 comments on commit 61c11a5

Please sign in to comment.