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 gcp_dns_record_set closes #209 #212

Merged
merged 11 commits into from
Jun 21, 2021
Merged

Add table gcp_dns_record_set closes #209 #212

merged 11 commits into from
Jun 21, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented May 21, 2021

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 300

SETUP: tests/gcp_dns_record_set []

PRETEST: tests/gcp_dns_record_set

TEST: tests/gcp_dns_record_set
Running terraform
data.google_client_config.current: Refreshing state...
data.null_data_source.resource: Refreshing state...
google_dns_managed_zone.named_test_resource: Creating...
google_dns_managed_zone.named_test_resource: Creation complete after 3s [id=projects/niteowl-aaa/managedZones/turbottest89164]
google_dns_record_set.named_test_resource: Creating...
google_dns_record_set.named_test_resource: Creation complete after 2s [id=projects/niteowl-aaa/managedZones/turbottest89164/rrsets/turbottest89164.turbot.com./A]

Warning: Deprecated 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


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

Outputs:

project_id = niteowl-aaa
record_set_name = turbottest89164.turbot.com.
resource_aka = gcp://dns.googleapis.com/projects/niteowl-aaa/managedZones/turbottest89164/rrsets/turbottest89164.turbot.com./A
resource_id = projects/niteowl-aaa/managedZones/turbottest89164/rrsets/turbottest89164.turbot.com./A
resource_name = turbottest89164

Running SQL query: test-get-query.sql
[
  {
    "location": "global",
    "managed_zone_name": "turbottest89164",
    "name": "turbottest89164.turbot.com.",
    "project": "niteowl-aaa",
    "title": "turbottest89164.turbot.com.",
    "ttl": 86400,
    "type": "A"
  }
]
✔ PASSED

Running SQL query: test-invalid-name-query.sql
null
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "managed_zone_name": "turbottest89164",
    "name": "turbottest89164.turbot.com.",
    "type": "A"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "gcp://dns.googleapis.com/projects/niteowl-aaa/managedZones/turbottest89164/rrsets/turbottest89164.turbot.com./A"
    ],
    "title": "turbottest89164.turbot.com."
  }
]
✔ PASSED

POSTTEST: tests/gcp_dns_record_set

TEARDOWN: tests/gcp_dns_record_set

SUMMARY:

1/1 passed.

Example query results

Results

Basic info

select
  name, 
  managedzone_name, 
  type, 
  kind, 
  routing_policy,
  rrdatas,
  signature_rrdatas,
  ttl
from
  gcp_dns_record_set;
+----------------------------+-------------------+------+-----------------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------+
| name                       | managed_zone_name | type | kind                  | routing_policy | rrdatas                                                                                                                               | signature_rrdatas | ttl   |
+----------------------------+-------------------+------+-----------------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------+
| turbot.com.                | test-dns-zone     | NS   | dns#resourceRecordSet | <null>         | ["ns-cloud-c1.googledomains.com.","ns-cloud-c2.googledomains.com.","ns-cloud-c3.googledomains.com.","ns-cloud-c4.googledomains.com."] | []                | 21600 |
| test-recordset.turbot.com. | test-dns-zone     | A    | dns#resourceRecordSet | <null>         | ["192.0.23.0"]                                                                                                                        | []                | 300   |
| turbot.com.                | test-dns-zone     | SOA  | dns#resourceRecordSet | <null>         | ["ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 3600 259200 300"]                                           | []                | 21600 |
+----------------------------+-------------------+------+-----------------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------+

List record sets of type 'A'

select
  name, 
  managedzone_name, 
  type, 
  kind, 
  routing_policy,
  rrdatas,
  signature_rrdatas,
  ttl
from
  gcp_dns_record_set
where 
 type = 'A'
+----------------------------+-------------------+----------------------------+------+-----------------------+----------------+-----+
| name                       | managed_zone_name | title                      | type | kind                  | routing_policy | ttl |
+----------------------------+-------------------+----------------------------+------+-----------------------+----------------+-----+
| test-recordset.turbot.com. | test-dns-zone     | test-recordset.turbot.com. | A    | dns#resourceRecordSet | <null>         | 300 |
+----------------------------+-------------------+----------------------------+------+-----------------------+----------------+-----+

Copy link
Contributor

@Subhajit97 Subhajit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParthaI There are few changes required. Please see comments, thanks!

@Subhajit97 Subhajit97 linked an issue May 21, 2021 that may be closed by this pull request
Copy link
Contributor

@Subhajit97 Subhajit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Subhajit97 Subhajit97 requested review from rajlearner17 and removed request for khushboo9024 May 27, 2021 06:31
Copy link

@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.

Small change requested

Copy link

@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

@cbruno10 cbruno10 merged commit 84bf08e into main Jun 21, 2021
@cbruno10 cbruno10 deleted the issue-209 branch June 21, 2021 21:10
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 gcp_dns_record_set
4 participants