Plugin
In this section, you will find details of the Plugin and its types.
A Plugin serves as an extension that enhances an application's capabilities. It adheres to established standards and best practices. In the context of StackSpot, a Plugin is always associated with a Studio. It's possible to have Plugins with the same name, but they must belong to different Studios.
Each Plugin version remains immutable. If you wish to make modifications to a Plugin, you are required to publish a new version of it. These versions of a Plugin adhere to semantic versioning (SemVer) principles.
There are two Plugin types:
- App: Application Plugin;
- Infra: Infrastructure Plugin that provides resources to an Application.
Plugin Types
Application Plugin (App)
The App Plugin helps write an Application.
See the YAML:
YAML Structure
- v3 (current version)
- v2
- v1
schema-version: v3 #required
kind: plugin #required
metadata:
name: lambda-new-endpoint #required
display-name: Endpoint para Lambda #required
description: Add new endpoint to an existing Lambda API. #required
version: 1.0.0 #required
spec:
type: app
compatibility:
- python
docs:
pt-br: docs/pt-br/docs.md
en-us: docs/en-us/docs.md
single-use: False
technologies: # Ref: https://docs.stackspot.com/create-use/create-content/yaml-files/plugin-yaml/#technologies-1
- Api
stk-projects-only: false
inputs: #optional
- label: Select an API Gateway
type: required-connection
name: api-conn1
connection-interface-type: aws-api-gateway-conn
- label: Select Cloudfront
type: required-connection
name: my-cloudfront
connection-interface-type: aws-cloud-front-conn
- label: Select a second API Gateway
type: required-connection
name: api-conn2
connection-interface-type: aws-api-gateway-conn
- label: Type name of your resource
name: resource
type: text
required: true
default: Client
pattern: '([A-Z][a-z]+)+'
help: 'Inform your resource name (e.g.: Client)'
- label: Choose http method of new endpoint
name: method
type: select
items:
- GET
- POST
- PUT
- DELETE
- PATCH
default: GET
required: true
schema-version: v2 #required
kind: plugin #required
metadata:
name: lambda-new-endpoint #required
display-name: Endpoint para Lambda #required
description: Add new endpoint to an existing Lambda API. #required
version: 1.0.0 #required
spec:
type: app
compatibility:
- python
docs:
pt-br: docs/pt-br/docs.md
en-us: docs/en-us/docs.md
single-use: False
technologies: # Ref: https://docs.stackspot.com/create-use/create-content/yaml-files/plugin-yaml/#technologies-1
- Api
stk-projects-only: false
requires:
connections:
- type: aws-api-gateway-conn
alias: alias-test
- type: aws-cloud-front-conn
alias: alias-test2
- type: aws-api-gateway-conn
alias: same-conn-alias-test1
inputs: #optional
- label: Type name of your resource
name: resource
type: text
required: true
default: Client
pattern: '([A-Z][a-z]+)+'
help: 'Inform your resource name (e.g.: Client)'
- label: Choose http method of new endpoint
name: method
type: select
items:
- GET
- POST
- PUT
- DELETE
- PATCH
default: GET
required: true
help: 'Inform the method of the endpoint (e.g.: post or delete)'
schema-version: v1 #optional #warning
kind: plugin #required
metadata: #required
name: lambda-new-endpoint #required
description: Add new endpoint to an existing Lambda API. #required
display-name: Endpoint para Lambda #required
version: 1.0.0 #required
release-notes: docs/release-notes-{{version}}.md #required
picture: plugin.png #optional
spec: #required
type: app #required
compatibility: #optional
- python
about: docs/about.md #optional #warning
usage: docs/usage.md #optional #warning
implementation: docs/implementation.md #optional #warning
requirements: docs/requirements.md #optional #warning
repository: https://github.com/stack-spot/environments-runtime-stack #optional
technologies: #optional
- Api
Infrastructure Plugin (Infra-plugin)
It is a Plugin that provisions resources to an Application.
See an example:
- You want to create an Application with a database. The Infra Plugin creates and deploys a database structure for it.
The Infra Plugin depends on the App Plugin because it supports the Application.
YAML Structure
- v3 (current version)
- v2
- v1
schema-version: v3 #required
kind: plugin #required
metadata:
name: lambda-new-endpoint #required
display-name: Endpoint para Lambda #required
description: Add new endpoint to an existing Lambda API. #required
version: 1.0.0 #required
spec:
type: infra #required
compatibility:
- python
docs:
pt-br: docs/pt-br/docs.md
en-us: docs/en-us/docs.md
single-use: False
technologies: # Ref: https://docs.stackspot.com/create-use/create-content/yaml-files/plugin-yaml/#technologies-1
- Api
runtime: #required
environment: #required
- terraform-1-4
- aws-cli-2
- git-2
inputs: #optional
- label: Select the Cloudfront
type: required-connection
name: my-cloudfront-connection
connection-interface-type: aws-cloud-front-conn
generates: #required
connections: #required
- type: aws-api-gateway-conn
alias: alias-2
schema-version: v2 #required
kind: plugin #required
metadata:
name: lambda-new-endpoint #required
display-name: Endpoint para Lambda #required
description: Add new endpoint to an existing Lambda API. #required
version: 1.0.0 #required
picture: plugin.png
spec:
type: infra #required
compatibility:
- python
docs:
pt-br: docs/pt-br/docs.md
en-us: docs/en-us/docs.md
single-use: False
technologies: # Ref: https://docs.stackspot.com/create-use/create-content/yaml-files/plugin-yaml/#technologies-1
- Api
runtime: #required
environment: #required
- terraform-1-4
- aws-cli-2
- git-2
requires: #required
connections: #required
- type: aws-cloud-front-conn
alias: alias-1
generates: #required
connections: #required
- type: aws-api-gateway-conn
alias: alias-2
schema-version: v1 #required
kind: plugin #required
metadata:
name: invalid-plugin-infra-with-warnings #required
description: This is a description #required
display-name: This is display name #optional
picture: plugin.png #optional
version: 2.0.3 #required
spec:
type: infra #required
release-notes: docs/release-notes-2.0.3.md #optional
about: docs/about.md #optional
usage: docs/usage.md #optional
implementation: docs/implementation.md #optional
requirements: docs/requirements.md #optional
repository: https://github.com/stack-spot/environments-runtime-stack #optional
compatibility:
- python
technologies:
- Api
requires:
connection-interface:
- lambda-conn
generates:
connection-interface: lambda-conn
Next Steps
For more information about Plugins, follow the guides below: