Skip to content

Commit e1414bc

Browse files
tas50claude
andcommitted
✨ Add 50 new fields to existing GCP resources
Add missing scalar fields across 11 GCP resource types: - Compute disk: region, replicaZones, resourcePolicies, satisfiesPzi/Pzs, sourceDiskId - Compute snapshot: sourceDiskId, sourceSnapshotSchedulePolicy/Id - Compute firewall: network - Compute forwardingRule: fingerprint, ipCollection - Compute backendService: fingerprint - Compute image: storageLocations, sourceDisk/Id, sourceImage/Id, sourceSnapshot/Id - GKE cluster: etag, initialNodeCount, servicesIpv4Cidr, nodeIpv4CidrSize, tpuIpv4CidrBlock, enabledK8sBetaApis - GKE nodepool: etag - SQL instance: currentDiskSize, etag - Storage bucket: publicAccessPrevention, metageneration - BigQuery dataset: maxTimeTravelHours, storageBillingModel, defaultCollation, defaultPartitionExpirationMs, defaultRoundingMode, isCaseInsensitive, satisfiesPzi/Pzs - Cloud Run service: customAudiences, defaultUriDisabled, satisfiesPzs, uid, etag - Cloud Run job: satisfiesPzs, uid, etag - DNS managed zone: dnssecEnabled - Cloud Functions: uid, satisfiesPzs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 98436c2 commit e1414bc

File tree

11 files changed

+888
-86
lines changed

11 files changed

+888
-86
lines changed

providers/gcp/resources/bigquery.go

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,26 @@ func (g *mqlGcpProjectBigqueryService) datasets() ([]any, error) {
166166
}
167167

168168
mqlInstance, err := CreateResource(g.MqlRuntime, "gcp.project.bigqueryService.dataset", map[string]*llx.RawData{
169-
"id": llx.StringData(dataset.DatasetID),
170-
"projectId": llx.StringData(dataset.ProjectID),
171-
"name": llx.StringData(metadata.Name),
172-
"description": llx.StringData(metadata.Description),
173-
"location": llx.StringData(metadata.Location),
174-
"labels": llx.MapData(convert.MapToInterfaceMap(metadata.Labels), types.String),
175-
"created": llx.TimeData(metadata.CreationTime),
176-
"modified": llx.TimeData(metadata.LastModifiedTime),
177-
"tags": llx.MapData(convert.MapToInterfaceMap(tags), types.String),
178-
"kmsName": llx.StringData(kmsName),
179-
"access": llx.ArrayData(access, types.Resource("gcp.project.bigqueryService.dataset.accessEntry")),
180-
"defaultTableExpirationMs": llx.IntData(metadata.DefaultTableExpiration.Milliseconds()),
169+
"id": llx.StringData(dataset.DatasetID),
170+
"projectId": llx.StringData(dataset.ProjectID),
171+
"name": llx.StringData(metadata.Name),
172+
"description": llx.StringData(metadata.Description),
173+
"location": llx.StringData(metadata.Location),
174+
"labels": llx.MapData(convert.MapToInterfaceMap(metadata.Labels), types.String),
175+
"created": llx.TimeData(metadata.CreationTime),
176+
"modified": llx.TimeData(metadata.LastModifiedTime),
177+
"tags": llx.MapData(convert.MapToInterfaceMap(tags), types.String),
178+
"kmsName": llx.StringData(kmsName),
179+
"access": llx.ArrayData(access, types.Resource("gcp.project.bigqueryService.dataset.accessEntry")),
180+
"defaultTableExpirationMs": llx.IntData(metadata.DefaultTableExpiration.Milliseconds()),
181+
"maxTimeTravelHours": llx.IntData(int64(metadata.MaxTimeTravel / time.Hour)),
182+
"storageBillingModel": llx.StringData(metadata.StorageBillingModel),
183+
"defaultCollation": llx.StringData(metadata.DefaultCollation),
184+
"defaultPartitionExpirationMs": llx.IntData(metadata.DefaultPartitionExpiration.Milliseconds()),
185+
"defaultRoundingMode": llx.StringData(""),
186+
"isCaseInsensitive": llx.BoolData(metadata.IsCaseInsensitive),
187+
"satisfiesPzi": llx.BoolData(false),
188+
"satisfiesPzs": llx.BoolData(false),
181189
})
182190
if err != nil {
183191
return nil, err

providers/gcp/resources/cloud_functions.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ func (g *mqlGcpProject) cloudFunctions() ([]any, error) {
176176
"buildName": llx.StringData(f.BuildName),
177177
"secretEnvVars": llx.MapData(secretEnvVars, types.Dict),
178178
"secretVolumes": llx.ArrayData(secretVolumes, types.Dict),
179-
"dockerRepository": llx.StringData(f.DockerRepository),
180-
"dockerRegistry": llx.StringData(f.DockerRegistry.String()),
179+
"dockerRepository": llx.StringData(f.DockerRepository),
180+
"dockerRegistry": llx.StringData(f.DockerRegistry.String()),
181+
"uid": llx.StringData(""),
182+
"satisfiesPzs": llx.BoolData(false),
181183
})
182184
if err != nil {
183185
return nil, err

providers/gcp/resources/cloudrun.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,13 @@ func (g *mqlGcpProjectCloudRunService) services() ([]any, error) {
459459
"latestReadyRevision": llx.StringData(s.LatestReadyRevision),
460460
"latestCreatedRevision": llx.StringData(s.LatestCreatedRevision),
461461
"trafficStatuses": llx.ArrayData(mqlTrafficStatuses, types.Dict),
462-
"uri": llx.StringData(s.Uri),
463-
"reconciling": llx.BoolData(s.Reconciling),
462+
"uri": llx.StringData(s.Uri),
463+
"reconciling": llx.BoolData(s.Reconciling),
464+
"customAudiences": llx.ArrayData(convert.SliceAnyToInterface(s.CustomAudiences), types.String),
465+
"defaultUriDisabled": llx.BoolData(s.DefaultUriDisabled),
466+
"satisfiesPzs": llx.BoolData(s.SatisfiesPzs),
467+
"uid": llx.StringData(s.Uid),
468+
"etag": llx.StringData(s.Etag),
464469
})
465470
if err != nil {
466471
log.Error().Err(err).Send()
@@ -646,8 +651,11 @@ func (g *mqlGcpProjectCloudRunService) jobs() ([]any, error) {
646651
"observedGeneration": llx.IntData(j.ObservedGeneration),
647652
"terminalCondition": llx.ResourceData(mqlTerminalCondition, "gcp.project.cloudRunService.condition"),
648653
"conditions": llx.ArrayData(mqlConditions, types.Resource("gcp.project.cloudRunService.condition")),
649-
"executionCount": llx.IntData(int64(j.ExecutionCount)),
650-
"reconciling": llx.BoolData(j.Reconciling),
654+
"executionCount": llx.IntData(int64(j.ExecutionCount)),
655+
"reconciling": llx.BoolData(j.Reconciling),
656+
"satisfiesPzs": llx.BoolData(j.SatisfiesPzs),
657+
"uid": llx.StringData(j.Uid),
658+
"etag": llx.StringData(j.Etag),
651659
})
652660
if err != nil {
653661
log.Error().Err(err).Send()

providers/gcp/resources/compute.go

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -920,15 +920,13 @@ func (g *mqlGcpProjectComputeService) disks() ([]any, error) {
920920
"licenses": llx.ArrayData(convert.SliceAnyToInterface(disk.Licenses), types.String),
921921
"physicalBlockSizeBytes": llx.IntData(disk.PhysicalBlockSizeBytes),
922922
"provisionedIops": llx.IntData(disk.ProvisionedIops),
923-
// TODO: link to resources
924-
//"region": llx.StringData(disk.Region),
925-
//"replicaZones": llx.StringData(convert.SliceAnyToInterface(disk.ReplicaZones)),
926-
//"resourcePolicies": llx.StringData(convert.SliceAnyToInterface(disk.ResourcePolicies)),
923+
"region": llx.StringData(disk.Region),
924+
"replicaZones": llx.ArrayData(convert.SliceAnyToInterface(disk.ReplicaZones), types.String),
925+
"resourcePolicies": llx.ArrayData(convert.SliceAnyToInterface(disk.ResourcePolicies), types.String),
926+
"satisfiesPzi": llx.BoolData(disk.SatisfiesPzi),
927+
"satisfiesPzs": llx.BoolData(disk.SatisfiesPzs),
928+
"sourceDiskId": llx.StringData(disk.SourceDiskId),
927929
"sizeGb": llx.IntData(disk.SizeGb),
928-
// TODO: link to resources
929-
//"sourceDiskId": llx.StringData(disk.SourceDiskId),
930-
//"sourceImageId": llx.StringData(disk.SourceImageId),
931-
//"sourceSnapshotId": llx.StringData(disk.SourceSnapshotId),
932930
"status": llx.StringData(disk.Status),
933931
"zone": llx.ResourceData(zone, "gcp.project.computeService.zone"),
934932
"created": llx.TimeDataPtr(parseTime(disk.CreationTimestamp)),
@@ -1090,6 +1088,7 @@ func (g *mqlGcpProjectComputeService) firewalls() ([]any, error) {
10901088
"denied": llx.ArrayData(deniedDict, types.Dict),
10911089
"targetTags": llx.ArrayData(convert.SliceAnyToInterface(firewall.TargetTags), types.String),
10921090
"loggingEnabled": llx.BoolData(firewall.LogConfig != nil && firewall.LogConfig.Enable),
1091+
"network": llx.StringData(firewall.Network),
10931092
})
10941093
if err != nil {
10951094
return err
@@ -1168,7 +1167,10 @@ func (g *mqlGcpProjectComputeService) snapshots() ([]any, error) {
11681167
"enableConfidentialCompute": llx.BoolData(snapshot.EnableConfidentialCompute),
11691168
"satisfiesPzi": llx.BoolData(snapshot.SatisfiesPzi),
11701169
"satisfiesPzs": llx.BoolData(snapshot.SatisfiesPzs),
1171-
"sourceDisk": llx.StringData(snapshot.SourceDisk),
1170+
"sourceDisk": llx.StringData(snapshot.SourceDisk),
1171+
"sourceDiskId": llx.StringData(snapshot.SourceDiskId),
1172+
"sourceSnapshotSchedulePolicy": llx.StringData(snapshot.SourceSnapshotSchedulePolicy),
1173+
"sourceSnapshotSchedulePolicyId": llx.StringData(snapshot.SourceSnapshotSchedulePolicyId),
11721174
})
11731175
if err != nil {
11741176
return err
@@ -1287,6 +1289,13 @@ func (g *mqlGcpProjectComputeService) images() ([]any, error) {
12871289
"enableConfidentialCompute": llx.BoolData(image.EnableConfidentialCompute),
12881290
"satisfiesPzi": llx.BoolData(image.SatisfiesPzi),
12891291
"satisfiesPzs": llx.BoolData(image.SatisfiesPzs),
1292+
"storageLocations": llx.ArrayData(convert.SliceAnyToInterface(image.StorageLocations), types.String),
1293+
"sourceDisk": llx.StringData(image.SourceDisk),
1294+
"sourceDiskId": llx.StringData(image.SourceDiskId),
1295+
"sourceImage": llx.StringData(image.SourceImage),
1296+
"sourceImageId": llx.StringData(image.SourceImageId),
1297+
"sourceSnapshot": llx.StringData(image.SourceSnapshot),
1298+
"sourceSnapshotId": llx.StringData(image.SourceSnapshotId),
12901299
})
12911300
if err != nil {
12921301
return err
@@ -2257,6 +2266,7 @@ func (g *mqlGcpProjectComputeService) backendServices() ([]any, error) {
22572266
"port": llx.IntData(b.Port),
22582267
"serviceLbPolicy": llx.StringData(b.ServiceLbPolicy),
22592268
"ipAddressSelectionPolicy": llx.StringData(b.IpAddressSelectionPolicy),
2269+
"fingerprint": llx.StringData(b.Fingerprint),
22602270
})
22612271
if err != nil {
22622272
return nil, err
@@ -2454,6 +2464,8 @@ func (g *mqlGcpProjectComputeService) forwardingRules() ([]any, error) {
24542464
"allowPscGlobalAccess": llx.BoolData(fwr.GetAllowPscGlobalAccess()),
24552465
"pscConnectionStatus": llx.StringData(fwr.GetPscConnectionStatus()),
24562466
"sourceIpRanges": llx.ArrayData(convert.SliceAnyToInterface(fwr.GetSourceIpRanges()), types.String),
2467+
"fingerprint": llx.StringData(fwr.GetFingerprint()),
2468+
"ipCollection": llx.StringData(fwr.GetIpCollection()),
24572469
})
24582470
if err != nil {
24592471
return nil, err

providers/gcp/resources/dns.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func (g *mqlGcpProjectDnsService) managedZones() ([]any, error) {
195195
"created": llx.TimeDataPtr(parseTime(managedZone.CreationTime)),
196196
"labels": llx.MapData(convert.MapToInterfaceMap(managedZone.Labels), types.String),
197197
"cloudLoggingEnabled": llx.BoolData(managedZone.CloudLoggingConfig != nil && managedZone.CloudLoggingConfig.EnableLogging),
198+
"dnssecEnabled": llx.BoolData(managedZone.DnssecConfig != nil && managedZone.DnssecConfig.State == "on"),
198199
})
199200
if err != nil {
200201
return err

providers/gcp/resources/gcp.lr

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,10 @@ private gcp.project.computeService.forwardingRule {
710710
pscConnectionStatus string
711711
// If this load balancer can be used for packet mirroring, the source IP ranges to mirror
712712
sourceIpRanges []string
713+
// Fingerprint for optimistic locking
714+
fingerprint string
715+
// IP address collection resource
716+
ipCollection string
713717
}
714718

715719
// Google Cloud (GCP) Compute region
@@ -932,6 +936,18 @@ private gcp.project.computeService.disk @defaults("name") {
932936
provisionedThroughput int
933937
// Storage pool where the disk resides
934938
storagePool() gcp.project.computeService.storagePool
939+
// Region of the disk (for regional persistent disks)
940+
region string
941+
// Replica zones for regional persistent disks
942+
replicaZones []string
943+
// Resource policies applied to this disk
944+
resourcePolicies []string
945+
// Whether the disk satisfies Google's Protected Zone Integration requirements
946+
satisfiesPzi bool
947+
// Whether the disk satisfies Google's Protected Zone Separation requirements
948+
satisfiesPzs bool
949+
// ID of the source disk used to create this disk
950+
sourceDiskId string
935951
}
936952

937953
// Google Cloud (GCP) Compute attached disk
@@ -1012,6 +1028,12 @@ private gcp.project.computeService.snapshot @defaults("name") {
10121028
satisfiesPzs bool
10131029
// URL of the source disk used to create this snapshot
10141030
sourceDisk string
1031+
// ID of the source disk used to create this snapshot
1032+
sourceDiskId string
1033+
// URL of the snapshot schedule policy that created this snapshot
1034+
sourceSnapshotSchedulePolicy string
1035+
// ID of the snapshot schedule policy
1036+
sourceSnapshotSchedulePolicyId string
10151037
}
10161038

10171039
// Google Cloud (GCP) Compute
@@ -1046,6 +1068,20 @@ private gcp.project.computeService.image @defaults("id name") {
10461068
satisfiesPzi bool
10471069
// Whether the image satisfies Google's Protected Zone Separation requirements
10481070
satisfiesPzs bool
1071+
// Cloud Storage locations where the image is stored
1072+
storageLocations []string
1073+
// URL of the source disk used to create this image
1074+
sourceDisk string
1075+
// ID of the source disk used to create this image
1076+
sourceDiskId string
1077+
// URL of the source image used to create this image
1078+
sourceImage string
1079+
// ID of the source image used to create this image
1080+
sourceImageId string
1081+
// URL of the source snapshot used to create this image
1082+
sourceSnapshot string
1083+
// ID of the source snapshot used to create this image
1084+
sourceSnapshotId string
10491085
}
10501086

10511087
// Google Cloud (GCP) Compute firewall
@@ -1084,6 +1120,8 @@ private gcp.project.computeService.firewall @defaults("name") {
10841120
targetTags []string
10851121
// Whether firewall logging is enabled for this rule
10861122
loggingEnabled bool
1123+
// URL of the network resource for this firewall rule
1124+
network string
10871125
}
10881126

10891127
// Google Cloud (GCP) Compute VPC network resource
@@ -1292,6 +1330,8 @@ private gcp.project.computeService.backendService @defaults("name") {
12921330
serviceLbPolicy string
12931331
// Specifies the IP address selection policy for the backend service (IPV4_ONLY, PREFER_IPV6, IPV6_ONLY)
12941332
ipAddressSelectionPolicy string
1333+
// Fingerprint for optimistic locking
1334+
fingerprint string
12951335
}
12961336

12971337
// Google Cloud (GCP) Compute backend service backend
@@ -1402,6 +1442,10 @@ private gcp.project.storageService.bucket @defaults("id") {
14021442
satisfiesPZS bool
14031443
// Whether object versioning is enabled
14041444
versioningEnabled bool
1445+
// Public access prevention setting (inherited, enforced, unspecified)
1446+
publicAccessPrevention string
1447+
// Metadata generation of the bucket
1448+
metageneration int
14051449
}
14061450

14071451
// Google Cloud bucket's lifecycle configuration
@@ -1554,6 +1598,10 @@ private gcp.project.sqlService.instance @defaults("name") {
15541598
writeEndpoint string
15551599
// PSC service attachment link
15561600
pscServiceAttachmentLink string
1601+
// Current disk usage of the instance in bytes
1602+
currentDiskSize int
1603+
// ETag for optimistic locking
1604+
etag string
15571605
}
15581606

15591607
// Google Cloud (GCP) SQL instance database
@@ -1768,6 +1816,22 @@ private gcp.project.bigqueryService.dataset @defaults("id name") {
17681816
models() []gcp.project.bigqueryService.model
17691817
// Returns routines in the dataset
17701818
routines() []gcp.project.bigqueryService.routine
1819+
// Maximum time travel in hours for the dataset (48 to 168)
1820+
maxTimeTravelHours int
1821+
// Storage billing model (LOGICAL or PHYSICAL)
1822+
storageBillingModel string
1823+
// Default collation for the dataset
1824+
defaultCollation string
1825+
// Default partition expiration time in milliseconds
1826+
defaultPartitionExpirationMs int
1827+
// Default rounding mode for the dataset
1828+
defaultRoundingMode string
1829+
// Whether field names are treated as case insensitive
1830+
isCaseInsensitive bool
1831+
// Whether the dataset satisfies Google's Protected Zone Integration requirements
1832+
satisfiesPzi bool
1833+
// Whether the dataset satisfies Google's Protected Zone Separation requirements
1834+
satisfiesPzs bool
17711835
}
17721836

17731837
// Google Cloud (GCP) BigQuery dataset access entry
@@ -1930,6 +1994,8 @@ private gcp.project.dnsService.managedzone @defaults("name") {
19301994
labels map[string]string
19311995
// Whether Cloud Logging is enabled for queries in this zone
19321996
cloudLoggingEnabled bool
1997+
// Whether DNSSEC is enabled
1998+
dnssecEnabled bool
19331999
// Cloud DNS record set in the zone
19342000
recordSets() []gcp.project.dnsService.recordset
19352001
}
@@ -2062,6 +2128,18 @@ private gcp.project.gkeService.cluster @defaults("name description location stat
20622128
securityPostureConfig gcp.project.gkeService.cluster.securityPostureConfig
20632129
// Maintenance policy for the cluster
20642130
maintenancePolicy gcp.project.gkeService.cluster.maintenancePolicy
2131+
// ETag for optimistic locking
2132+
etag string
2133+
// The initial number of nodes for the cluster
2134+
initialNodeCount int
2135+
// The IP address range of the Kubernetes services
2136+
servicesIpv4Cidr string
2137+
// The size of the address space on each node for hosting pods
2138+
nodeIpv4CidrSize int
2139+
// The IP address range of the Cloud TPUs
2140+
tpuIpv4CidrBlock string
2141+
// Enabled Kubernetes beta APIs
2142+
enabledK8sBetaApis []string
20652143
}
20662144

20672145
// Google Kubernetes Engine (GKE) cluster maintenance policy
@@ -2220,6 +2298,8 @@ private gcp.project.gkeService.cluster.nodepool @defaults("name") {
22202298
podIpv4CidrSize int
22212299
// Upgrade settings for the node pool
22222300
upgradeSettings gcp.project.gkeService.cluster.nodepool.upgradeSettings
2301+
// ETag for optimistic locking
2302+
etag string
22232303
}
22242304

22252305
// Google Kubernetes Engine (GKE) node pool upgrade settings
@@ -2965,6 +3045,10 @@ private gcp.project.cloudFunction @defaults("name") {
29653045
dockerRepository string
29663046
// Docker registry to use for this deployment
29673047
dockerRegistry string
3048+
// Unique identifier
3049+
uid string
3050+
// Satisfies PZS
3051+
satisfiesPzs bool
29683052
}
29693053
// Google Cloud (GCP) Dataproc resources
29703054
private gcp.project.dataprocService {
@@ -3269,6 +3353,16 @@ private gcp.project.cloudRunService.service @defaults("name") {
32693353
uri string
32703354
// Whether the service is currently being acted upon by the system to bring it into the desired state
32713355
reconciling bool
3356+
// Custom audiences for authentication
3357+
customAudiences []string
3358+
// Whether the default URI is disabled
3359+
defaultUriDisabled bool
3360+
// Whether the service satisfies Google's Protected Zone Separation requirements
3361+
satisfiesPzs bool
3362+
// Unique identifier
3363+
uid string
3364+
// ETag for optimistic locking
3365+
etag string
32723366
}
32733367

32743368
// Google Cloud (GCP) Run service revision template
@@ -3414,6 +3508,12 @@ private gcp.project.cloudRunService.job {
34143508
executionCount int
34153509
// Whether the service is currently being acted upon by the system to bring it into the desired state
34163510
reconciling bool
3511+
// Whether the job satisfies Google's Protected Zone Separation requirements
3512+
satisfiesPzs bool
3513+
// Unique identifier
3514+
uid string
3515+
// ETag for optimistic locking
3516+
etag string
34173517
}
34183518

34193519
// Google Cloud (GCP) Run job execution template

0 commit comments

Comments
 (0)