-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Right now, the way how gcp plugin handle name, resource_id when create resource on gcp is not consistent across all gcp nodes. The following issues must be fixed :
-
Each resource on the gcp which has name should be added as a runtime property whenever the resource is created on the gco platform and the
namevalue should match theresource_id. This requires to check every gcp node type that hasnameattribute to follow this convention -
Each resource that has a
namevalue must normalized the name value before updating it as runtime property and this can be done using the following method helpername = utils.get_gcp_resource_name(name) -
The resource that does not have a name must be updated to use cloudify instance id after get normalized like the following
name = utils.get_gcp_resource_name(ctx.instance.id)and this must be consistent for all nodes type that does not have name attribute -
When
use_external_resourceis enabled, we need to double check that the name passed to GCP resource will not be normalized since the provided name at this case must be match the name on the gcp provider without any modification/update to the name For example there are some resource callutils.get_gcp_resource_name(name)inside the Resource class like :SubNetworkhttps://github.com/cloudify-cosmo/cloudify-gcp-plugin/blob/master/cloudify_gcp/compute/subnetwork.py#L50
We need to check all resources and do a test for that