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_logging_bucket closes #226 #232

Merged
merged 9 commits into from
Jun 24, 2021
Merged

Add table gcp_logging_bucket closes #226 #232

merged 9 commits into from
Jun 24, 2021

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jun 17, 2021

Integration test logs

Logs
SETUP: tests/gcp_logging_bucket []

PRETEST: tests/gcp_logging_bucket

TEST: tests/gcp_logging_bucket
Running terraform
data.google_client_config.current: Refreshing state...
data.null_data_source.resource: Refreshing state...
google_logging_project_bucket_config.named_test_resource: Creating...
google_logging_project_bucket_config.named_test_resource: Creation complete after 2s [id=projects/parker-aaa/locations/us-east1/buckets/turbottest13032]

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

Outputs:

project_id = parker-aaa
region_id = us-east1
resource_aka = gcp://logging.googleapis.com/projects/parker-aaa/locations/us-east1/buckets/turbottest13032
resource_id = projects/parker-aaa/locations/us-east1/buckets/turbottest13032

Running SQL query: test-get-query.sql
[
  {
    "location": "us-east1",
    "name": "projects/parker-aaa/locations/us-east1/buckets/turbottest13032",
    "project": "parker-aaa",
    "retention_days": "30"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "name": "projects/parker-aaa/locations/us-east1/buckets/turbottest13032",
    "title": "projects/parker-aaa/locations/us-east1/buckets/turbottest13032"
  }
]
✔ PASSED

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

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "gcp://logging.googleapis.com/projects/parker-aaa/locations/us-east1/buckets/turbottest13032"
    ],
    "location": "us-east1",
    "project": "parker-aaa",
    "title": "projects/parker-aaa/locations/us-east1/buckets/turbottest13032"
  }
]
✔ PASSED

POSTTEST: tests/gcp_logging_bucket

TEARDOWN: tests/gcp_logging_bucket

SUMMARY:

1/1 passed.

Example query results

Results

Basic info

select
  name,
  lifecycle_state,
  description,
  retention_days
from
  gcp_logging_bucket;
+-------------------------------------------------------------------+------------------+----------------+----------------+
| name                                                              | lifecycle_state  | description    | retention_days |
+-------------------------------------------------------------------+------------------+----------------+----------------+
| projects/parker-aaa/locations/asia-southeast1/buckets/test-bucket | ACTIVE           |                | 1              |
| projects/parker-aaa/locations/us-east1/buckets/turbottest13032    | DELETE_REQUESTED |                | 30             |
| projects/parker-aaa/locations/us-east1/buckets/turbottest87721    | DELETE_REQUESTED |                | 30             |
| projects/parker-aaa/locations/us-east1/buckets/turbottest49272    | DELETE_REQUESTED |                | 30             |
| projects/parker-aaa/locations/global/buckets/_Required            | ACTIVE           | Audit bucket   | 400            |
| projects/parker-aaa/locations/us-east1/buckets/turbottest42032    | DELETE_REQUESTED |                | 30             |
| projects/parker-aaa/locations/global/buckets/_Default             | ACTIVE           | Default bucket | 30             |
| projects/parker-aaa/locations/us-east1/buckets/turbottest36351    | DELETE_REQUESTED |                | 30             |
+-------------------------------------------------------------------+------------------+----------------+----------------+

List locked buckets

select
  name,
  locked
from
  gcp_logging_bucket
where
  locked;
+--------------------------------------------------------+--------+
| name                                                   | locked |
+--------------------------------------------------------+--------+
| projects/parker-aaa/locations/global/buckets/_Required | true   |
+--------------------------------------------------------+--------+

@ParthaI ParthaI requested a review from Subhajit97 June 17, 2021 10:25
@ParthaI ParthaI self-assigned this Jun 17, 2021
@ParthaI ParthaI linked an issue Jun 17, 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 a review from rajlearner17 June 24, 2021 07:55
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 June 24, 2021 09:02
@cbruno10 cbruno10 merged commit f0e6a76 into main Jun 24, 2021
@cbruno10 cbruno10 deleted the issue-226 branch June 24, 2021 14:04
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_logging_bucket
4 participants