Allow overrides of the name identifier and additional labels on the GCP instance.
right now for creating multiple postgres clusters using the GET GCP module we have have prefix
and node_type
.
-
node_type
should be set topostgres
for a postgres host. - The combination of
prefix
-node_type
must be unique within a project
This means that we need to currently include the shard identifier in prefix
.
For example: with two shards main
and ci
we will generate name identifiers like production-main-postgres-1, produciton-ci-postgres-1
However, naming conventions in infrastructure should increase in specificity from left to right, for this we want
production-postgres-main-1
, production-postgres-ci-1
Without introducing the concept of "shard" to the module, I am proposing here that we allow a name_id
override, that will allow you set your own identifier (where the default remains the same).
This also allows us to pass in additional instance labels, so we can label our instances with shard
.