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

Added missing columns nat_gateway, service_public_ip_address, ip_configuration, and linked_public_ip_address to the table azure_public_ip Closes #828 #836

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 29, 2024

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

PRETEST: tests/azure_public_ip

TEST: tests/azure_public_ip
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_public_ip.named_test_resource will be created
  + resource "azurerm_public_ip" "named_test_resource" {
      + allocation_method       = "Static"
      + ddos_protection_mode    = "VirtualNetworkInherited"
      + fqdn                    = (known after apply)
      + id                      = (known after apply)
      + idle_timeout_in_minutes = 4
      + ip_address              = (known after apply)
      + ip_version              = "IPv4"
      + location                = "westus"
      + name                    = "turbottest95004"
      + resource_group_name     = "turbottest95004"
      + sku                     = "Basic"
      + sku_tier                = "Regional"
      + tags                    = {
          + "name" = "turbottest95004"
        }
    }

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

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

Changes to Outputs:
  + resource_aka       = (known after apply)
  + resource_aka_lower = (known after apply)
  + resource_id        = (known after apply)
  + resource_name      = "turbottest95004"
  + subscription_id    = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Still creating... [10s elapsed]
azurerm_resource_group.named_test_resource: Creation complete after 12s [id=/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004]
azurerm_public_ip.named_test_resource: Creating...
azurerm_public_ip.named_test_resource: Creation complete after 8s [id=/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004]

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 or the terraform_data resource type in Terraform 1.4 and later.

(and one more similar warning elsewhere)

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

Outputs:

resource_aka = "azure:///subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004"
resource_aka_lower = "azure:///subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/turbottest95004/providers/microsoft.network/publicipaddresses/turbottest95004"
resource_id = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004"
resource_name = "turbottest95004"
subscription_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Running SQL query: test-get-query.sql

Time: 1.6s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0.

Scans:
  1) azure_public_ip.azure: Time: 1.4s. Fetched: 1. Hydrates: 0. Quals: name=turbottest95004, resource_group=turbottest95004.

[
  {
    "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004",
    "name": "turbottest95004",
    "region": "westus",
    "resource_group": "turbottest95004",
    "type": "Microsoft.Network/publicIPAddresses"
  }
]
✔ PASSED

Running SQL query: test-hydrate-query.sql

Time: 1.5s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0.

Scans:
  1) azure_public_ip.azure: Time: 1.2s. Fetched: 1. Hydrates: 0. Quals: name=turbottest95004, resource_group=turbottest95004.

[
  {
    "akas": [
      "azure:///subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004",
      "azure:///subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/turbottest95004/providers/microsoft.network/publicipaddresses/turbottest95004"
    ],
    "name": "turbottest95004",
    "public_ip_allocation_method": "Static",
    "sku_name": "Basic",
    "tags": {
      "name": "turbottest95004"
    },
    "title": "turbottest95004"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql

Time: 1.9s. Rows returned: 1. Rows fetched: 4. Hydrate calls: 0.

Scans:
  1) azure_public_ip.azure: Time: 1.7s. Fetched: 4. Hydrates: 0. Quals: name=turbottest95004.

[
  {
    "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004",
    "name": "turbottest95004"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql

Time: 1.4s. Rows returned: 0.
[]
✔ PASSED

Running SQL query: test-turbot-query.sql

Time: 2.3s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0.

Scans:
  1) azure_public_ip.azure: Time: 2.1s. Fetched: 1. Hydrates: 0. Quals: name=turbottest95004, resource_group=turbottest95004.

[
  {
    "akas": [
      "azure:///subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/turbottest95004/providers/Microsoft.Network/publicIPAddresses/turbottest95004",
      "azure:///subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/turbottest95004/providers/microsoft.network/publicipaddresses/turbottest95004"
    ],
    "name": "turbottest95004",
    "tags": {
      "name": "turbottest95004"
    },
    "title": "turbottest95004"
  }
]
✔ PASSED

POSTTEST: tests/azure_public_ip

TEARDOWN: tests/azure_public_ip

SUMMARY:

1/1 passed.

Example query results

Results
> select name, ip_configuration_id from azure_public_ip
+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name    | ip_configuration_id                                                                                                                                                                    |
+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tesgss  | /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/new-rg/providers/Microsoft.Network/applicationGateways/test64443/frontendIPConfigurations/appGwPublicFrontendIpIPv4 |
| ewrwerw | /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/new-rg/providers/Microsoft.Network/applicationGateways/test5333/frontendIPConfigurations/appGwPublicFrontendIpIPv4  |
+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

> select name, delete_option, nat_gateway, service_public_ip_address, ip_configuration, linked_public_ip_address from azure_public_ip
+----------+---------------+-----------------------------------------------------------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------>
| name     | delete_option | nat_gateway                                                                                                                             | service_public_ip_address | ip_configuration                                                                                                       >
+----------+---------------+-----------------------------------------------------------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------>
| tesgss   |               | <null>                                                                                                                                  | <null>                    | {"id":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/new-rg/providers/Microsoft.Network/applicatio>
| test6633 |               | {"id":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/new-rg/providers/Microsoft.Network/natGateways/test55522233"} | <null>                    | <null>                                                                                                                 >
| ewrwerw  |               | <null>                                                                                                                                  | <null>                    | {"id":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/new-rg/providers/Microsoft.Network/applicatio>
+----------+---------------+-----------------------------------------------------------------------------------------------------------------------------------------+---------------------------+------------------------------------------------------------------------------------------------------------------------>

…ddress, ip_configuration, linked_public_ip_address to the table `azure_public_ip` Closes #828
@ParthaI ParthaI requested a review from misraved August 29, 2024 13:59
@ParthaI ParthaI self-assigned this Aug 29, 2024
@ParthaI ParthaI linked an issue Aug 29, 2024 that may be closed by this pull request
@misraved misraved changed the title Added missing columns delete_option, nat_gateway, service_public_ip_address, ip_configuration, and linked_public_ip_address to the table azure_public_ip Closes #828 Added missing columns nat_gateway, service_public_ip_address, ip_configuration, and linked_public_ip_address to the table azure_public_ip Closes #828 Sep 2, 2024
@misraved misraved merged commit 03fff51 into main Sep 2, 2024
1 check passed
@misraved misraved deleted the issue-828 branch September 2, 2024 05:44
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.

Missing detail in column ip_configuration_id in azure_public_ip table
2 participants