-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplugin.yaml
65 lines (56 loc) · 1.63 KB
/
plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: amazon-sqs
spec:
description: |
Provision a temporary queue in Amazon SQS for use within a sandbox.
Each sandbox resource request must specify a 'region' parameter,
indicating the AWS region in which to provision the queue (e.g. us-east-1).
Each sandbox resource request can optionally specify 'attributes' and 'tags'
that will be passed to the corresponding flags in the 'aws sqs create-queue'
command: https://docs.aws.amazon.com/cli/latest/reference/sqs/create-queue.html
The temporary queue name will be available as the output key 'queue-name',
and the queue URL will be available as the key 'queue-url'.
runner:
image: amazon/aws-cli
namespace: signadot
podTemplateOverlay: "@{embed: ./plugin/pod-template.yaml}"
create:
- name: provision
inputs:
- name: region
valueFromSandbox: true
as:
env: AWS_REGION
- name: attributes
valueFromSandbox: true
as:
env: ATTRIBUTES
- name: tags
valueFromSandbox: true
as:
env: TAGS
outputs:
- name: queue-name
valueFromPath: /tmp/queue-name
- name: queue-url
valueFromPath: /tmp/queue-url
script: "@{embed: ./plugin/provision.sh}"
delete:
- name: deprovision
inputs:
- name: region
valueFromSandbox: true
as:
env: AWS_REGION
- name: queue-name
valueFromStep:
name: provision
output: queue-name
as:
env: QUEUE_NAME
- name: queue-url
valueFromStep:
name: provision
output: queue-url
as:
env: QUEUE_URL
script: "@{embed: ./plugin/deprovision.sh}"