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_compute_target_ssl_proxy. Closes #155 #156

Merged
merged 8 commits into from
Apr 28, 2021
Merged

Conversation

Subhajit97
Copy link
Contributor

@Subhajit97 Subhajit97 commented Mar 22, 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_compute_target_ssl_proxy []

PRETEST: tests/gcp_compute_target_ssl_proxy

TEST: tests/gcp_compute_target_ssl_proxy
Running terraform
data.google_client_config.current: Refreshing state...
data.null_data_source.resource: Refreshing state...
tls_private_key.private_key: Creating...
tls_private_key.private_key: Creation complete after 0s [id=c6e458fc32f1091ec209df3239484f669e41375e]
tls_self_signed_cert.self_signed_certificate: Creating...
tls_self_signed_cert.self_signed_certificate: Creation complete after 0s [id=220275858568429927518967315075666566135]
google_compute_ssl_certificate.named_test_resource: Creating...
google_compute_health_check.named_test_resource: Creating...
google_compute_ssl_certificate.named_test_resource: Creation complete after 3s [id=projects/pikachu-aaa/global/sslCertificates/turbottest6516]
google_compute_health_check.named_test_resource: Still creating... [10s elapsed]
google_compute_health_check.named_test_resource: Creation complete after 14s [id=projects/pikachu-aaa/global/healthChecks/turbottest6516]
google_compute_backend_service.named_test_resource: Creating...
google_compute_backend_service.named_test_resource: Still creating... [10s elapsed]
google_compute_backend_service.named_test_resource: Creation complete after 12s [id=projects/pikachu-aaa/global/backendServices/turbottest6516]
google_compute_target_ssl_proxy.named_test_resource: Creating...
google_compute_target_ssl_proxy.named_test_resource: Still creating... [10s elapsed]
google_compute_target_ssl_proxy.named_test_resource: Creation complete after 13s [id=projects/pikachu-aaa/global/targetSslProxies/turbottest6516]

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: 6 added, 0 changed, 0 destroyed.

Outputs:

backend_service = https://www.googleapis.com/compute/v1/projects/pikachu-aaa/global/backendServices/turbottest6516
certificate_id = https://www.googleapis.com/compute/v1/projects/pikachu-aaa/global/sslCertificates/turbottest6516
project_id = pikachu-aaa
proxy_id = 495454489733826516
resource_aka = gcp://compute.googleapis.com/projects/pikachu-aaa/global/targetSslProxies/turbottest6516
resource_id = projects/pikachu-aaa/global/targetSslProxies/turbottest6516
resource_name = turbottest6516
self_link = https://www.googleapis.com/compute/v1/projects/pikachu-aaa/global/targetSslProxies/turbottest6516

Running SQL query: test-get-query.sql
[
  {
    "description": "Test target ssl proxy to validate the table outcome.",
    "kind": "compute#targetSslProxy",
    "location": "global",
    "name": "turbottest6516",
    "project": "pikachu-aaa",
    "proxy_header": "NONE",
    "self_link": "https://www.googleapis.com/compute/v1/projects/pikachu-aaa/global/targetSslProxies/turbottest6516",
    "service": "https://www.googleapis.com/compute/v1/projects/pikachu-aaa/global/backendServices/turbottest6516",
    "ssl_certificates": [
      "https://www.googleapis.com/compute/v1/projects/pikachu-aaa/global/sslCertificates/turbottest6516"
    ]
  }
]
✔ PASSED

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

Running SQL query: test-list-query.sql
[
  {
    "description": "Test target ssl proxy to validate the table outcome.",
    "name": "turbottest6516"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "gcp://compute.googleapis.com/projects/pikachu-aaa/global/targetSslProxies/turbottest6516"
    ],
    "title": "turbottest6516"
  }
]
✔ PASSED

POSTTEST: tests/gcp_compute_target_ssl_proxy

TEARDOWN: tests/gcp_compute_target_ssl_proxy

SUMMARY:

1/1 passed.

Example query results

Results

Basic info

select
  name,
  id,
  self_link
from
  gcp_compute_target_ssl_proxy;
+-----------------+---------------------+----------------------------------------------------------------------------------------------------+
| name            | id                  | self_link                                                                                          |
+-----------------+---------------------+----------------------------------------------------------------------------------------------------+
| turbottest39222 | 7446162680900896705 | https://www.googleapis.com/compute/v1/projects/dummy12-aaa/global/targetSslProxies/turbottest39222 |
+-----------------+---------------------+----------------------------------------------------------------------------------------------------+

Get SSL policy details for each target SSL proxy

select
  name,
  id,
  ssl_policy
from
  gcp_compute_target_ssl_proxy;
+-----------------+---------------------+------------+
| name            | id                  | ssl_policy |
+-----------------+---------------------+------------+
| turbottest39222 | 7446162680900896705 |            |
+-----------------+---------------------+------------+

Get SSL certificates used to authenticate connections to Backends

select
  name,
  id,
  ssl_certificates
from
  gcp_compute_target_ssl_proxy;
+-----------------+---------------------+-------------------------------------------------------------------------------------------------------+
| name            | id                  | ssl_certificates                                                                                      |
+-----------------+---------------------+-------------------------------------------------------------------------------------------------------+
| turbottest39222 | 7446162680900896705 | ["https://www.googleapis.com/compute/v1/projects/dummy12-aaa/global/sslCertificates/turbottest39222"] |
+-----------------+---------------------+-------------------------------------------------------------------------------------------------------+

@Subhajit97 Subhajit97 self-assigned this Mar 22, 2021
@Subhajit97 Subhajit97 linked an issue Mar 23, 2021 that may be closed by this pull request
@Subhajit97 Subhajit97 marked this pull request as ready for review March 24, 2021 06:05
@Subhajit97 Subhajit97 linked an issue Mar 25, 2021 that may be closed by this pull request
Copy link
Contributor

@LalitLab LalitLab left a comment

Choose a reason for hiding this comment

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

A minor change to table docs required - otherwise looks good

docs/tables/gcp_compute_target_ssl_proxy.md Outdated Show resolved Hide resolved
Copy link
Contributor

@LalitLab LalitLab left a comment

Choose a reason for hiding this comment

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

LGTM

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

@LalitLab LalitLab requested a review from cbruno10 April 28, 2021 08:23
@cbruno10 cbruno10 merged commit 184fb13 into main Apr 28, 2021
@cbruno10 cbruno10 deleted the issue-155 branch April 28, 2021 20: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_compute_target_ssl_proxy Add gcp network table.
4 participants