turbot / steampipe-plugin-oci

Use SQL to instantly query Oracle Cloud resources across regions and accounts. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/oci
Apache License 2.0
18 stars 5 forks source link

Add table oci_identity_db_credential Closes #594 #596

Closed ParthaI closed 9 months ago

ParthaI commented 9 months ago

Integration test logs

Logs ``` Test names: [ 'tests/oci_identity_db_credential' ] No env file present for the current environment: staging Falling back to .env config No env file present for the current environment: staging SETUP: tests/oci_identity_db_credential [] PRETEST: tests/oci_identity_db_credential TEST: tests/oci_identity_db_credential Running terraform Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # oci_identity_db_credential.named_test_resource will be created + resource "oci_identity_db_credential" "named_test_resource" { + description = "testing" + id = (known after apply) + lifecycle_details = (known after apply) + password = (sensitive value) + state = (known after apply) + time_created = (known after apply) + time_expires = (known after apply) + user_id = (known after apply) } # oci_identity_user.named_test_resource will be created + resource "oci_identity_user" "named_test_resource" { + capabilities = (known after apply) + compartment_id = "ocid1.tenancy.oc1..eeeeeeeeueweljrlncnweuedhjsadehkjebcbehbeuyhshsshekkkekekjff" + db_user_name = (known after apply) + defined_tags = (known after apply) + description = "steampipetest304" + email = (known after apply) + email_verified = (known after apply) + external_identifier = (known after apply) + freeform_tags = (known after apply) + id = (known after apply) + identity_provider_id = (known after apply) + inactive_state = (known after apply) + last_successful_login_time = (known after apply) + name = "steampipetest304" + previous_successful_login_time = (known after apply) + state = (known after apply) + time_created = (known after apply) } Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs: + credential_id = (known after apply) + description = "testing" + lifecycle_state = (known after apply) + tenancy_ocid = "ocid1.tenancy.oc1..eeeeeeeeueweljrlncnweuedhjsadehkjebcbehbeuyhshsshekkkekekjff" + user_id = (known after apply) oci_identity_user.named_test_resource: Creating... oci_identity_user.named_test_resource: Creation complete after 2s [id=ocid1.user.oc1..aaaaaaaak2bgsaa47k5kkfojmsapmci3etnueefbzbyxb2x4oswthacmqorq] oci_identity_db_credential.named_test_resource: Creating... oci_identity_db_credential.named_test_resource: Creation complete after 1s [id=users/ocid1.user.oc1..aaaaaaaak2bgsaa47k5kkfojmsapmci3etnueefbzbyxb2x4oswthacmqorq/dbCredentials/ocid1.credential.oc1..aaaaaaaayxcy6yjqx3qiu5dvswifsmu7ua6jij7bzj6xzu4ezvegojyhusuq] Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: credential_id = "ocid1.credential.oc1..aaaaaaaayxcy6yjqx3qiu5dvswifsmu7ua6jij7bzj6xzu4ezvegojyhusuq" description = "testing" lifecycle_state = "ACTIVE" tenancy_ocid = "ocid1.tenancy.oc1..eeeeeeeeueweljrlncnweuedhjsadehkjebcbehbeuyhshsshekkkekekjff" user_id = "ocid1.user.oc1..aaaaaaaak2bgsaa47k5kkfojmsapmci3etnueefbzbyxb2x4oswthacmqorq" Running SQL query: test-list-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [ { "description": "testing", "id": "ocid1.credential.oc1..aaaaaaaayxcy6yjqx3qiu5dvswifsmu7ua6jij7bzj6xzu4ezvegojyhusuq", "lifecycle_state": "ACTIVE", "user_id": "ocid1.user.oc1..aaaaaaaak2bgsaa47k5kkfojmsapmci3etnueefbzbyxb2x4oswthacmqorq" } ] ✔ PASSED Running SQL query: test-not-found-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [] ✔ PASSED Running SQL query: test-turbot-query.sql Warning: terminal options has been deprecated and will be removed in a future version of Steampipe. These can now be set in a steampipe workspace. (/Users/parthas/.steampipe/config/default.spc:34,20-42,2) [ { "tenant_id": "ocid1.tenancy.oc1..eeeeeeeeueweljrlncnweuedhjsadehkjebcbehbeuyhshsshekkkekekjff", "title": "ocid1.credential.oc1..aaaaaaaayxcy6yjqx3qiu5dvswifsmu7ua6jij7bzj6xzu4ezvegojyhusuq" } ] ✔ PASSED POSTTEST: tests/oci_identity_db_credential TEARDOWN: tests/oci_identity_db_credential SUMMARY: 1/1 passed. ```

Example query results

Results ``` > select * from oci_identity_db_credential +------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-------------+---------------------------+---------------------------+-----------------+----------------> | id | user_id | description | time_created | time_expires | lifecycle_state | title > +------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-------------+---------------------------+---------------------------+-----------------+----------------> | ocid1.credential.oc1..aaaaaaaaft6oq4slulmxpolyrhq6v4zs53gqfj4kj7wrfn2ssi6jd7xvgqia | ocid1.user.oc1..aaaaaaaa2jjigunx3y76rdbx6acvv4kueepbh6hnmr2yr4wnzyuyqi2jaz6a | | 2024-01-25T12:18:23+05:30 | 2024-01-25T12:18:23+05:30 | ACTIVE | ocid1.credentia> +------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-------------+---------------------------+---------------------------+-----------------+----------------> ```