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_project.Closes #199 #205

Merged
merged 7 commits into from
May 20, 2021
Merged

Add table gcp_project.Closes #199 #205

merged 7 commits into from
May 20, 2021

Conversation

anisadas
Copy link
Contributor

@anisadas anisadas commented May 17, 2021

Integration test logs

Logs
SETUP: tests/gcp_project []

PRETEST: tests/gcp_project

TEST: tests/gcp_project
Running terraform
data.google_client_config.current: Refreshing state...
data.google_project.current: Refreshing state...
data.null_data_source.resource: Refreshing state...

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

Outputs:

current_project_name = parker-aaa
project_id = parker-aaa
resource_aka = gcp://cloudresourcemanager.googleapis.com/projects/parker-aaa

Running SQL query: test-list-query.sql
[
  {
    "name": "parker-aaa",
    "project_id": "parker-aaa"
  }
]
✔ PASSED

Running SQL query: test-notfound-query.sql
null
✔ PASSED

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "gcp://cloudresourcemanager.googleapis.com/projects/parker-aaa"
    ],
    "name": "parker-aaa",
    "title": "parker-aaa"
  }
]
✔ PASSED

POSTTEST: tests/gcp_project

TEARDOWN: tests/gcp_project

SUMMARY:

1/1 passed.

Example query results

Results
select
  name,
  project_id,
  project_number,
  lifecycle_state,
  create_time
from
  gcp_project;
+------------+------------+----------------+-----------------+---------------------+
| name       | project_id | project_number | lifecycle_state | create_time         |
+------------+------------+----------------+-----------------+---------------------+
| parker-aaa | parker-aaa | 979620418102   | ACTIVE          | 2019-05-22 12:08:03 |
+------------+------------+----------------+-----------------+---------------------+


@anisadas anisadas linked an issue May 17, 2021 that may be closed by this pull request
@anisadas anisadas self-assigned this May 17, 2021
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.

@anisadas There are few changes required. Please see comments, thanks!
Can you also add the integration test for the table?

@anisadas
Copy link
Contributor Author

SETUP: tests/gcp_project []

PRETEST: tests/gcp_project

TEST: tests/gcp_project
Running terraform
data.google_client_config.current: Refreshing state...
data.google_project.current: Refreshing state...
data.null_data_source.resource: Refreshing state...

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

Outputs:

current_project_name = parker-aaa
project_id = parker-aaa
project_number = 979620418102
resource_aka = gcp://cloudresourcemanager.googleapis.com/projects/parker-aaa

Running SQL query: test-list-query.sql
[
  {
    "name": "parker-aaa",
    "project_id": "parker-aaa",
    "project_number": 979620418102
  }
]
✔ PASSED

Running SQL query: test-notfound-query.sql
null
✔ PASSED

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "gcp://cloudresourcemanager.googleapis.com/projects/parker-aaa"
    ],
    "name": "parker-aaa",
    "title": "parker-aaa"
  }
]
✔ PASSED

POSTTEST: tests/gcp_project

TEARDOWN: tests/gcp_project

SUMMARY:

1/1 passed.

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 20, 2021 05:35
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

@Subhajit97 Subhajit97 requested a review from cbruno10 May 20, 2021 07:59
@cbruno10 cbruno10 merged commit 613b37b into main May 20, 2021
@cbruno10 cbruno10 deleted the issue-199 branch May 20, 2021 11:40
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_project
4 participants