From 1bfc4bccd231d29541101ce04a4a02c811bcb9a1 Mon Sep 17 00:00:00 2001 From: Evgeniy Belyi Date: Fri, 24 Jul 2026 19:57:56 -0500 Subject: [PATCH 1/2] Add IaC blueprints, provider permissions --- packages/datastream.go | 10 ++++++--- packages/package.go | 46 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/packages/datastream.go b/packages/datastream.go index 889cd94c9..43274e7af 100644 --- a/packages/datastream.go +++ b/packages/datastream.go @@ -72,7 +72,9 @@ type DataStream struct { // Reference to the package containing this data stream packageRef *Package - Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` + Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` + IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` + ProviderPermissions []ProviderPermission `config:"provider_permissions,omitempty" json:"provider_permissions,omitempty" yaml:"provider_permissions,omitempty"` } type Input struct { @@ -84,8 +86,10 @@ type Input struct { Streams []Stream `config:"streams" json:"streams,omitempty" yaml:"streams,omitempty"` TemplatePath string `config:"template_path" json:"template_path,omitempty" yaml:"template_path,omitempty"` InputGroup string `config:"input_group" json:"input_group,omitempty" yaml:"input_group,omitempty"` - DeploymentModes []string `config:"deployment_modes,omitempty" json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"` - Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` + DeploymentModes []string `config:"deployment_modes,omitempty" json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"` + Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` + IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` + ProviderPermissions []ProviderPermission `config:"provider_permissions,omitempty" json:"provider_permissions,omitempty" yaml:"provider_permissions,omitempty"` } type Stream struct { diff --git a/packages/package.go b/packages/package.go index b752af467..16f850e93 100644 --- a/packages/package.go +++ b/packages/package.go @@ -44,11 +44,13 @@ type Package struct { License string `config:"license,omitempty" json:"license,omitempty" yaml:"license,omitempty"` Screenshots []Image `config:"screenshots,omitempty" json:"screenshots,omitempty" yaml:"screenshots,omitempty"` Assets []string `config:"assets,omitempty" json:"assets,omitempty" yaml:"assets,omitempty"` - PolicyTemplates []PolicyTemplate `config:"policy_templates,omitempty" json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"` - DataStreams []*DataStream `config:"data_streams,omitempty" json:"data_streams,omitempty" yaml:"data_streams,omitempty"` - Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` - Elasticsearch *PackageElasticsearch `config:"elasticsearch,omitempty" json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"` - Agent *PackageAgent `config:"agent,omitempty" json:"agent,omitempty" yaml:"agent,omitempty"` + PolicyTemplates []PolicyTemplate `config:"policy_templates,omitempty" json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"` + DataStreams []*DataStream `config:"data_streams,omitempty" json:"data_streams,omitempty" yaml:"data_streams,omitempty"` + Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` + Elasticsearch *PackageElasticsearch `config:"elasticsearch,omitempty" json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"` + Agent *PackageAgent `config:"agent,omitempty" json:"agent,omitempty" yaml:"agent,omitempty"` + IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` + ProviderPermissions []ProviderPermission `config:"provider_permissions,omitempty" json:"provider_permissions,omitempty" yaml:"provider_permissions,omitempty"` // Local path to the package dir BasePath string `json:"-" yaml:"-"` @@ -130,6 +132,40 @@ type PolicyTemplate struct { IngestionMethod string `config:"ingestion_method,omitempty" json:"ingestion_method,omitempty" yaml:"ingestion_method,omitempty"` TemplatePath string `config:"template_path,omitempty" json:"template_path,omitempty" yaml:"template_path,omitempty"` Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` + + IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` + ProviderPermissions []ProviderPermission `config:"provider_permissions,omitempty" json:"provider_permissions,omitempty" yaml:"provider_permissions,omitempty"` +} + +// IaCBlueprint is a contribution to a shared IaC canonical blueprint. +type IaCBlueprint struct { + ID string `config:"id" json:"id" yaml:"id" validate:"required"` + Format string `config:"format" json:"format" yaml:"format" validate:"required"` + Patches string `config:"patches" json:"patches" yaml:"patches" validate:"required"` + Title string `config:"title,omitempty" json:"title,omitempty" yaml:"title,omitempty"` +} + +// ProviderPermission declares permissions and roles required from a named provider. +type ProviderPermission struct { + Provider string `config:"provider" json:"provider" yaml:"provider" validate:"required"` + Description string `config:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty"` + Roles []ProviderRole `config:"roles,omitempty" json:"roles,omitempty" yaml:"roles,omitempty"` + Permissions []PermissionEntry `config:"permissions,omitempty" json:"permissions,omitempty" yaml:"permissions,omitempty"` +} + +// ProviderRole is a pre-defined role or managed policy to attach. +type ProviderRole struct { + Name string `config:"name" json:"name" yaml:"name" validate:"required"` + ID string `config:"id,omitempty" json:"id,omitempty" yaml:"id,omitempty"` + Description string `config:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty"` +} + +// PermissionEntry is an individual permission grant required by an integration unit. +type PermissionEntry struct { + Name string `config:"name" json:"name" yaml:"name" validate:"required"` + Description string `config:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty"` + Resources []string `config:"resources,omitempty" json:"resources,omitempty" yaml:"resources,omitempty"` + Conditions map[string]interface{} `config:"conditions,omitempty" json:"conditions,omitempty" yaml:"conditions,omitempty"` } // Source contains metadata about the source of the package and its distribution. From 033ffb56d84f47ce4e2f0eb7772114531e2c490c Mon Sep 17 00:00:00 2001 From: Evgeniy Belyi Date: Mon, 27 Jul 2026 23:09:35 -0500 Subject: [PATCH 2/2] Fix gofmt alignment for Input and Package struct fields When ProviderPermissions (19 chars) was added to the Input and Package structs, the pre-existing fields in those groups were not re-aligned to match the new widest column, causing the lint/formatting check to fail. Co-Authored-By: Claude Sonnet 4.6 --- packages/datastream.go | 16 ++++++++-------- packages/package.go | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/datastream.go b/packages/datastream.go index 43274e7af..4e383e426 100644 --- a/packages/datastream.go +++ b/packages/datastream.go @@ -78,14 +78,14 @@ type DataStream struct { } type Input struct { - Type string `config:"type,omitempty" json:"type,omitempty" yaml:"type,omitempty"` - Package string `config:"package,omitempty" json:"package,omitempty" yaml:"package,omitempty"` - Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` - Title string `config:"title" json:"title,omitempty" yaml:"title,omitempty"` - Description string `config:"description" json:"description,omitempty" yaml:"description,omitempty"` - Streams []Stream `config:"streams" json:"streams,omitempty" yaml:"streams,omitempty"` - TemplatePath string `config:"template_path" json:"template_path,omitempty" yaml:"template_path,omitempty"` - InputGroup string `config:"input_group" json:"input_group,omitempty" yaml:"input_group,omitempty"` + Type string `config:"type,omitempty" json:"type,omitempty" yaml:"type,omitempty"` + Package string `config:"package,omitempty" json:"package,omitempty" yaml:"package,omitempty"` + Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` + Title string `config:"title" json:"title,omitempty" yaml:"title,omitempty"` + Description string `config:"description" json:"description,omitempty" yaml:"description,omitempty"` + Streams []Stream `config:"streams" json:"streams,omitempty" yaml:"streams,omitempty"` + TemplatePath string `config:"template_path" json:"template_path,omitempty" yaml:"template_path,omitempty"` + InputGroup string `config:"input_group" json:"input_group,omitempty" yaml:"input_group,omitempty"` DeploymentModes []string `config:"deployment_modes,omitempty" json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"` Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` diff --git a/packages/package.go b/packages/package.go index 16f850e93..596747bce 100644 --- a/packages/package.go +++ b/packages/package.go @@ -40,10 +40,10 @@ type Package struct { BasePackage `config:",inline" json:",inline" yaml:",inline"` FormatVersion string `config:"format_version" json:"format_version" yaml:"format_version"` - Readme *string `config:"readme,omitempty" json:"readme,omitempty" yaml:"readme,omitempty"` - License string `config:"license,omitempty" json:"license,omitempty" yaml:"license,omitempty"` - Screenshots []Image `config:"screenshots,omitempty" json:"screenshots,omitempty" yaml:"screenshots,omitempty"` - Assets []string `config:"assets,omitempty" json:"assets,omitempty" yaml:"assets,omitempty"` + Readme *string `config:"readme,omitempty" json:"readme,omitempty" yaml:"readme,omitempty"` + License string `config:"license,omitempty" json:"license,omitempty" yaml:"license,omitempty"` + Screenshots []Image `config:"screenshots,omitempty" json:"screenshots,omitempty" yaml:"screenshots,omitempty"` + Assets []string `config:"assets,omitempty" json:"assets,omitempty" yaml:"assets,omitempty"` PolicyTemplates []PolicyTemplate `config:"policy_templates,omitempty" json:"policy_templates,omitempty" yaml:"policy_templates,omitempty"` DataStreams []*DataStream `config:"data_streams,omitempty" json:"data_streams,omitempty" yaml:"data_streams,omitempty"` Vars []Variable `config:"vars" json:"vars,omitempty" yaml:"vars,omitempty"` @@ -133,7 +133,7 @@ type PolicyTemplate struct { TemplatePath string `config:"template_path,omitempty" json:"template_path,omitempty" yaml:"template_path,omitempty"` Deprecated *Deprecated `config:"deprecated,omitempty" json:"deprecated,omitempty" yaml:"deprecated,omitempty"` - IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` + IaCBlueprints []IaCBlueprint `config:"iac_blueprints,omitempty" json:"iac_blueprints,omitempty" yaml:"iac_blueprints,omitempty"` ProviderPermissions []ProviderPermission `config:"provider_permissions,omitempty" json:"provider_permissions,omitempty" yaml:"provider_permissions,omitempty"` }