Skip to content

Expose package iac/ folder and iac_blueprints in EPR - #1940

Draft
bhapas wants to merge 1 commit into
elastic:mainfrom
bhapas:expose-iac-folder
Draft

Expose package iac/ folder and iac_blueprints in EPR#1940
bhapas wants to merge 1 commit into
elastic:mainfrom
bhapas:expose-iac-folder

Conversation

@bhapas

@bhapas bhapas commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Integrations will ship iac/ patches and materialized linked templates. EPR must serve those files when a package is pulled (GET /package/{name}/{version}/iac/... and the downloadable zip).

This PR:

  • Confirms LoadAssets includes iac/ files in package assets (folder name has no hyphen, so it is not rejected).
  • Relies on the existing static handler (GET /package/{name}/{version}/{name:.*}) and zip archiver (full directory walk) to serve and package iac/ content.
  • Exposes iac_blueprints (and provider_permissions) on package / policy template / input / data stream JSON so Fleet/provisioner can discover patch metadata.

Related

Test plan

Isolated tests in packages/iac_test.go use a temp-dir package (no testdata/package/ churn):

  • TestPackageLoadAssetsIncludesIacNewPackage + LoadAssets lists iac/account.cloudformation.patches.json and iac/account.cloudformation.json
  • TestPackageIndexIncludesIaCBlueprints — package JSON includes iac_blueprints with id aws/federated-identity/account/v1
  • TestServePackageResourceIacServePackageResource returns 200 + JSON body for the patches file
  • TestArchivePackageIncludesIac — zip from ArchivePackage contains both iac/ files
go test ./packages/ ./archiver/ -count=1
…IaC patches when a package is pulled.

Co-authored-by: Cursor <cursoragent@cursor.com>
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant