I am trying to pass blueprints inputs as environment variables to a python script (executed by script_plugin during one of the lifecycle operations of a node).
We are using Cloudify 3.1. My blueprint looks like below (trimmed it to show the required sections):
inputs:
sql_server_username:
type: string
default: ''
description: >
Enter SQL Server User Name
node_templates:
my_install:
type: my.nodes.Root
relationships:
- target: win2012r2
type: cloudify.relationships. contained_in
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: scripts/my/installer.py
inputs:
process:
env:
SQL_USERNAME: { get_input: sql_server_username }
and in my python script (installer.py) I am trying to access SQL_USERNAME
using os.environ.get("SQL_USERNAME", "DEFAULT")
. But I am always getting the default value even when I pass a custom value via inputs during deploy,
What should I change to be able to access the input parameters as environment vairables (from the inputs section of the blueprint) in the script?