Consuming a Cloud Resource Plan
< introduction | consume a cloud resource plan
Prerequisite(s)
Overview
As a Platform Engineer, you enable workspace members (developers) to add cloud resources, such as a MySQL database, to their applications.
You'll scope the necessary resource plans to each workspace, ensuring developers only have access to the ones they need. You must ensure that each plan is thoroughly tested, and that developers only see the appropriate input and output values.
Demonstration of a developer adding a cloud resource to their application
CLI Instructions
Developers use wf create appcomponent NAME --app APPNAME --type cloudresource --plan PLANNAME --plan-version SEMVER -w WORKSPACE
command to create a cloud resource using a pre-defined cloud resource plan.
wf create appcomponent dbtest --app app1 --type cloudresource --plan sand2-az-storage --plan-version 1.2.0 -w sand2
Web Interface Instructions
Steps
Create a cloud resource for your application
- Expand Workspace > YOUR-WORKSPACE-NAME, and then navigate to Applications
- Select your APPLICATION-NAME
- Click the +Create > Cloud Resource Component button
- Fill in the details as outlined in the Components section.
- Click Save to proceed
Consume the cloud resource output values
- Navigate to your application's container component
- Click on the Edit button of your container component
- In the Depends on component(s) section, add your cloud resource component you've created in the previous step.
- In the Advanced Settings > Variables, consume the output variables of the cloud resource component.