@intentius/chant-lexicon-gcp 0.124.31 → 0.124.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.js +45 -0
- package/dist/api/read-client.js +105 -0
- package/dist/codegen/docs-cli.js +6 -0
- package/dist/codegen/docs.js +115 -0
- package/dist/codegen/generate-cli.js +17 -0
- package/dist/codegen/generate.js +218 -0
- package/dist/codegen/naming.js +164 -0
- package/dist/codegen/package.js +43 -0
- package/dist/composites/catalog.d.ts.map +1 -1
- package/dist/composites/catalog.js +1251 -0
- package/dist/composites/cloud-function.js +65 -0
- package/dist/composites/cloud-run-service.d.ts +7 -3
- package/dist/composites/cloud-run-service.d.ts.map +1 -1
- package/dist/composites/cloud-run-service.js +75 -0
- package/dist/composites/cloud-sql-instance.js +85 -0
- package/dist/composites/gcs-bucket.js +64 -0
- package/dist/composites/gke-cluster.js +113 -0
- package/dist/composites/gke-crdb-region.js +137 -0
- package/dist/composites/gpu-node-pool.js +74 -0
- package/dist/composites/index.js +15 -0
- package/dist/composites/landing-zone.js +89 -0
- package/dist/composites/managed-certificate.js +46 -0
- package/dist/composites/memorystore-redis.js +52 -0
- package/dist/composites/multi-region-vpc.js +108 -0
- package/dist/composites/private-service.js +50 -0
- package/dist/composites/pubsub-pipeline.js +63 -0
- package/dist/composites/secure-project.js +85 -0
- package/dist/composites/vpc-network.js +113 -0
- package/dist/coverage.js +28 -0
- package/dist/deep-observe-hooks.js +152 -0
- package/dist/deep-observe.js +273 -0
- package/dist/default-labels.js +67 -0
- package/dist/describe-resources.js +264 -0
- package/dist/detect.js +16 -0
- package/dist/export-resources.js +59 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1804 -0
- package/dist/generated/runtime.js +4 -0
- package/dist/governance.js +98 -0
- package/dist/health.d.ts +42 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +87 -0
- package/dist/import/generator.js +68 -0
- package/dist/import/live-export.js +73 -0
- package/dist/import/parser.js +61 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -0
- package/dist/integrity.json +5 -5
- package/dist/lint/audit-catalog.js +38 -0
- package/dist/lint/audit-lineage.js +63 -0
- package/dist/lint/post-synth/gcp-helpers.js +91 -0
- package/dist/lint/post-synth/index.js +54 -0
- package/dist/lint/post-synth/schema-registry.d.ts.map +1 -1
- package/dist/lint/post-synth/schema-registry.js +69 -0
- package/dist/lint/post-synth/wgc101.js +47 -0
- package/dist/lint/post-synth/wgc102.js +29 -0
- package/dist/lint/post-synth/wgc103.js +37 -0
- package/dist/lint/post-synth/wgc104.js +34 -0
- package/dist/lint/post-synth/wgc105.js +39 -0
- package/dist/lint/post-synth/wgc106.js +30 -0
- package/dist/lint/post-synth/wgc107.js +33 -0
- package/dist/lint/post-synth/wgc108.js +34 -0
- package/dist/lint/post-synth/wgc109.js +33 -0
- package/dist/lint/post-synth/wgc110.js +32 -0
- package/dist/lint/post-synth/wgc111.js +47 -0
- package/dist/lint/post-synth/wgc112.js +46 -0
- package/dist/lint/post-synth/wgc113.js +35 -0
- package/dist/lint/post-synth/wgc201.js +30 -0
- package/dist/lint/post-synth/wgc202.js +33 -0
- package/dist/lint/post-synth/wgc203.js +35 -0
- package/dist/lint/post-synth/wgc204.js +33 -0
- package/dist/lint/post-synth/wgc301.js +28 -0
- package/dist/lint/post-synth/wgc302.js +28 -0
- package/dist/lint/post-synth/wgc303.js +29 -0
- package/dist/lint/post-synth/wgc401.js +50 -0
- package/dist/lint/post-synth/wgc402.js +46 -0
- package/dist/lint/post-synth/wgc403.js +74 -0
- package/dist/lint/post-synth/wgc501.js +63 -0
- package/dist/lint/post-synth/wgc502.js +37 -0
- package/dist/lint/post-synth/wgc503.js +49 -0
- package/dist/lint/rules/hardcoded-project.js +51 -0
- package/dist/lint/rules/hardcoded-region.js +51 -0
- package/dist/lint/rules/index.js +3 -0
- package/dist/lint/rules/public-iam.js +37 -0
- package/dist/lsp/completions.d.ts.map +1 -1
- package/dist/lsp/completions.js +15 -0
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/lsp/hover.js +46 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +1848 -481
- package/dist/okf/types/API.md +2 -0
- package/dist/okf/types/APIConfig.md +3 -0
- package/dist/okf/types/APIQuotaAdjusterSettings.md +2 -0
- package/dist/okf/types/APIQuotaPreference.md +2 -0
- package/dist/okf/types/AccessBoundaryPolicy.md +2 -0
- package/dist/okf/types/AccessLevel.md +2 -0
- package/dist/okf/types/AccessLevelCondition.md +1 -0
- package/dist/okf/types/AccessPolicy.md +4 -0
- package/dist/okf/types/AddonsConfig.md +1 -0
- package/dist/okf/types/AgentPool.md +2 -0
- package/dist/okf/types/AiplatformModel.md +2 -0
- package/dist/okf/types/AistreamsCluster.md +2 -0
- package/dist/okf/types/AlertPolicy.md +2 -0
- package/dist/okf/types/AlloydbBackup.md +9 -0
- package/dist/okf/types/AlloydbCluster.md +5 -0
- package/dist/okf/types/AlloydbInstance.md +10 -0
- package/dist/okf/types/AnalyticsAccount.md +2 -0
- package/dist/okf/types/AndroidApp.md +4 -0
- package/dist/okf/types/AnywhereCache.md +2 -0
- package/dist/okf/types/ApigatewayGateway.md +3 -0
- package/dist/okf/types/ApigeeEnvironment.md +5 -0
- package/dist/okf/types/ApigeeInstance.md +2 -0
- package/dist/okf/types/ApihubDeployment.md +2 -0
- package/dist/okf/types/ApikeysKey.md +2 -0
- package/dist/okf/types/AppConnection.md +1 -0
- package/dist/okf/types/AppConnector.md +2 -0
- package/dist/okf/types/AppGateway.md +3 -0
- package/dist/okf/types/AppProfile.md +3 -0
- package/dist/okf/types/Application.md +2 -0
- package/dist/okf/types/ArtifactRegistryRepository.md +4 -0
- package/dist/okf/types/Assignment.md +2 -0
- package/dist/okf/types/Attestor.md +2 -0
- package/dist/okf/types/AuthorizationPolicy.md +4 -0
- package/dist/okf/types/AuthorizedView.md +2 -0
- package/dist/okf/types/AutokeyConfig.md +2 -0
- package/dist/okf/types/Automation.md +2 -0
- package/dist/okf/types/Autoscaler.md +3 -0
- package/dist/okf/types/AutoscalingPolicy.md +2 -0
- package/dist/okf/types/BQJob.md +3 -0
- package/dist/okf/types/BackendBucket.md +3 -0
- package/dist/okf/types/BackendBucketSignedURLKey.md +1 -0
- package/dist/okf/types/BackendService.md +5 -0
- package/dist/okf/types/BackendServiceSignedURLKey.md +1 -0
- package/dist/okf/types/BackupPlanAssociation.md +2 -0
- package/dist/okf/types/BackupPolicy.md +2 -0
- package/dist/okf/types/BackupdrBackupPlan.md +2 -0
- package/dist/okf/types/BackupdrBackupVault.md +2 -0
- package/dist/okf/types/Batch.md +2 -0
- package/dist/okf/types/BatchJob.md +2 -0
- package/dist/okf/types/BatchTask.md +3 -0
- package/dist/okf/types/BigLakeCatalog.md +2 -0
- package/dist/okf/types/BigLakeDatabase.md +2 -0
- package/dist/okf/types/BigLakeTable.md +2 -0
- package/dist/okf/types/BigQueryDataPolicy.md +2 -0
- package/dist/okf/types/BigQueryDataset.md +6 -0
- package/dist/okf/types/BigQueryExport.md +2 -0
- package/dist/okf/types/BigQueryTable.md +11 -0
- package/dist/okf/types/BigqueryconnectionConnection.md +2 -0
- package/dist/okf/types/BigquerydatatransferConfig.md +2 -0
- package/dist/okf/types/BigqueryreservationReservation.md +2 -0
- package/dist/okf/types/BigtableInstance.md +1 -0
- package/dist/okf/types/BigtableTable.md +2 -0
- package/dist/okf/types/BillingAccount.md +2 -0
- package/dist/okf/types/BinaryauthorizationPolicy.md +3 -0
- package/dist/okf/types/Brand.md +2 -0
- package/dist/okf/types/BtBackup.md +2 -0
- package/dist/okf/types/BtCluster.md +2 -0
- package/dist/okf/types/Bucket.md +2 -0
- package/dist/okf/types/BucketAccessControl.md +3 -0
- package/dist/okf/types/Budget.md +2 -0
- package/dist/okf/types/CAPool.md +1 -0
- package/dist/okf/types/CapacityCommitment.md +5 -0
- package/dist/okf/types/CertificateAuthority.md +7 -0
- package/dist/okf/types/CertificateIssuanceConfig.md +2 -0
- package/dist/okf/types/CertificateMap.md +3 -0
- package/dist/okf/types/CertificateMapEntry.md +4 -0
- package/dist/okf/types/CertificateTemplate.md +3 -0
- package/dist/okf/types/CertificatemanagerCertificate.md +1 -0
- package/dist/okf/types/ClientConnectorService.md +2 -0
- package/dist/okf/types/ClientTLSPolicy.md +3 -0
- package/dist/okf/types/CloudBatchResourceAllowance.md +2 -0
- package/dist/okf/types/CloudFunction.md +4 -0
- package/dist/okf/types/CloudRunJob.md +13 -0
- package/dist/okf/types/CloudRunService.md +13 -0
- package/dist/okf/types/CloudbuildTrigger.md +4 -0
- package/dist/okf/types/ClouddmsPrivateConnection.md +2 -0
- package/dist/okf/types/CloudidentityGroup.md +5 -0
- package/dist/okf/types/CloudidentityMembership.md +6 -0
- package/dist/okf/types/CloudidsEndpoint.md +1 -0
- package/dist/okf/types/CloudschedulerJob.md +5 -0
- package/dist/okf/types/ComposerEnvironment.md +2 -0
- package/dist/okf/types/ComputeAddress.md +4 -0
- package/dist/okf/types/ComputeDisk.md +9 -0
- package/dist/okf/types/ComputeFirewallPolicy.md +7 -0
- package/dist/okf/types/ComputeHealthCheck.md +4 -0
- package/dist/okf/types/ComputeInstance.md +8 -0
- package/dist/okf/types/ComputeNetworkPeering.md +3 -0
- package/dist/okf/types/ComputeNodeGroup.md +3 -0
- package/dist/okf/types/ComputeReservation.md +6 -0
- package/dist/okf/types/ComputeRoute.md +3 -0
- package/dist/okf/types/ComputeSnapshot.md +7 -0
- package/dist/okf/types/ConfigcontrollerInstance.md +3 -0
- package/dist/okf/types/ConnectionProfile.md +2 -0
- package/dist/okf/types/ConnectivityTest.md +2 -0
- package/dist/okf/types/Connector.md +3 -0
- package/dist/okf/types/ConsentStore.md +1 -0
- package/dist/okf/types/ConsumerGroup.md +2 -0
- package/dist/okf/types/ConsumerQuotaOverride.md +2 -0
- package/dist/okf/types/Contact.md +2 -0
- package/dist/okf/types/ContainerattachedCluster.md +8 -0
- package/dist/okf/types/ConversionWorkspace.md +2 -0
- package/dist/okf/types/CryptoKeyVersion.md +5 -0
- package/dist/okf/types/CustomClass.md +2 -0
- package/dist/okf/types/CustomConstraint.md +2 -0
- package/dist/okf/types/CustomRole.md +3 -0
- package/dist/okf/types/CustomTargetType.md +2 -0
- package/dist/okf/types/DICOMStore.md +2 -0
- package/dist/okf/types/DNSAuthorization.md +2 -0
- package/dist/okf/types/DNSManagedZone.md +3 -0
- package/dist/okf/types/DNSRecordSet.md +1 -0
- package/dist/okf/types/Dashboard.md +2 -0
- package/dist/okf/types/DataExchange.md +2 -0
- package/dist/okf/types/DataLabelingJob.md +2 -0
- package/dist/okf/types/DataPolicy.md +2 -0
- package/dist/okf/types/DataStore.md +2 -0
- package/dist/okf/types/DataStoreTargetSite.md +2 -0
- package/dist/okf/types/Database.md +2 -0
- package/dist/okf/types/DatacatalogEntryGroup.md +2 -0
- package/dist/okf/types/DataflowJob.md +4 -0
- package/dist/okf/types/DataformRepository.md +2 -0
- package/dist/okf/types/DatafusionInstance.md +10 -0
- package/dist/okf/types/DataplexEntryGroup.md +2 -0
- package/dist/okf/types/DataplexTask.md +2 -0
- package/dist/okf/types/DataprocCluster.md +2 -0
- package/dist/okf/types/DataprocJob.md +2 -0
- package/dist/okf/types/DataprocNodeGroup.md +2 -0
- package/dist/okf/types/DataprocSession.md +2 -0
- package/dist/okf/types/DatasetAccess.md +2 -0
- package/dist/okf/types/DatastoreIndex.md +2 -0
- package/dist/okf/types/DatastreamPrivateConnection.md +2 -0
- package/dist/okf/types/DatastreamRoute.md +2 -0
- package/dist/okf/types/DefaultObjectAccessControl.md +5 -0
- package/dist/okf/types/DefaultSupportedIDPConfig.md +2 -0
- package/dist/okf/types/DeidentifyTemplate.md +4 -0
- package/dist/okf/types/DeliveryPipeline.md +2 -0
- package/dist/okf/types/DenyPolicy.md +2 -0
- package/dist/okf/types/DeployPolicy.md +2 -0
- package/dist/okf/types/DeploymentResourcePool.md +2 -0
- package/dist/okf/types/DeploymentmanagerDeployment.md +4 -0
- package/dist/okf/types/Device.md +8 -0
- package/dist/okf/types/DeviceRegistry.md +1 -0
- package/dist/okf/types/DevicestreamingSession.md +2 -0
- package/dist/okf/types/DialogflowAgent.md +2 -0
- package/dist/okf/types/DialogflowEntityType.md +2 -0
- package/dist/okf/types/DialogflowIntent.md +3 -0
- package/dist/okf/types/DialogflowcxAgent.md +3 -0
- package/dist/okf/types/DialogflowcxEntityType.md +2 -0
- package/dist/okf/types/DialogflowcxIntent.md +2 -0
- package/dist/okf/types/DiscoveredService.md +2 -0
- package/dist/okf/types/DiscoveredWorkload.md +2 -0
- package/dist/okf/types/DiskResourcePolicyAttachment.md +1 -0
- package/dist/okf/types/DnsPolicy.md +1 -0
- package/dist/okf/types/Document.md +2 -0
- package/dist/okf/types/DomainMapping.md +2 -0
- package/dist/okf/types/EdgeCacheKeyset.md +1 -0
- package/dist/okf/types/EdgeCacheOrigin.md +1 -0
- package/dist/okf/types/EdgeCacheService.md +1 -0
- package/dist/okf/types/EdgecontainerCluster.md +9 -0
- package/dist/okf/types/EdgecontainerNodePool.md +4 -0
- package/dist/okf/types/EdgenetworkNetwork.md +4 -0
- package/dist/okf/types/EndpointAttachment.md +2 -0
- package/dist/okf/types/EndpointPolicy.md +3 -0
- package/dist/okf/types/Engine.md +2 -0
- package/dist/okf/types/Enrollment.md +2 -0
- package/dist/okf/types/Entitlement.md +2 -0
- package/dist/okf/types/Entry.md +2 -0
- package/dist/okf/types/EntryType.md +2 -0
- package/dist/okf/types/Envgroup.md +2 -0
- package/dist/okf/types/EnvgroupAttachment.md +2 -0
- package/dist/okf/types/EventarcChannel.md +2 -0
- package/dist/okf/types/EventarcTrigger.md +5 -0
- package/dist/okf/types/ExampleStore.md +2 -0
- package/dist/okf/types/ExternalAccessRule.md +2 -0
- package/dist/okf/types/ExternalAddress.md +2 -0
- package/dist/okf/types/ExternalVPNGateway.md +3 -0
- package/dist/okf/types/FHIRStore.md +2 -0
- package/dist/okf/types/Feature.md +4 -0
- package/dist/okf/types/FeatureMembership.md +1 -0
- package/dist/okf/types/Featurestore.md +2 -0
- package/dist/okf/types/FeaturestoreEntityType.md +5 -0
- package/dist/okf/types/FeaturestoreEntityTypeFeature.md +5 -0
- package/dist/okf/types/Federation.md +2 -0
- package/dist/okf/types/Feed.md +2 -0
- package/dist/okf/types/Field.md +2 -0
- package/dist/okf/types/FilestoreBackup.md +7 -0
- package/dist/okf/types/FilestoreInstance.md +5 -0
- package/dist/okf/types/FilestoreSnapshot.md +4 -0
- package/dist/okf/types/FirebaseProject.md +3 -0
- package/dist/okf/types/FirebasedatabaseInstance.md +4 -0
- package/dist/okf/types/FirebasehostingChannel.md +2 -0
- package/dist/okf/types/FirestoreBackupSchedule.md +2 -0
- package/dist/okf/types/FirestoreIndex.md +2 -0
- package/dist/okf/types/Firewall.md +3 -0
- package/dist/okf/types/FirewallPolicyAssociation.md +2 -0
- package/dist/okf/types/FirewallPolicyRule.md +4 -0
- package/dist/okf/types/FirewallRule.md +1 -0
- package/dist/okf/types/FlexTemplateJob.md +4 -0
- package/dist/okf/types/FlexibleAppVersion.md +2 -0
- package/dist/okf/types/Flow.md +2 -0
- package/dist/okf/types/FolderFeed.md +3 -0
- package/dist/okf/types/ForwardingRule.md +10 -0
- package/dist/okf/types/Fulfillment.md +2 -0
- package/dist/okf/types/Function.md +5 -0
- package/dist/okf/types/FutureReservation.md +2 -0
- package/dist/okf/types/GCPServiceAccount.md +5 -0
- package/dist/okf/types/GCPUserAccessBinding.md +2 -0
- package/dist/okf/types/GCPolicy.md +1 -0
- package/dist/okf/types/GKECluster.md +8 -0
- package/dist/okf/types/GRPCRoute.md +4 -0
- package/dist/okf/types/GcsFolder.md +2 -0
- package/dist/okf/types/GkebackupBackup.md +2 -0
- package/dist/okf/types/GkebackupBackupPlan.md +2 -0
- package/dist/okf/types/GkehubMembership.md +6 -0
- package/dist/okf/types/GkehubNamespace.md +2 -0
- package/dist/okf/types/GlobalNetworkEndpoint.md +1 -0
- package/dist/okf/types/GlobalNetworkEndpointGroup.md +2 -0
- package/dist/okf/types/GoogleChannelConfig.md +2 -0
- package/dist/okf/types/GuestPolicy.md +4 -0
- package/dist/okf/types/HL7V2Store.md +2 -0
- package/dist/okf/types/HMACKey.md +5 -0
- package/dist/okf/types/HTTPHealthCheck.md +3 -0
- package/dist/okf/types/HTTPRoute.md +4 -0
- package/dist/okf/types/HTTPSHealthCheck.md +3 -0
- package/dist/okf/types/HealthcareDataset.md +2 -0
- package/dist/okf/types/Hub.md +5 -0
- package/dist/okf/types/IAMAuditConfig.md +1 -0
- package/dist/okf/types/IAMPolicy.md +1 -0
- package/dist/okf/types/IAMPolicyMember.md +1 -0
- package/dist/okf/types/IdentityAwareProxyClient.md +2 -0
- package/dist/okf/types/IdentityplatformConfig.md +2 -0
- package/dist/okf/types/Image.md +5 -0
- package/dist/okf/types/ImportJob.md +2 -0
- package/dist/okf/types/InboundSAMLConfig.md +1 -0
- package/dist/okf/types/IndexEndpoint.md +6 -0
- package/dist/okf/types/InspectTemplate.md +4 -0
- package/dist/okf/types/InstanceAttachment.md +2 -0
- package/dist/okf/types/InstanceConfig.md +2 -0
- package/dist/okf/types/InstanceEndpoint.md +1 -0
- package/dist/okf/types/InstanceGroup.md +3 -0
- package/dist/okf/types/InstanceGroupManager.md +8 -0
- package/dist/okf/types/InstanceGroupNamedPort.md +1 -0
- package/dist/okf/types/InstanceTemplate.md +5 -0
- package/dist/okf/types/InterceptDeployment.md +2 -0
- package/dist/okf/types/InterceptEndpointGroup.md +2 -0
- package/dist/okf/types/Interconnect.md +2 -0
- package/dist/okf/types/InterconnectAttachment.md +9 -0
- package/dist/okf/types/InternalRange.md +2 -0
- package/dist/okf/types/JobTrigger.md +5 -0
- package/dist/okf/types/KMSCryptoKey.md +2 -0
- package/dist/okf/types/KMSKeyRing.md +2 -0
- package/dist/okf/types/KeyHandle.md +2 -0
- package/dist/okf/types/KeyRingImportJob.md +4 -0
- package/dist/okf/types/LBRouteExtension.md +2 -0
- package/dist/okf/types/Lake.md +2 -0
- package/dist/okf/types/Lien.md +3 -0
- package/dist/okf/types/Link.md +2 -0
- package/dist/okf/types/Listing.md +2 -0
- package/dist/okf/types/LocationTagBinding.md +3 -0
- package/dist/okf/types/LogBucket.md +4 -0
- package/dist/okf/types/LogExclusion.md +3 -0
- package/dist/okf/types/LogMetric.md +3 -0
- package/dist/okf/types/LogSink.md +2 -0
- package/dist/okf/types/LogView.md +3 -0
- package/dist/okf/types/LogicalView.md +3 -0
- package/dist/okf/types/Machine.md +2 -0
- package/dist/okf/types/MachineImage.md +2 -0
- package/dist/okf/types/ManagedFolder.md +2 -0
- package/dist/okf/types/ManagedSSLCertificate.md +1 -0
- package/dist/okf/types/ManagedkafkaCluster.md +2 -0
- package/dist/okf/types/ManagedkafkaTopic.md +2 -0
- package/dist/okf/types/ManagementServer.md +2 -0
- package/dist/okf/types/MaterializedView.md +3 -0
- package/dist/okf/types/MembershipBinding.md +2 -0
- package/dist/okf/types/MemcacheInstance.md +4 -0
- package/dist/okf/types/MemorystoreInstance.md +2 -0
- package/dist/okf/types/Mesh.md +4 -0
- package/dist/okf/types/MetadataStore.md +2 -0
- package/dist/okf/types/MetastoreBackup.md +2 -0
- package/dist/okf/types/MetastoreService.md +2 -0
- package/dist/okf/types/MetricDescriptor.md +2 -0
- package/dist/okf/types/MigrationJob.md +2 -0
- package/dist/okf/types/MlengineModel.md +1 -0
- package/dist/okf/types/MonGroup.md +1 -0
- package/dist/okf/types/MonService.md +1 -0
- package/dist/okf/types/MonitoredProject.md +2 -0
- package/dist/okf/types/MuteConfig.md +2 -0
- package/dist/okf/types/NATAddress.md +3 -0
- package/dist/okf/types/NetappBackupVault.md +2 -0
- package/dist/okf/types/NetworkAttachment.md +2 -0
- package/dist/okf/types/NetworkEdgeSecurityService.md +2 -0
- package/dist/okf/types/NetworkEndpoint.md +1 -0
- package/dist/okf/types/NetworkEndpointGroup.md +3 -0
- package/dist/okf/types/NetworkFirewallPolicy.md +7 -0
- package/dist/okf/types/NetworkFirewallPolicyAssociation.md +2 -0
- package/dist/okf/types/NetworkFirewallPolicyRule.md +3 -0
- package/dist/okf/types/NetworkPeeringRoutesConfig.md +1 -0
- package/dist/okf/types/NetworkPolicy.md +2 -0
- package/dist/okf/types/NetworkservicesGateway.md +4 -0
- package/dist/okf/types/Node.md +2 -0
- package/dist/okf/types/NodePool.md +2 -0
- package/dist/okf/types/NodeTemplate.md +4 -0
- package/dist/okf/types/Note.md +3 -0
- package/dist/okf/types/NotebookInstance.md +2 -0
- package/dist/okf/types/NotebooksEnvironment.md +2 -0
- package/dist/okf/types/Notification.md +3 -0
- package/dist/okf/types/NotificationChannel.md +3 -0
- package/dist/okf/types/NotificationConfig.md +3 -0
- package/dist/okf/types/OAuthIDPConfig.md +1 -0
- package/dist/okf/types/OSPolicyAssignment.md +9 -0
- package/dist/okf/types/Occurrence.md +5 -0
- package/dist/okf/types/Organization.md +10 -0
- package/dist/okf/types/OrganizationFeed.md +2 -0
- package/dist/okf/types/OrganizationSecurityPolicy.md +3 -0
- package/dist/okf/types/OrganizationSecurityPolicyAssociation.md +2 -0
- package/dist/okf/types/OrganizationSecurityPolicyRule.md +1 -0
- package/dist/okf/types/OrgpolicyPolicy.md +2 -0
- package/dist/okf/types/PacketMirroring.md +4 -0
- package/dist/okf/types/Page.md +2 -0
- package/dist/okf/types/Parameter.md +2 -0
- package/dist/okf/types/ParameterVersion.md +2 -0
- package/dist/okf/types/PartialPolicy.md +1 -0
- package/dist/okf/types/PatchDeployment.md +5 -0
- package/dist/okf/types/PeeredDNSDomain.md +2 -0
- package/dist/okf/types/PerInstanceConfig.md +1 -0
- package/dist/okf/types/PhraseSet.md +2 -0
- package/dist/okf/types/PlatformPolicy.md +2 -0
- package/dist/okf/types/PolicyTag.md +3 -0
- package/dist/okf/types/PrivateCloud.md +2 -0
- package/dist/okf/types/PrivatecaCertificate.md +5 -0
- package/dist/okf/types/Processor.md +2 -0
- package/dist/okf/types/ProcessorDefaultVersion.md +1 -0
- package/dist/okf/types/ProcessorVersion.md +2 -0
- package/dist/okf/types/ProjectDefaultConfig.md +2 -0
- package/dist/okf/types/ProjectFeed.md +2 -0
- package/dist/okf/types/ProjectMetadata.md +1 -0
- package/dist/okf/types/PubSubSnapshot.md +2 -0
- package/dist/okf/types/PubSubSubscription.md +1 -0
- package/dist/okf/types/PubSubTopic.md +1 -0
- package/dist/okf/types/PubsubliteReservation.md +1 -0
- package/dist/okf/types/PubsubliteTopic.md +1 -0
- package/dist/okf/types/RecaptchaenterpriseFirewallPolicy.md +2 -0
- package/dist/okf/types/RecaptchaenterpriseKey.md +2 -0
- package/dist/okf/types/Recognizer.md +2 -0
- package/dist/okf/types/RedisCluster.md +2 -0
- package/dist/okf/types/RedisInstance.md +8 -0
- package/dist/okf/types/RegionAutoscaler.md +3 -0
- package/dist/okf/types/RegionDiskResourcePolicyAttachment.md +1 -0
- package/dist/okf/types/RegionNetworkEndpointGroup.md +2 -0
- package/dist/okf/types/RegionPerInstanceConfig.md +1 -0
- package/dist/okf/types/RegionSSLPolicy.md +4 -0
- package/dist/okf/types/RegionalEndpoint.md +2 -0
- package/dist/okf/types/ResourceBundle.md +2 -0
- package/dist/okf/types/ResourcePolicy.md +3 -0
- package/dist/okf/types/ResourcemanagerFolder.md +5 -0
- package/dist/okf/types/ResourcemanagerPolicy.md +3 -0
- package/dist/okf/types/ResourcemanagerProject.md +2 -0
- package/dist/okf/types/ResponsePolicy.md +1 -0
- package/dist/okf/types/ResponsePolicyRule.md +1 -0
- package/dist/okf/types/Restore.md +2 -0
- package/dist/okf/types/RestorePlan.md +2 -0
- package/dist/okf/types/Router.md +3 -0
- package/dist/okf/types/RouterInterface.md +1 -0
- package/dist/okf/types/RouterNAT.md +1 -0
- package/dist/okf/types/RouterPeer.md +2 -0
- package/dist/okf/types/Routine.md +3 -0
- package/dist/okf/types/Runtime.md +2 -0
- package/dist/okf/types/RuntimeTemplate.md +2 -0
- package/dist/okf/types/SQLDatabase.md +2 -0
- package/dist/okf/types/SQLInstance.md +10 -0
- package/dist/okf/types/SQLUser.md +1 -0
- package/dist/okf/types/SSHPublicKey.md +2 -0
- package/dist/okf/types/SSLCert.md +8 -0
- package/dist/okf/types/SSLCertificate.md +5 -0
- package/dist/okf/types/SSLPolicy.md +4 -0
- package/dist/okf/types/SavedQuery.md +2 -0
- package/dist/okf/types/Schema.md +1 -0
- package/dist/okf/types/Scope.md +5 -0
- package/dist/okf/types/ScopeRBACRoleBinding.md +2 -0
- package/dist/okf/types/SecretCiphertext.md +2 -0
- package/dist/okf/types/SecretManagerSecret.md +3 -0
- package/dist/okf/types/SecretManagerSecretVersion.md +6 -0
- package/dist/okf/types/SecuresourcemanagerInstance.md +2 -0
- package/dist/okf/types/SecuresourcemanagerRepository.md +2 -0
- package/dist/okf/types/SecurityPolicy.md +3 -0
- package/dist/okf/types/ServerTLSPolicy.md +3 -0
- package/dist/okf/types/ServiceAccountKey.md +6 -0
- package/dist/okf/types/ServiceAttachment.md +5 -0
- package/dist/okf/types/ServiceBinding.md +2 -0
- package/dist/okf/types/ServiceConnectionPolicy.md +2 -0
- package/dist/okf/types/ServiceIdentity.md +2 -0
- package/dist/okf/types/ServiceLevelObjective.md +4 -0
- package/dist/okf/types/ServicePerimeter.md +4 -0
- package/dist/okf/types/ServicePerimeterResource.md +1 -0
- package/dist/okf/types/ServiceProjectAttachment.md +2 -0
- package/dist/okf/types/ServiceSplitTraffic.md +1 -0
- package/dist/okf/types/ServicedirectoryEndpoint.md +2 -0
- package/dist/okf/types/ServicedirectoryNamespace.md +2 -0
- package/dist/okf/types/ServicedirectoryService.md +2 -0
- package/dist/okf/types/ServicenetworkingConnection.md +2 -0
- package/dist/okf/types/ServiceusageService.md +1 -0
- package/dist/okf/types/Settings.md +2 -0
- package/dist/okf/types/SharedVPCHostProject.md +1 -0
- package/dist/okf/types/SharedVPCServiceProject.md +1 -0
- package/dist/okf/types/Site.md +3 -0
- package/dist/okf/types/Source.md +2 -0
- package/dist/okf/types/SourcerepoRepository.md +3 -0
- package/dist/okf/types/SpannerBackupSchedule.md +2 -0
- package/dist/okf/types/SpannerDatabase.md +2 -0
- package/dist/okf/types/SpannerInstance.md +3 -0
- package/dist/okf/types/Spoke.md +5 -0
- package/dist/okf/types/StandardAppVersion.md +2 -0
- package/dist/okf/types/StorageBucket.md +3 -0
- package/dist/okf/types/StoragetransferJob.md +5 -0
- package/dist/okf/types/StoredInfoType.md +1 -0
- package/dist/okf/types/Stream.md +3 -0
- package/dist/okf/types/Subnet.md +5 -0
- package/dist/okf/types/Subnetwork.md +8 -0
- package/dist/okf/types/Subscription.md +1 -0
- package/dist/okf/types/SyncAuthorization.md +2 -0
- package/dist/okf/types/TCPRoute.md +4 -0
- package/dist/okf/types/TLSRoute.md +4 -0
- package/dist/okf/types/Tag.md +2 -0
- package/dist/okf/types/TagBinding.md +3 -0
- package/dist/okf/types/TagKey.md +6 -0
- package/dist/okf/types/TagTemplate.md +2 -0
- package/dist/okf/types/TagValue.md +6 -0
- package/dist/okf/types/Target.md +2 -0
- package/dist/okf/types/TargetGRPCProxy.md +5 -0
- package/dist/okf/types/TargetHTTPProxy.md +4 -0
- package/dist/okf/types/TargetHTTPSProxy.md +5 -0
- package/dist/okf/types/TargetInstance.md +3 -0
- package/dist/okf/types/TargetPool.md +2 -0
- package/dist/okf/types/TargetSSLProxy.md +4 -0
- package/dist/okf/types/TargetTCPProxy.md +5 -0
- package/dist/okf/types/TargetVPNGateway.md +4 -0
- package/dist/okf/types/TasksQueue.md +2 -0
- package/dist/okf/types/Taxonomy.md +3 -0
- package/dist/okf/types/Tenant.md +1 -0
- package/dist/okf/types/TenantDefaultSupportedIDPConfig.md +2 -0
- package/dist/okf/types/TenantInboundSAMLConfig.md +1 -0
- package/dist/okf/types/TenantOAuthIDPConfig.md +1 -0
- package/dist/okf/types/Tensorboard.md +6 -0
- package/dist/okf/types/URLMap.md +5 -0
- package/dist/okf/types/UptimeCheckConfig.md +1 -0
- package/dist/okf/types/User.md +2 -0
- package/dist/okf/types/VPCNetwork.md +3 -0
- package/dist/okf/types/VPNGateway.md +2 -0
- package/dist/okf/types/VPNTunnel.md +7 -0
- package/dist/okf/types/VertexaiDataset.md +1 -0
- package/dist/okf/types/VertexaiEndpoint.md +1 -0
- package/dist/okf/types/VertexaiIndex.md +1 -0
- package/dist/okf/types/VirtualMachine.md +2 -0
- package/dist/okf/types/VmwareengineNetwork.md +2 -0
- package/dist/okf/types/VmwareengineNetworkPeering.md +2 -0
- package/dist/okf/types/VpnConnection.md +3 -0
- package/dist/okf/types/WasmPlugin.md +2 -0
- package/dist/okf/types/WebApp.md +3 -0
- package/dist/okf/types/Webhook.md +3 -0
- package/dist/okf/types/WorkerPool.md +2 -0
- package/dist/okf/types/Workflow.md +2 -0
- package/dist/okf/types/WorkflowTemplate.md +4 -0
- package/dist/okf/types/WorkflowsExecution.md +2 -0
- package/dist/okf/types/WorkforcePool.md +3 -0
- package/dist/okf/types/WorkforcePoolProvider.md +2 -0
- package/dist/okf/types/Workload.md +2 -0
- package/dist/okf/types/WorkloadIdentityPool.md +2 -0
- package/dist/okf/types/WorkloadIdentityPoolProvider.md +2 -0
- package/dist/okf/types/Workstation.md +2 -0
- package/dist/okf/types/WorkstationCluster.md +2 -0
- package/dist/okf/types/WorkstationConfig.md +2 -0
- package/dist/okf/types/Zone.md +2 -0
- package/dist/op/activities/floci-gcp.js +49 -0
- package/dist/op/activities/gcp-apply.js +618 -0
- package/dist/op/activities/index.js +10 -0
- package/dist/op/builders.js +50 -0
- package/dist/ownership.js +38 -0
- package/dist/package-cli.js +20 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +377 -0
- package/dist/pseudo.js +15 -0
- package/dist/rules/schema-registry.ts +2 -1
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +247 -0
- package/dist/spec/fetch.js +107 -0
- package/dist/spec/parse.d.ts +1 -1
- package/dist/spec/parse.js +339 -0
- package/dist/types/index.d.ts +1367 -0
- package/dist/validate-cli.js +11 -0
- package/dist/validate.js +24 -0
- package/dist/variables.js +15 -0
- package/package.json +8 -8
- package/src/attributes.test.ts +16 -0
- package/src/codegen/generate.ts +8 -3
- package/src/codegen/package.ts +2 -2
- package/src/composites/catalog.ts +7 -1
- package/src/composites/cloud-run-service.ts +12 -5
- package/src/composites/composites.test.ts +17 -0
- package/src/generated/index.d.ts +1367 -0
- package/src/generated/index.ts +487 -487
- package/src/generated/lexicon-gcp.json +1848 -481
- package/src/health.test.ts +59 -0
- package/src/health.ts +123 -0
- package/src/index.ts +3 -0
- package/src/lint/post-synth/schema-registry.ts +2 -1
- package/src/lsp/completions.ts +2 -1
- package/src/lsp/hover.ts +2 -1
- package/src/plugin.ts +8 -0
- package/src/serializer-outputs.test.ts +26 -0
- package/src/serializer.ts +21 -3
- package/src/spec/parse.test.ts +42 -2
- package/src/spec/parse.ts +17 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for GCP Config Connector post-synthesis lint rules.
|
|
3
|
+
*
|
|
4
|
+
* Provides YAML parsing for multi-document Config Connector manifests
|
|
5
|
+
* and accessor utilities for common manifest fields.
|
|
6
|
+
*/
|
|
7
|
+
import { parseYAML } from "@intentius/chant/yaml";
|
|
8
|
+
export { getPrimaryOutput } from "@intentius/chant/lint/post-synth";
|
|
9
|
+
/**
|
|
10
|
+
* Split a multi-document YAML string on `---` boundaries and parse each
|
|
11
|
+
* document into a GcpManifest.
|
|
12
|
+
*/
|
|
13
|
+
export function parseGcpManifests(yaml) {
|
|
14
|
+
const documents = yaml.split(/^---\s*$/m);
|
|
15
|
+
const manifests = [];
|
|
16
|
+
for (const doc of documents) {
|
|
17
|
+
const trimmed = doc.trim();
|
|
18
|
+
if (trimmed === "" || trimmed === "---")
|
|
19
|
+
continue;
|
|
20
|
+
try {
|
|
21
|
+
const parsed = parseYAML(trimmed);
|
|
22
|
+
if (typeof parsed === "object" && parsed !== null) {
|
|
23
|
+
manifests.push(parsed);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Skip unparseable documents
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return manifests;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a manifest is a Config Connector resource
|
|
34
|
+
* (apiVersion contains cnrm.cloud.google.com).
|
|
35
|
+
*/
|
|
36
|
+
export function isConfigConnectorResource(manifest) {
|
|
37
|
+
return typeof manifest.apiVersion === "string" &&
|
|
38
|
+
manifest.apiVersion.includes("cnrm.cloud.google.com");
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Safely extract the spec from a manifest.
|
|
42
|
+
*/
|
|
43
|
+
export function getSpec(manifest) {
|
|
44
|
+
return manifest.spec ?? undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Safely extract annotations from a manifest's metadata.
|
|
48
|
+
*/
|
|
49
|
+
export function getAnnotations(manifest) {
|
|
50
|
+
return manifest.metadata?.annotations ?? undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get the resource name from metadata.
|
|
54
|
+
*/
|
|
55
|
+
export function getResourceName(manifest) {
|
|
56
|
+
return manifest.metadata?.name ?? "unknown";
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Recursively walk a spec object looking for keys ending in `Ref`
|
|
60
|
+
* (e.g. `networkRef`, `topicRef`, `clusterRef`) that have a `name`
|
|
61
|
+
* sub-field. Returns the set of referenced names.
|
|
62
|
+
*
|
|
63
|
+
* Skips `external` refs (cross-project references outside the template).
|
|
64
|
+
*/
|
|
65
|
+
export function findResourceRefs(obj) {
|
|
66
|
+
const refs = new Set();
|
|
67
|
+
walkForRefs(obj, refs);
|
|
68
|
+
return refs;
|
|
69
|
+
}
|
|
70
|
+
function walkForRefs(value, refs) {
|
|
71
|
+
if (value === null || value === undefined)
|
|
72
|
+
return;
|
|
73
|
+
if (Array.isArray(value)) {
|
|
74
|
+
for (const item of value) {
|
|
75
|
+
walkForRefs(item, refs);
|
|
76
|
+
}
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (typeof value === "object") {
|
|
80
|
+
const obj = value;
|
|
81
|
+
for (const [key, val] of Object.entries(obj)) {
|
|
82
|
+
if (key.endsWith("Ref") && typeof val === "object" && val !== null) {
|
|
83
|
+
const refObj = val;
|
|
84
|
+
if (typeof refObj.name === "string" && !refObj.external) {
|
|
85
|
+
refs.add(refObj.name);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
walkForRefs(val, refs);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { wgc101 } from "./wgc101.js";
|
|
2
|
+
import { wgc102 } from "./wgc102.js";
|
|
3
|
+
import { wgc103 } from "./wgc103.js";
|
|
4
|
+
import { wgc104 } from "./wgc104.js";
|
|
5
|
+
import { wgc105 } from "./wgc105.js";
|
|
6
|
+
import { wgc106 } from "./wgc106.js";
|
|
7
|
+
import { wgc107 } from "./wgc107.js";
|
|
8
|
+
import { wgc108 } from "./wgc108.js";
|
|
9
|
+
import { wgc109 } from "./wgc109.js";
|
|
10
|
+
import { wgc110 } from "./wgc110.js";
|
|
11
|
+
import { wgc111 } from "./wgc111.js";
|
|
12
|
+
import { wgc112 } from "./wgc112.js";
|
|
13
|
+
import { wgc113 } from "./wgc113.js";
|
|
14
|
+
import { wgc201 } from "./wgc201.js";
|
|
15
|
+
import { wgc202 } from "./wgc202.js";
|
|
16
|
+
import { wgc203 } from "./wgc203.js";
|
|
17
|
+
import { wgc204 } from "./wgc204.js";
|
|
18
|
+
import { wgc301 } from "./wgc301.js";
|
|
19
|
+
import { wgc302 } from "./wgc302.js";
|
|
20
|
+
import { wgc303 } from "./wgc303.js";
|
|
21
|
+
import { wgc401 } from "./wgc401.js";
|
|
22
|
+
import { wgc402 } from "./wgc402.js";
|
|
23
|
+
import { wgc403 } from "./wgc403.js";
|
|
24
|
+
import { wgc501 } from "./wgc501.js";
|
|
25
|
+
import { wgc502 } from "./wgc502.js";
|
|
26
|
+
import { wgc503 } from "./wgc503.js";
|
|
27
|
+
export const postSynthChecks = [
|
|
28
|
+
wgc101,
|
|
29
|
+
wgc102,
|
|
30
|
+
wgc103,
|
|
31
|
+
wgc104,
|
|
32
|
+
wgc105,
|
|
33
|
+
wgc106,
|
|
34
|
+
wgc107,
|
|
35
|
+
wgc108,
|
|
36
|
+
wgc109,
|
|
37
|
+
wgc110,
|
|
38
|
+
wgc111,
|
|
39
|
+
wgc112,
|
|
40
|
+
wgc113,
|
|
41
|
+
wgc201,
|
|
42
|
+
wgc202,
|
|
43
|
+
wgc203,
|
|
44
|
+
wgc204,
|
|
45
|
+
wgc301,
|
|
46
|
+
wgc302,
|
|
47
|
+
wgc303,
|
|
48
|
+
wgc401,
|
|
49
|
+
wgc402,
|
|
50
|
+
wgc403,
|
|
51
|
+
wgc501,
|
|
52
|
+
wgc502,
|
|
53
|
+
wgc503,
|
|
54
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-registry.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/schema-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"schema-registry.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/schema-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAUD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAoB/D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAiBxD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAavF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema registry for GCP Config Connector resources.
|
|
3
|
+
*
|
|
4
|
+
* Loads lexicon-gcp.json and builds a lookup from CRD kind to field schema,
|
|
5
|
+
* used by post-synth rules to validate YAML against known CRD schemas.
|
|
6
|
+
*/
|
|
7
|
+
import { createRequire } from "module";
|
|
8
|
+
import { moduleSourceUrl } from "@intentius/chant/module-source";
|
|
9
|
+
let cachedRegistry = null;
|
|
10
|
+
/**
|
|
11
|
+
* Get the schema registry: Map<gvkKind, ResourceSchema>.
|
|
12
|
+
*/
|
|
13
|
+
export function getSchemaRegistry() {
|
|
14
|
+
if (cachedRegistry)
|
|
15
|
+
return cachedRegistry;
|
|
16
|
+
cachedRegistry = new Map();
|
|
17
|
+
try {
|
|
18
|
+
// Built lazily (not at module load) so importing this module stays edge-safe:
|
|
19
|
+
// `createRequire(import.meta.url)` throws where import.meta.url is undefined
|
|
20
|
+
// (bundled Workers); there it's caught here and the registry is just empty.
|
|
21
|
+
const require = createRequire(moduleSourceUrl(import.meta.url));
|
|
22
|
+
const lexicon = require("../../generated/lexicon-gcp.json");
|
|
23
|
+
for (const entry of Object.values(lexicon)) {
|
|
24
|
+
if (entry.kind === "resource" && entry.gvkKind && entry.schema) {
|
|
25
|
+
cachedRegistry.set(entry.gvkKind, entry.schema);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Lexicon JSON not yet generated — return empty registry
|
|
31
|
+
}
|
|
32
|
+
return cachedRegistry;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Levenshtein distance between two strings.
|
|
36
|
+
*/
|
|
37
|
+
export function levenshtein(a, b) {
|
|
38
|
+
const m = a.length;
|
|
39
|
+
const n = b.length;
|
|
40
|
+
const dp = Array.from({ length: m + 1 }, () => Array(n + 1).fill(0));
|
|
41
|
+
for (let i = 0; i <= m; i++)
|
|
42
|
+
dp[i][0] = i;
|
|
43
|
+
for (let j = 0; j <= n; j++)
|
|
44
|
+
dp[0][j] = j;
|
|
45
|
+
for (let i = 1; i <= m; i++) {
|
|
46
|
+
for (let j = 1; j <= n; j++) {
|
|
47
|
+
dp[i][j] = a[i - 1] === b[j - 1]
|
|
48
|
+
? dp[i - 1][j - 1]
|
|
49
|
+
: 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return dp[m][n];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Find the closest field name by Levenshtein distance.
|
|
56
|
+
* Returns the suggestion if distance ≤ 3, otherwise undefined.
|
|
57
|
+
*/
|
|
58
|
+
export function suggestField(unknown, knownFields) {
|
|
59
|
+
let best;
|
|
60
|
+
let bestDist = 4; // threshold
|
|
61
|
+
for (const field of knownFields) {
|
|
62
|
+
const dist = levenshtein(unknown.toLowerCase(), field.toLowerCase());
|
|
63
|
+
if (dist < bestDist) {
|
|
64
|
+
bestDist = dist;
|
|
65
|
+
best = field;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return best;
|
|
69
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC101: Missing encryption on StorageBucket or SQLInstance
|
|
3
|
+
*/
|
|
4
|
+
import { parseYAML } from "@intentius/chant/yaml";
|
|
5
|
+
export const wgc101 = {
|
|
6
|
+
id: "WGC101",
|
|
7
|
+
description: "StorageBucket or SQLInstance without encryption configuration",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
const documents = output.split(/^---\s*$/m).filter((d) => d.trim().length > 0);
|
|
14
|
+
for (const docStr of documents) {
|
|
15
|
+
const doc = parseYAML(docStr);
|
|
16
|
+
if (!doc)
|
|
17
|
+
continue;
|
|
18
|
+
const kind = doc.kind;
|
|
19
|
+
const metadata = doc.metadata;
|
|
20
|
+
const spec = doc.spec;
|
|
21
|
+
const name = metadata?.name ?? "unknown";
|
|
22
|
+
if (kind === "StorageBucket" && spec && !spec.encryption) {
|
|
23
|
+
diagnostics.push({
|
|
24
|
+
checkId: "WGC101",
|
|
25
|
+
severity: "warning",
|
|
26
|
+
message: `StorageBucket "${name}" has no encryption configuration — consider adding spec.encryption.kmsKeyRef`,
|
|
27
|
+
entity: name,
|
|
28
|
+
lexicon: "gcp",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (kind === "SQLInstance" && spec) {
|
|
32
|
+
const settings = spec.settings;
|
|
33
|
+
if (!settings?.ipConfiguration || !settings.backupConfiguration) {
|
|
34
|
+
diagnostics.push({
|
|
35
|
+
checkId: "WGC101",
|
|
36
|
+
severity: "warning",
|
|
37
|
+
message: `SQLInstance "${name}" may be missing encryption or backup configuration`,
|
|
38
|
+
entity: name,
|
|
39
|
+
lexicon: "gcp",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return diagnostics;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC102: Public IAM in serialized output
|
|
3
|
+
*/
|
|
4
|
+
export const wgc102 = {
|
|
5
|
+
id: "WGC102",
|
|
6
|
+
description: "allUsers/allAuthenticatedUsers detected in serialized Config Connector YAML",
|
|
7
|
+
check(ctx) {
|
|
8
|
+
const diagnostics = [];
|
|
9
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
10
|
+
if (typeof output !== "string")
|
|
11
|
+
continue;
|
|
12
|
+
const lines = output.split("\n");
|
|
13
|
+
for (let i = 0; i < lines.length; i++) {
|
|
14
|
+
const line = lines[i];
|
|
15
|
+
if (line.includes("allUsers") || line.includes("allAuthenticatedUsers")) {
|
|
16
|
+
const member = line.includes("allUsers") ? "allUsers" : "allAuthenticatedUsers";
|
|
17
|
+
diagnostics.push({
|
|
18
|
+
checkId: "WGC102",
|
|
19
|
+
severity: "warning",
|
|
20
|
+
message: `Public IAM member "${member}" found in output (line ${i + 1}) — this grants public access`,
|
|
21
|
+
entity: `line:${i + 1}`,
|
|
22
|
+
lexicon: "gcp",
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return diagnostics;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC103: Missing project annotation
|
|
3
|
+
*/
|
|
4
|
+
import { parseYAML } from "@intentius/chant/yaml";
|
|
5
|
+
export const wgc103 = {
|
|
6
|
+
id: "WGC103",
|
|
7
|
+
description: "Config Connector resource without cnrm.cloud.google.com/project-id annotation",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
const documents = output.split(/^---\s*$/m).filter((d) => d.trim().length > 0);
|
|
14
|
+
for (const docStr of documents) {
|
|
15
|
+
const doc = parseYAML(docStr);
|
|
16
|
+
if (!doc)
|
|
17
|
+
continue;
|
|
18
|
+
const apiVersion = doc.apiVersion;
|
|
19
|
+
if (!apiVersion?.includes("cnrm.cloud.google.com"))
|
|
20
|
+
continue;
|
|
21
|
+
const metadata = doc.metadata;
|
|
22
|
+
const annotations = metadata?.annotations;
|
|
23
|
+
const name = metadata?.name ?? "unknown";
|
|
24
|
+
if (!annotations?.["cnrm.cloud.google.com/project-id"]) {
|
|
25
|
+
diagnostics.push({
|
|
26
|
+
checkId: "WGC103",
|
|
27
|
+
severity: "info",
|
|
28
|
+
message: `Resource "${name}" has no cnrm.cloud.google.com/project-id annotation — will use namespace default`,
|
|
29
|
+
entity: name,
|
|
30
|
+
lexicon: "gcp",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return diagnostics;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC104: Missing uniform bucket-level access
|
|
3
|
+
*/
|
|
4
|
+
import { parseYAML } from "@intentius/chant/yaml";
|
|
5
|
+
export const wgc104 = {
|
|
6
|
+
id: "WGC104",
|
|
7
|
+
description: "StorageBucket without uniformBucketLevelAccess enabled",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
const documents = output.split(/^---\s*$/m).filter((d) => d.trim().length > 0);
|
|
14
|
+
for (const docStr of documents) {
|
|
15
|
+
const doc = parseYAML(docStr);
|
|
16
|
+
if (!doc || doc.kind !== "StorageBucket")
|
|
17
|
+
continue;
|
|
18
|
+
const metadata = doc.metadata;
|
|
19
|
+
const spec = doc.spec;
|
|
20
|
+
const name = metadata?.name ?? "unknown";
|
|
21
|
+
if (spec && spec.uniformBucketLevelAccess !== true) {
|
|
22
|
+
diagnostics.push({
|
|
23
|
+
checkId: "WGC104",
|
|
24
|
+
severity: "warning",
|
|
25
|
+
message: `StorageBucket "${name}" does not have uniformBucketLevelAccess enabled — recommended for consistent access control`,
|
|
26
|
+
entity: name,
|
|
27
|
+
lexicon: "gcp",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return diagnostics;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC105: Public Cloud SQL — authorizedNetworks with 0.0.0.0/0
|
|
3
|
+
*/
|
|
4
|
+
import { parseGcpManifests, getSpec, getResourceName } from "./gcp-helpers.js";
|
|
5
|
+
export const wgc105 = {
|
|
6
|
+
id: "WGC105",
|
|
7
|
+
description: "Cloud SQL instance with public 0.0.0.0/0 in authorizedNetworks",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
for (const manifest of parseGcpManifests(output)) {
|
|
14
|
+
if (manifest.kind !== "SQLInstance")
|
|
15
|
+
continue;
|
|
16
|
+
const spec = getSpec(manifest);
|
|
17
|
+
if (!spec)
|
|
18
|
+
continue;
|
|
19
|
+
const settings = spec.settings;
|
|
20
|
+
const ipConfig = settings?.ipConfiguration;
|
|
21
|
+
const networks = ipConfig?.authorizedNetworks;
|
|
22
|
+
if (Array.isArray(networks)) {
|
|
23
|
+
for (const net of networks) {
|
|
24
|
+
if (net.value === "0.0.0.0/0") {
|
|
25
|
+
diagnostics.push({
|
|
26
|
+
checkId: "WGC105",
|
|
27
|
+
severity: "warning",
|
|
28
|
+
message: `SQLInstance "${getResourceName(manifest)}" allows connections from 0.0.0.0/0 — this exposes the database to the public internet`,
|
|
29
|
+
entity: getResourceName(manifest),
|
|
30
|
+
lexicon: "gcp",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return diagnostics;
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC106: Missing deletion policy annotation
|
|
3
|
+
*/
|
|
4
|
+
import { parseGcpManifests, isConfigConnectorResource, getAnnotations, getResourceName } from "./gcp-helpers.js";
|
|
5
|
+
export const wgc106 = {
|
|
6
|
+
id: "WGC106",
|
|
7
|
+
description: "Config Connector resource without cnrm.cloud.google.com/deletion-policy annotation",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
for (const manifest of parseGcpManifests(output)) {
|
|
14
|
+
if (!isConfigConnectorResource(manifest))
|
|
15
|
+
continue;
|
|
16
|
+
const annotations = getAnnotations(manifest);
|
|
17
|
+
if (!annotations?.["cnrm.cloud.google.com/deletion-policy"]) {
|
|
18
|
+
diagnostics.push({
|
|
19
|
+
checkId: "WGC106",
|
|
20
|
+
severity: "info",
|
|
21
|
+
message: `Resource "${getResourceName(manifest)}" has no deletion-policy annotation — defaults to "delete" which removes the GCP resource on kubectl delete`,
|
|
22
|
+
entity: getResourceName(manifest),
|
|
23
|
+
lexicon: "gcp",
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return diagnostics;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC107: StorageBucket missing versioning
|
|
3
|
+
*/
|
|
4
|
+
import { parseGcpManifests, getSpec, getResourceName } from "./gcp-helpers.js";
|
|
5
|
+
export const wgc107 = {
|
|
6
|
+
id: "WGC107",
|
|
7
|
+
description: "StorageBucket without versioning enabled",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
for (const manifest of parseGcpManifests(output)) {
|
|
14
|
+
if (manifest.kind !== "StorageBucket")
|
|
15
|
+
continue;
|
|
16
|
+
const spec = getSpec(manifest);
|
|
17
|
+
if (!spec)
|
|
18
|
+
continue;
|
|
19
|
+
const versioning = spec.versioning;
|
|
20
|
+
if (!versioning || versioning.enabled !== true) {
|
|
21
|
+
diagnostics.push({
|
|
22
|
+
checkId: "WGC107",
|
|
23
|
+
severity: "info",
|
|
24
|
+
message: `StorageBucket "${getResourceName(manifest)}" does not have versioning enabled — consider enabling for data protection`,
|
|
25
|
+
entity: getResourceName(manifest),
|
|
26
|
+
lexicon: "gcp",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return diagnostics;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC108: SQLInstance missing backup configuration
|
|
3
|
+
*/
|
|
4
|
+
import { parseGcpManifests, getSpec, getResourceName } from "./gcp-helpers.js";
|
|
5
|
+
export const wgc108 = {
|
|
6
|
+
id: "WGC108",
|
|
7
|
+
description: "SQLInstance without backup configuration enabled",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
for (const manifest of parseGcpManifests(output)) {
|
|
14
|
+
if (manifest.kind !== "SQLInstance")
|
|
15
|
+
continue;
|
|
16
|
+
const spec = getSpec(manifest);
|
|
17
|
+
if (!spec)
|
|
18
|
+
continue;
|
|
19
|
+
const settings = spec.settings;
|
|
20
|
+
const backupConfig = settings?.backupConfiguration;
|
|
21
|
+
if (!backupConfig || backupConfig.enabled !== true) {
|
|
22
|
+
diagnostics.push({
|
|
23
|
+
checkId: "WGC108",
|
|
24
|
+
severity: "warning",
|
|
25
|
+
message: `SQLInstance "${getResourceName(manifest)}" does not have backup configuration enabled — data loss risk`,
|
|
26
|
+
entity: getResourceName(manifest),
|
|
27
|
+
lexicon: "gcp",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return diagnostics;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC109: ComputeFirewall allowing all sources (0.0.0.0/0)
|
|
3
|
+
*/
|
|
4
|
+
import { parseGcpManifests, getSpec, getResourceName } from "./gcp-helpers.js";
|
|
5
|
+
export const wgc109 = {
|
|
6
|
+
id: "WGC109",
|
|
7
|
+
description: "ComputeFirewall with sourceRanges containing 0.0.0.0/0",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
for (const manifest of parseGcpManifests(output)) {
|
|
14
|
+
if (manifest.kind !== "ComputeFirewall")
|
|
15
|
+
continue;
|
|
16
|
+
const spec = getSpec(manifest);
|
|
17
|
+
if (!spec)
|
|
18
|
+
continue;
|
|
19
|
+
const sourceRanges = spec.sourceRanges;
|
|
20
|
+
if (Array.isArray(sourceRanges) && sourceRanges.includes("0.0.0.0/0")) {
|
|
21
|
+
diagnostics.push({
|
|
22
|
+
checkId: "WGC109",
|
|
23
|
+
severity: "warning",
|
|
24
|
+
message: `ComputeFirewall "${getResourceName(manifest)}" allows traffic from 0.0.0.0/0 — this opens the firewall to the entire internet`,
|
|
25
|
+
entity: getResourceName(manifest),
|
|
26
|
+
lexicon: "gcp",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return diagnostics;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC110: KMS CryptoKey missing rotation period
|
|
3
|
+
*/
|
|
4
|
+
import { parseGcpManifests, getSpec, getResourceName } from "./gcp-helpers.js";
|
|
5
|
+
export const wgc110 = {
|
|
6
|
+
id: "WGC110",
|
|
7
|
+
description: "KMS CryptoKey without rotation period configured",
|
|
8
|
+
check(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [, output] of ctx.outputs) {
|
|
11
|
+
if (typeof output !== "string")
|
|
12
|
+
continue;
|
|
13
|
+
for (const manifest of parseGcpManifests(output)) {
|
|
14
|
+
if (manifest.kind !== "KMSCryptoKey")
|
|
15
|
+
continue;
|
|
16
|
+
const spec = getSpec(manifest);
|
|
17
|
+
if (!spec)
|
|
18
|
+
continue;
|
|
19
|
+
if (!spec.rotationPeriod) {
|
|
20
|
+
diagnostics.push({
|
|
21
|
+
checkId: "WGC110",
|
|
22
|
+
severity: "warning",
|
|
23
|
+
message: `KMSCryptoKey "${getResourceName(manifest)}" has no rotation period configured — consider setting rotationPeriod for key hygiene`,
|
|
24
|
+
entity: getResourceName(manifest),
|
|
25
|
+
lexicon: "gcp",
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return diagnostics;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC111: Dangling resource reference
|
|
3
|
+
*
|
|
4
|
+
* Checks that every `resourceRef.name` in a Config Connector resource's spec
|
|
5
|
+
* references a `metadata.name` that exists in the output.
|
|
6
|
+
*/
|
|
7
|
+
import { parseGcpManifests, isConfigConnectorResource, getResourceName, findResourceRefs } from "./gcp-helpers.js";
|
|
8
|
+
export const wgc111 = {
|
|
9
|
+
id: "WGC111",
|
|
10
|
+
description: "Resource reference points to a name not defined in the output",
|
|
11
|
+
check(ctx) {
|
|
12
|
+
const diagnostics = [];
|
|
13
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
14
|
+
if (typeof output !== "string")
|
|
15
|
+
continue;
|
|
16
|
+
const manifests = parseGcpManifests(output);
|
|
17
|
+
// Collect all defined resource names
|
|
18
|
+
const definedNames = new Set();
|
|
19
|
+
for (const manifest of manifests) {
|
|
20
|
+
if (isConfigConnectorResource(manifest)) {
|
|
21
|
+
const name = manifest.metadata?.name;
|
|
22
|
+
if (name)
|
|
23
|
+
definedNames.add(name);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
// Check each resource's refs
|
|
27
|
+
for (const manifest of manifests) {
|
|
28
|
+
if (!isConfigConnectorResource(manifest))
|
|
29
|
+
continue;
|
|
30
|
+
const resourceName = getResourceName(manifest);
|
|
31
|
+
const refs = findResourceRefs(manifest.spec);
|
|
32
|
+
for (const refName of refs) {
|
|
33
|
+
if (!definedNames.has(refName)) {
|
|
34
|
+
diagnostics.push({
|
|
35
|
+
checkId: "WGC111",
|
|
36
|
+
severity: "warning",
|
|
37
|
+
message: `Resource "${resourceName}" references "${refName}" via resourceRef, but no resource with that metadata.name exists in the output`,
|
|
38
|
+
entity: resourceName,
|
|
39
|
+
lexicon: "gcp",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return diagnostics;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGC112: Missing or invalid apiVersion
|
|
3
|
+
*
|
|
4
|
+
* Every Config Connector resource must have an apiVersion matching
|
|
5
|
+
* `<service>.cnrm.cloud.google.com/v<version>`.
|
|
6
|
+
*/
|
|
7
|
+
import { parseGcpManifests, getResourceName } from "./gcp-helpers.js";
|
|
8
|
+
const VALID_API_VERSION = /^[a-z]+\.cnrm\.cloud\.google\.com\/v\d+(?:alpha\d+|beta\d+)?$/;
|
|
9
|
+
export const wgc112 = {
|
|
10
|
+
id: "WGC112",
|
|
11
|
+
description: "Config Connector resource has missing or invalid apiVersion",
|
|
12
|
+
check(ctx) {
|
|
13
|
+
const diagnostics = [];
|
|
14
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
15
|
+
if (typeof output !== "string")
|
|
16
|
+
continue;
|
|
17
|
+
const manifests = parseGcpManifests(output);
|
|
18
|
+
for (const manifest of manifests) {
|
|
19
|
+
// Only check resources that look like Config Connector (have a kind)
|
|
20
|
+
if (!manifest.kind)
|
|
21
|
+
continue;
|
|
22
|
+
const resourceName = getResourceName(manifest);
|
|
23
|
+
if (!manifest.apiVersion) {
|
|
24
|
+
diagnostics.push({
|
|
25
|
+
checkId: "WGC112",
|
|
26
|
+
severity: "error",
|
|
27
|
+
message: `Resource "${resourceName}" (kind: ${manifest.kind}) is missing apiVersion`,
|
|
28
|
+
entity: resourceName,
|
|
29
|
+
lexicon: "gcp",
|
|
30
|
+
});
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (!VALID_API_VERSION.test(manifest.apiVersion)) {
|
|
34
|
+
diagnostics.push({
|
|
35
|
+
checkId: "WGC112",
|
|
36
|
+
severity: "error",
|
|
37
|
+
message: `Resource "${resourceName}" has invalid apiVersion "${manifest.apiVersion}" — expected format: <service>.cnrm.cloud.google.com/v<version>`,
|
|
38
|
+
entity: resourceName,
|
|
39
|
+
lexicon: "gcp",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return diagnostics;
|
|
45
|
+
},
|
|
46
|
+
};
|