diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4e18bbf..ca7a430 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,5 @@ +0.19.4: + - Better handle for get_shared_resource credentials and file resources. 0.19.3: - Rebuild the plugin to bump cloudify_common_sdk version. 0.19.2: diff --git a/cloudify_tf/utils.py b/cloudify_tf/utils.py index 94e2cf4..481ebb0 100644 --- a/cloudify_tf/utils.py +++ b/cloudify_tf/utils.py @@ -319,6 +319,10 @@ def update_terraform_source_material(new_source, target=False): new_source_password = new_source.get('password') ctx.logger.debug('Getting shared resource: {} to {}'.format( new_source_location, node_instance_dir)) + if isinstance(new_source_username, CommonSDKSecret): + new_source_username = new_source_username.secret + if isinstance(new_source_password, CommonSDKSecret): + new_source_password = new_source_password.secret source_tmp_path = get_shared_resource( new_source_location, dir=node_instance_dir, username=new_source_username, @@ -327,8 +331,10 @@ def update_terraform_source_material(new_source, target=False): # check if we actually downloaded something or not if source_tmp_path == new_source_location: source_tmp_path, delete_tmp = _create_source_path(source_tmp_path) - # move tmp files to correct directory - copy_directory(source_tmp_path, node_instance_dir) + # move tmp files to correct directory if tmp_path is directory otherwise + # the resources will be downloaded inside the node_instance_dir + if os.path.isdir(source_tmp_path): + copy_directory(source_tmp_path, node_instance_dir) # By getting here we will have extracted source # Zip the file to store in runtime if not v1_gteq_v2(get_cloudify_version(), "6.0.0"): diff --git a/constraints.txt b/constraints.txt index 492dfd8..2dc5108 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1,4 +1,4 @@ -cloudify-utilities-plugins-sdk>=0.0.82 +cloudify-utilities-plugins-sdk>=0.0.85 urllib3==1.24.3 networkx==1.9.1 cryptography>=3.3.2 diff --git a/plugin.yaml b/plugin.yaml index 5c6f3e3..f956d73 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -2,7 +2,7 @@ plugins: tf: executor: central_deployment_agent package_name: cloudify-terraform-plugin - package_version: '0.19.3' + package_version: '0.19.4' dsl_definitions: diff --git a/plugin_1_4.yaml b/plugin_1_4.yaml index 8f5eb5d..56e97e4 100644 --- a/plugin_1_4.yaml +++ b/plugin_1_4.yaml @@ -2,7 +2,7 @@ plugins: tf: executor: central_deployment_agent package_name: cloudify-terraform-plugin - package_version: '0.19.3' + package_version: '0.19.4' dsl_definitions: diff --git a/setup.py b/setup.py index b2f95ce..942175c 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ def get_version(rel_file='plugin.yaml'): "cloudify-common>=4.5.5", "networkx==1.9.1", "requests>=2.7.0,<3.0", - "cloudify-utilities-plugins-sdk>=0.0.82", + "cloudify-utilities-plugins-sdk>=0.0.85", ], test_requires=[ "cloudify-common>=4.5.5", diff --git a/v2_plugin.yaml b/v2_plugin.yaml index b88ef54..05de83d 100644 --- a/v2_plugin.yaml +++ b/v2_plugin.yaml @@ -2,7 +2,7 @@ plugins: tf: executor: central_deployment_agent package_name: cloudify-terraform-plugin - package_version: '0.19.3' + package_version: '0.19.4' dsl_definitions: