Skip to content

Commit b7579e2

Browse files
erezrokahpull[bot]
authored andcommitted
fix: Revert "fix(gcp-resources): Add organization_id and name as PK of gcp_resourcemanager_folders (#6576)
#### Summary Looks like `organization_id` can be `nil`. `name` should be good enough: https://github.com/cloudquery/cloudquery/blob/d90410764f8d3e3c0bed82db0a143885e0c90190/plugins/source/gcp/resources/services/resourcemanager/folders_fetch.go#L44 <!--
1 parent 5cdfc97 commit b7579e2

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

plugins/source/gcp/docs/tables/gcp_resourcemanager_folders.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
https://cloud.google.com/resource-manager/reference/rest/v3/folders#Folder
44

5-
The composite primary key for this table is (**organization_id**, **name**).
5+
The primary key for this table is **_cq_id**.
66

77
## Columns
88

99
| Name | Type |
1010
| ------------- | ------------- |
1111
|_cq_source_name|String|
1212
|_cq_sync_time|Timestamp|
13-
|_cq_id|UUID|
13+
|_cq_id (PK)|UUID|
1414
|_cq_parent_id|UUID|
15-
|organization_id (PK)|String|
16-
|name (PK)|String|
15+
|organization_id|String|
16+
|name|String|
1717
|parent|String|
1818
|display_name|String|
1919
|state|String|

plugins/source/gcp/resources/services/resourcemanager/folders.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ func Folders() *schema.Table {
1919
Name: "organization_id",
2020
Type: schema.TypeString,
2121
Resolver: resolveOrganizationId,
22-
CreationOptions: schema.ColumnCreationOptions{
23-
PrimaryKey: true,
24-
},
25-
},
26-
{
27-
Name: "name",
28-
Type: schema.TypeString,
29-
Resolver: schema.PathResolver("Name"),
30-
CreationOptions: schema.ColumnCreationOptions{
31-
PrimaryKey: true,
32-
},
3322
},
3423
},
3524
}

0 commit comments

Comments
 (0)