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

Change the column type for read_scale & create_mode in azure_sql_database. closes #454 #459

Merged
merged 4 commits into from
Apr 1, 2022

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Apr 1, 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_sql_database []

PRETEST: tests/azure_sql_database

TEST: tests/azure_sql_database
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 4s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068]
azurerm_sql_server.named_test_resource: Creating...
azurerm_sql_server.named_test_resource: Still creating... [10s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [20s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [30s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [40s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [50s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [1m0s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [1m10s elapsed]
azurerm_sql_server.named_test_resource: Still creating... [1m20s elapsed]
azurerm_sql_server.named_test_resource: Creation complete after 1m22s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068]
azurerm_sql_database.named_test_resource: Creating...
azurerm_sql_database.named_test_resource: Still creating... [10s elapsed]
azurerm_sql_database.named_test_resource: Still creating... [20s elapsed]
azurerm_sql_database.named_test_resource: Still creating... [30s elapsed]
azurerm_sql_database.named_test_resource: Still creating... [40s elapsed]
azurerm_sql_database.named_test_resource: Still creating... [50s elapsed]
azurerm_sql_database.named_test_resource: Still creating... [1m0s elapsed]
azurerm_sql_database.named_test_resource: Still creating... [1m10s elapsed]
azurerm_sql_database.named_test_resource: Creation complete after 1m10s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068]

Warning: Deprecated Resource

  on variables.tf line 35, in data "null_data_source" "resource":
  35: 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 2 more similar warnings elsewhere)


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

Outputs:

resource_aka = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068
resource_aka_lower = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest92068/providers/microsoft.sql/servers/turbottest92068/databases/turbottest92068
resource_creation_date = 2022-04-01T06:35:19.92Z
resource_default_secondary_location = West US
resource_id = /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068
resource_location = East US
resource_name = turbottest92068
resource_region = east us
subscription_id = d46d7416-f95f-4771-bbb5-529d4c76659c

Running SQL query: test-get-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest92068/providers/microsoft.sql/servers/turbottest92068/databases/turbottest92068"
    ],
    "containment_state": 2,
    "default_secondary_location": "West US",
    "earliest_restore_date": null,
    "edition": "GeneralPurpose",
    "elastic_pool_name": null,
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068",
    "location": "East US",
    "max_size_bytes": "34359738368",
    "name": "turbottest92068",
    "region": "east us",
    "requested_service_objective_name": "GP_Gen5_2",
    "resource_group": "turbottest92068",
    "server_name": "turbottest92068",
    "service_level_objective": "GP_Gen5_2",
    "status": "Online",
    "subscription_id": "d46d7416-f95f-4771-bbb5-529d4c76659c",
    "tags": {
      "foo": "bar"
    },
    "title": "turbottest92068",
    "transparent_data_encryption": {
      "status": "Enabled"
    },
    "type": "Microsoft.Sql/servers/databases",
    "zone_redundant": false
  }
]
✔ PASSED

Running SQL query: test-hydrate-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068",
    "name": "turbottest92068",
    "server_name": "turbottest92068",
    "transparent_data_encryption": {
      "status": "Enabled"
    }
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068",
    "location": "East US",
    "name": "turbottest92068",
    "resource_group": "turbottest92068",
    "server_name": "turbottest92068"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest92068/providers/Microsoft.Sql/servers/turbottest92068/databases/turbottest92068",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest92068/providers/microsoft.sql/servers/turbottest92068/databases/turbottest92068"
    ],
    "name": "turbottest92068",
    "tags": {
      "foo": "bar"
    },
    "title": "turbottest92068"
  }
]
✔ PASSED

POSTTEST: tests/azure_sql_database

TEARDOWN: tests/azure_sql_database

SUMMARY:

1/1 passed.

Example query results

Results
> select name, server_name, read_scale, create_mode from azure_sql_database
+--------+-----------------+------------+-------------+
| name   | server_name     | read_scale | create_mode |
+--------+-----------------+------------+-------------+
| master | turbottest92068 | Disabled   |             |
| master | test-turbot     | Disabled   |             |
| tte5s6 | test-turbot     | Disabled   |             |
+--------+-----------------+------------+-------------+

@ParthaI ParthaI self-assigned this Apr 1, 2022
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

@bigdatasourav bigdatasourav merged commit 4c812e7 into main Apr 1, 2022
@bigdatasourav bigdatasourav deleted the issue-454 branch April 1, 2022 09:21
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.

Change the column type for read_scale & create_mode in azure_sql_database
2 participants