Share Infrastructure Resources
In this section, you will find how to share your infrastructure resources.
You can share infrastructure resources via Connection Interfaces.
See below how it works:
-
1. When you create an Infra Plugin, you need to choose a Connection Interface Type. It would help if you chose to represent the infrastructure resources provisioning in the Application deployment. Or where you want to use the Shared Infra Plugin.
-
2. When an Application/Shared Infra deployment happens:
- The infrastructure resources provisioning happens according to the Infra Plugin specification.
When provisioning an Infra Plugin, Deploy Engine generates one or more Connection Interfaces according to Connection Interface Type (You chose them when creating Plugins).
Connection Interfaces are represented by the outputs stored in:
- Application Context, if an Application deployment occurs.
- In the Workspace context, if a Shared Infra deployment happens,
- 3. You can use Connection Interface outputs already chosen as inputs in the App/Infra Plugin. They are configured to receive them when you apply Plugins to your projects.
Reuse Cloud Resources in the Application
You can reuse Cloud resources in your Application. Or in other Infra resources via StackSpot's Connection Interfaces (it is a contract to define the parameters a Plugin will export).
Check how it works below:
- When you create an Infra Plugin, it must respect Connection Interfaces contracts.
- Applying an Infra Plugin with the deployed flag generates IAC files (e.g., Terraform files). They have output configurations. These outputs need to follow the Connection Interfaces patterns.
- When the IAC files are provisioned, the Deploy Engine saves the Connection Interfaces outputs in two places:
- Infrastructure Application: The outputs are saved in the Workspace Context.
- Application App: They are saved in the Application Context.
- When applying new Plugins to the Application, they can use the Connection Interface outputs as Plugin inputs. So, they can reuse the provisioned Cloud resources.