# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/share-cloud-resource.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
  annotations:
    custom.definition.oam.dev/category: Application Delivery
    definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource.
  labels:
    custom.definition.oam.dev/scope: Application
  name: share-cloud-resource
  namespace: {{ include "systemDefinitionNamespace" . }}
spec:
  schematic:
    cue:
      template: |
        import (
        	"vela/op"
        )

        app: op.#ShareCloudResource & {
        	env:        parameter.env
        	policy:     parameter.policy
        	placements: parameter.placements
        	// context.namespace indicates the namespace of the app
        	namespace: context.namespace
        	// context.namespace indicates the name of the app
        	name: context.name
        }

        parameter: {
        	// +usage=Declare the location to bind
        	placements: [...{
        		namespace?: string
        		cluster?:   string
        	}]
        	// +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used
        	policy: *"" | string
        	// +usage=Declare the name of the env in policy
        	env: string
        }

