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_automation_account closes #562 #569

Merged
merged 6 commits into from
Feb 22, 2023
Merged

Add table azure_automation_account closes #562 #569

merged 6 commits into from
Feb 22, 2023

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Feb 17, 2023

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

PRETEST: tests/azure_automation_account

TEST: tests/azure_automation_account
Running terraform
data.azurerm_client_config.current: Reading...
data.azurerm_client_config.current: Read complete after 0s [id=Y2xpZW50Q29uZmlncy9jbGllbnRJZD0wNGIwNzc5NS04ZGRiLTQ2MWEtYmJlZS0wMmY5ZTFiZjdiNDY7b2JqZWN0SWQ9MDZmZDQ2YjAtYTg2Ny00OWExLWE0ZjEtZjc3Njg0NjVjYWJhO3N1YnNjcmlwdGlvbklkPWQ0NmQ3NDE2LWY5NWYtNDc3MS1iYmI1LTUyOWQ0Yzc2NjU5Yzt0ZW5hbnRJZD1jZGZmZDcwOC03ZGEwLTRjZWEtYWJlYi0wYTRjMzM0ZDdmNjQ=]
data.null_data_source.resource: Reading...
data.null_data_source.resource: Read complete after 0s [id=static]

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_automation_account.named_test_resource will be created
  + resource "azurerm_automation_account" "named_test_resource" {
      + dsc_primary_access_key        = (sensitive value)
      + dsc_secondary_access_key      = (sensitive value)
      + dsc_server_endpoint           = (known after apply)
      + hybrid_service_url            = (known after apply)
      + id                            = (known after apply)
      + local_authentication_enabled  = true
      + location                      = "eastus"
      + name                          = "turbottest2126"
      + private_endpoint_connection   = (known after apply)
      + public_network_access_enabled = true
      + resource_group_name           = "turbottest2126"
      + sku_name                      = "Basic"
      + tags                          = {
          + "name" = "turbottest2126"
        }

      + encryption {
          + key_source                = (known after apply)
          + key_vault_key_id          = (known after apply)
          + user_assigned_identity_id = (known after apply)
        }
    }

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

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

Changes to Outputs:
  + location           = "eastus"
  + resource_aka       = (known after apply)
  + resource_aka_lower = (known after apply)
  + resource_id        = (known after apply)
  + resource_name      = "turbottest2126"
  + subscription_id    = "j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas"
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 6s [id=/subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126]
azurerm_automation_account.named_test_resource: Creating...
azurerm_automation_account.named_test_resource: Still creating... [10s elapsed]
azurerm_automation_account.named_test_resource: Creation complete after 10s [id=/subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126/providers/Microsoft.Automation/automationAccounts/turbottest2126]

Warning: Deprecated

  with data.null_data_source.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

(and one more similar warning elsewhere)

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

Outputs:

location = "eastus"
resource_aka = "azure:///subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126/providers/Microsoft.Automation/automationAccounts/turbottest2126"
resource_aka_lower = "azure:///subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourcegroups/turbottest2126/providers/microsoft.automation/automationaccounts/turbottest2126"
resource_id = "/subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126/providers/Microsoft.Automation/automationAccounts/turbottest2126"
resource_name = "turbottest2126"
subscription_id = "j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas"

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126/providers/Microsoft.Automation/automationAccounts/turbottest2126",
    "name": "turbottest2126",
    "region": "eastus",
    "resource_group": "turbottest2126",
    "subscription_id": "j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas",
    "type": "Microsoft.Automation/AutomationAccounts"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126/providers/Microsoft.Automation/automationAccounts/turbottest2126",
    "name": "turbottest2126",
    "type": "Microsoft.Automation/AutomationAccounts"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourceGroups/turbottest2126/providers/Microsoft.Automation/automationAccounts/turbottest2126",
      "azure:///subscriptions/j3847jrjf3-f95f-4771-bbb5-j3847jrjf3dsaas/resourcegroups/turbottest2126/providers/microsoft.automation/automationaccounts/turbottest2126"
    ],
    "name": "turbottest2126",
    "title": "turbottest2126"
  }
]
✔ PASSED

POSTTEST: tests/azure_automation_account

TEARDOWN: tests/azure_automation_account

SUMMARY:

1/1 passed.

Example query results

Results
> select * from azure_automation_account
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+--------+---------------------------+---------------------------+-----------
| name                    | id                                                                                                                                                     | description | etag   | creation_time             | last_modified_time        | last_modif
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+--------+---------------------------+---------------------------+-----------
| test-automation-account | /subscriptions/h3847h16-f95f-4771-bbb5-529d4c438748/resourceGroups/turbot_rg/providers/Microsoft.Automation/automationAccounts/test-automation-account | <null>      | <null> | 2023-02-17T11:10:09+05:30 | 2023-02-17T11:10:09+05:30 | <null>    
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+--------+---------------------------+---------------------------+-----------

@ParthaI ParthaI self-assigned this Feb 17, 2023
@ParthaI ParthaI linked an issue Feb 17, 2023 that may be closed by this pull request
@ParthaI ParthaI marked this pull request as draft February 17, 2023 05:52
@ParthaI ParthaI marked this pull request as ready for review February 21, 2023 07:47
Copy link
Contributor

@misraved misraved 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 take a look at the review comments. Thanks!!

azure/table_azure_automation_account.go Show resolved Hide resolved
azure/table_azure_automation_account.go Show resolved Hide resolved
},
{
Name: "id",
Description: "Fully qualified resource Id for the resource.",
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: "Fully qualified resource Id for the resource.",
Description: "Fully qualified resource ID.",

},
{
Name: "etag",
Description: "Gets or sets the etag of the resource.",
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: "Gets or sets the etag of the resource.",
Description: "Gets the etag of the resource.",

}

// In some cases resource does not give any notFound error
// instead of notFound error, it returns empty data
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
// instead of notFound error, it returns empty data
// instead it returns empty data

@misraved misraved merged commit c7ff737 into main Feb 22, 2023
@misraved misraved deleted the issue-562 branch February 22, 2023 15:01
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_automation_account
2 participants