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_redis_instance. Closes #478 #482

Merged
merged 6 commits into from
Aug 24, 2023
Merged

Add table gcp_redis_instance. Closes #478 #482

merged 6 commits into from
Aug 24, 2023

Conversation

madhushreeray30
Copy link
Contributor

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
select
  name,
  display_name,
  create_time,
  location_id,
  memory_size_gb,
  reserved_ip_range
from
  gcp_redis_instance;
+---------------+------------------+---------------------------+----------------+----------------+-------------------+
| name          | display_name     | create_time               | location_id    | memory_size_gb | reserved_ip_range |
+---------------+------------------+---------------------------+----------------+----------------+-------------------+
| instance-test | instance-test-mr | 2023-08-14T13:44:45+05:30 | europe-west3-c | 1              | 10.242.179.8/29   |
+---------------+------------------+---------------------------+----------------+----------------+-------------------+
select
  name,
  display_name,
  create_time,
  location_id,
  jsonb_pretty(nodes) as instance_nodes
from
  gcp_redis_instance
where
  name = 'instance-test'
  and location_id = 'europe-west3-c';
+---------------+------------------+---------------------------+----------------+----------------------------------+
| name          | display_name     | create_time               | location_id    | instance_nodes                   |
+---------------+------------------+---------------------------+----------------+----------------------------------+
| instance-test | instance-test-mr | 2023-08-14T13:44:45+05:30 | europe-west3-c | [                                |
|               |                  |                           |                |     {                            |
|               |                  |                           |                |         "id": "node-0",          |
|               |                  |                           |                |         "zone": "europe-west3-c" |
|               |                  |                           |                |     }                            |
|               |                  |                           |                | ]                                |
+---------------+------------------+---------------------------+----------------+----------------------------------+

@madhushreeray30 madhushreeray30 self-assigned this Aug 16, 2023
@madhushreeray30 madhushreeray30 linked an issue Aug 16, 2023 that may be closed by this pull request
@misraved
Copy link
Contributor

@madhushreeray30 while updating the go SDK version for GCP did you check for breaking changes? Does this affect other tables?

Copy link
Contributor

@ParthaI ParthaI left a comment

Choose a reason for hiding this comment

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

@madhushreeray30 , I left a few review comments could you please take a look? Thanks!
Once changes have been made please make sure the pagination and the Get Config is working as expected.

gcp/table_gcp_redis_instance.go Outdated Show resolved Hide resolved
gcp/table_gcp_redis_instance.go Outdated Show resolved Hide resolved
gcp/table_gcp_redis_instance.go Outdated Show resolved Hide resolved
gcp/redis_location_list.go Show resolved Hide resolved
gcp/redis_location_list.go Outdated Show resolved Hide resolved
gcp/table_gcp_redis_instance.go Show resolved Hide resolved
gcp/table_gcp_redis_instance.go Outdated Show resolved Hide resolved
}

var location string
matrixLocation := d.EqualsQualString(matrixKeyRedisLocation)
Copy link
Contributor

Choose a reason for hiding this comment

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

From the above code I believe we have to specify the location_id in where clause. Do we need this block of code to get the location value from the matrix?

Copy link
Contributor Author

@madhushreeray30 madhushreeray30 Aug 24, 2023

Choose a reason for hiding this comment

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

From the above code I believe we have to specify the location_id in where clause. Do we need this block of code to get the location value from the matrix?

@ParthaI we require this because the response of the list call returns in the form us-central1-b where as the getMatrix give as us-central1 so we need to remove the AZ that's why we need this.

gcp/table_gcp_redis_instance.go Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
@misraved misraved merged commit e931285 into main Aug 24, 2023
1 check passed
@misraved misraved deleted the issue-478 branch August 24, 2023 12:29
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_redis_instance
3 participants