forked from cloudify-community/eaas-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-blueprint.yaml
59 lines (52 loc) · 1.87 KB
/
azure-blueprint.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
tosca_definitions_version: cloudify_dsl_1_3
imports:
- https://cloudify.co/spec/cloudify/6.2.0/types.yaml
- plugin:cloudify-terraform-plugin?version= >=0.15.0
- https://raw.githubusercontent.com/cloudify-community/eaas-example/master/utils/custom_types.yaml
labels:
csys-obj-type:
values:
- service
inputs:
cloud_credentials:
type: dict
resource_config:
type: dict
network_deployment_id:
type: string
default: ''
resource_prefix:
type: string
node_templates:
prefix:
type: eaas.nodes.UniquePrefixGenerator
properties:
predefined_value: { get_input: resource_prefix }
terraform:
type: cloudify.nodes.terraform
properties:
resource_config:
installation_source: https://releases.hashicorp.com/terraform/0.14.3/terraform_0.14.3_linux_amd64.zip
terraform_module:
type: cloudify.nodes.terraform.Module
properties:
resource_config:
environment_variables:
ARM_SUBSCRIPTION_ID: { get_input: [ cloud_credentials, azure_subscription_id ] }
ARM_TENANT_ID: { get_input: [ cloud_credentials, azure_tenant_id ] }
ARM_CLIENT_ID: { get_input: [ cloud_credentials, azure_client_id ] }
ARM_CLIENT_SECRET: { get_input: [ cloud_credentials, azure_client_secret ] }
variables:
blob_name: { concat: [ { get_attribute: [ prefix, value ] }, bucket ] }
blob_rg: { concat: [ { get_attribute: [ prefix, value ] }, rg ] }
blob_location: { get_input: [ cloud_credentials, region_name ] }
source:
location: templates/tf-blob-master.zip
relationships:
- target: prefix
type: cloudify.relationships.depends_on
- target: terraform
type: cloudify.terraform.relationships.run_on_host
capabilities:
bucket_url:
value: { get_attribute: [ terraform_module, resources, blob, instances, 0, attributes, id ] }