Skip to content

Add name and resource_id fields as a part of runtime properties when create gcp resource  #89

@mabuaisha

Description

@mabuaisha

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 :

  1. 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 name value should match the resource_id. This requires to check every gcp node type that has name attribute to follow this convention

  2. Each resource that has a name value must normalized the name value before updating it as runtime property and this can be done using the following method helper name = utils.get_gcp_resource_name(name)

  3. 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

  4. When use_external_resource is 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 call utils.get_gcp_resource_name(name) inside the Resource class like : SubNetwork https://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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions