Skip to content

Commit

Permalink
✨ add encryption to gcp storage bucket resource
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey committed Jan 9, 2025
1 parent fe27e2e commit f4a2d40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/gcp/resources/gcp.lr
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ private gcp.project.storageService.bucket @defaults("id") {
iamConfiguration dict
// Retention policy
retentionPolicy dict
// Encryption
encryption dict
}

// Google Cloud (GCP) SQL resources
Expand Down
5 changes: 5 additions & 0 deletions providers/gcp/resources/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ func (g *mqlGcpProjectStorageService) buckets() ([]interface{}, error) {
if err != nil {
return nil, err
}
enc, err := convert.JsonToDict(bucket.Encryption)
if err != nil {
return nil, err
}

mqlInstance, err := CreateResource(g.MqlRuntime, "gcp.project.storageService.bucket", map[string]*llx.RawData{
"id": llx.StringData(bucket.Id),
Expand All @@ -114,6 +118,7 @@ func (g *mqlGcpProjectStorageService) buckets() ([]interface{}, error) {
"updated": llx.TimeDataPtr(updated),
"iamConfiguration": llx.DictData(iamConfigurationDict),
"retentionPolicy": llx.DictData(retentionPolicy),
"encryption": llx.DictData(enc),
})
if err != nil {
return nil, err
Expand Down

0 comments on commit f4a2d40

Please sign in to comment.