Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Terraform outputs in bundle template pipelines before Main step #2816

Open
jjgriff93 opened this issue Nov 3, 2022 · 0 comments
Open
Labels

Comments

@jjgriff93
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
While looking into #2811 and the bug that was causing Nexus bootstrapping to fail, it was found that because the Firewall step was occurring after the Main bundle step in the template_schema pipeline, the necessary firewall rules weren't in place for the bundle to deploy Nexus successfully.

After moving the Firewall step to before the Main bundle, there were then missing resource properties that were previously derived from Terraform outputs from the main step (such as the SHARED_ADDRESS_PREFIXES). The API has no way of accessing properties like this (address spaces from the core network for example) without the main bundle being ran first to output properties from Terraform and mapping them to bundle resource properties. This means that we can't apply Firewall steps that a bundle might need as a pre-requisite, if they contain dynamic values.

Describe the solution you'd like
A potential solution could be adding a "Load properties" step that bundles can invoke in the template pipeline, accepting a map of properties to retrieve, which runs terraform and populates the resource properties that are then needed by the subsequent firewall or other pre-requisite steps before the main bundle.

Alternatively, we could introduce another keyword (the pipeline currently looks for handlebars and then "resource" to fetch properties from the bundle resource) called environment or outputs which could request a property from terraform, which the API would then retrieve whenever this keyword is detected with a valid reference to a terraform output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant