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 oci_identity_db_credential Closes #594 #596

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jan 25, 2024

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 | <null>      | 2024-01-25T12:18:23+05:30 | 2024-01-25T12:18:23+05:30 | ACTIVE          | ocid1.credentia>
+------------------------------------------------------------------------------------+------------------------------------------------------------------------------+-------------+---------------------------+---------------------------+-----------------+---------------->

@ParthaI ParthaI self-assigned this Jan 25, 2024
@ParthaI ParthaI linked an issue Jan 25, 2024 that may be closed by this pull request

# Table: oci_identity_db_credential - Query OCI Identity Users using SQL

Oracle Cloud Infrastructure's Identity and Access Management (IAM) service lets you control who has access to your cloud resources. Identity DB credentials refer to the authentication details used to access Oracle databases securely within the Oracle Cloud Infrastructure. These credentials are part of the Oracle Cloud Infrastructure Identity and Access Management (IAM) service, which manages users, groups, and policies that control access to OCI resources. In the context of databases, these credentials
Copy link
Contributor

Choose a reason for hiding this comment

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

@ParthaI Is this description completed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Comment on lines 20 to 29
select
name,
id,
user_id,
description,
time_created,
lifecycle_state,
time_expires
from
oci_identity_db_credential;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
select
name,
id,
user_id,
description,
time_created,
lifecycle_state,
time_expires
from
oci_identity_db_credential;
select
id,
user_id,
description,
time_created,
lifecycle_state,
time_expires
from
oci_identity_db_credential;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

Comment on lines 33 to 42
select
name,
id,
user_id,
description,
time_created,
lifecycle_state,
time_expires
from
oci_identity_db_credential;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
select
name,
id,
user_id,
description,
time_created,
lifecycle_state,
time_expires
from
oci_identity_db_credential;
select
id,
user_id,
description,
time_created,
lifecycle_state,
time_expires
from
oci_identity_db_credential;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the query

Comment on lines 49 to 60
select
c.user_id,
c.db_credential_id,
u.user_type,
u.is_mfa_activated,
u.email
from
oci_identity_db_credential as c,
oci_identity_user as u
where
c.user_id = u.user_id
and user_type = 'IDCS';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
select
c.user_id,
c.db_credential_id,
u.user_type,
u.is_mfa_activated,
u.email
from
oci_identity_db_credential as c,
oci_identity_user as u
where
c.user_id = u.user_id
and user_type = 'IDCS';
select
c.id,
u.user_type,
u.is_mfa_activated,
u.email
from
oci_identity_db_credential as c,
oci_identity_user as u
where
c.user_id = u.id
and user_type = 'IDCS;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

Comment on lines 64 to 74
select
c.user_id,
c.db_credential_id,
u.user_type,
u.is_mfa_activated,
u.email
from
oci_identity_db_credential as c
join oci_identity_user as u on c.user_id = u.user_id
where
u.user_type = 'IDCS';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
select
c.user_id,
c.db_credential_id,
u.user_type,
u.is_mfa_activated,
u.email
from
oci_identity_db_credential as c
join oci_identity_user as u on c.user_id = u.user_id
where
u.user_type = 'IDCS';
select
c.id,
u.user_type,
u.is_mfa_activated,
u.email
from
oci_identity_db_credential as c
join oci_identity_user as u on c.user_id = u.id
where
u.user_type = 'IDCS';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@bigdatasourav bigdatasourav merged commit 00ac296 into main Jan 25, 2024
1 check passed
@bigdatasourav bigdatasourav deleted the issue-594 branch January 25, 2024 10:19
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 oci_identity_db_credential
3 participants