Allow managing members in the project resource (#480)
* Extend resource and datasource * Adapt acc test to work without members * Extend acc test and adjust resource * Generate docs * Fix lint * Fix unit test * Uniformize description with datasource and extend unit test * Improve role field description * Update TF state before adding/removing members * Remove unused function * Move intermediate map top state to mapProjectFields * Improve code
This commit is contained in:
parent
af7d789945
commit
31ce9ab36d
16 changed files with 1195 additions and 169 deletions
|
|
@ -97,6 +97,7 @@ type providerModel struct {
|
|||
LogMeCustomEndpoint types.String `tfsdk:"logme_custom_endpoint"`
|
||||
RabbitMQCustomEndpoint types.String `tfsdk:"rabbitmq_custom_endpoint"`
|
||||
MariaDBCustomEndpoint types.String `tfsdk:"mariadb_custom_endpoint"`
|
||||
AuthorizationCustomEndpoint types.String `tfsdk:"authorization_custom_endpoint"`
|
||||
ObjectStorageCustomEndpoint types.String `tfsdk:"objectstorage_custom_endpoint"`
|
||||
OpenSearchCustomEndpoint types.String `tfsdk:"opensearch_custom_endpoint"`
|
||||
RedisCustomEndpoint types.String `tfsdk:"redis_custom_endpoint"`
|
||||
|
|
@ -129,6 +130,7 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
|
|||
"logme_custom_endpoint": "Custom endpoint for the LogMe service",
|
||||
"rabbitmq_custom_endpoint": "Custom endpoint for the RabbitMQ service",
|
||||
"mariadb_custom_endpoint": "Custom endpoint for the MariaDB service",
|
||||
"authorization_custom_endpoint": "Custom endpoint for the Membership service",
|
||||
"objectstorage_custom_endpoint": "Custom endpoint for the Object Storage service",
|
||||
"opensearch_custom_endpoint": "Custom endpoint for the OpenSearch service",
|
||||
"postgresql_custom_endpoint": "Custom endpoint for the PostgreSQL service",
|
||||
|
|
@ -198,6 +200,14 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
|
|||
Optional: true,
|
||||
Description: descriptions["postgresflex_custom_endpoint"],
|
||||
},
|
||||
"mariadb_custom_endpoint": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: descriptions["mariadb_custom_endpoint"],
|
||||
},
|
||||
"authorization_custom_endpoint": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: descriptions["authorization_custom_endpoint"],
|
||||
},
|
||||
"mongodbflex_custom_endpoint": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: descriptions["mongodbflex_custom_endpoint"],
|
||||
|
|
@ -214,10 +224,6 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
|
|||
Optional: true,
|
||||
Description: descriptions["rabbitmq_custom_endpoint"],
|
||||
},
|
||||
"mariadb_custom_endpoint": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: descriptions["mariadb_custom_endpoint"],
|
||||
},
|
||||
"objectstorage_custom_endpoint": schema.StringAttribute{
|
||||
Optional: true,
|
||||
Description: descriptions["objectstorage_custom_endpoint"],
|
||||
|
|
@ -335,6 +341,9 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
|
|||
if !(providerConfig.MariaDBCustomEndpoint.IsUnknown() || providerConfig.MariaDBCustomEndpoint.IsNull()) {
|
||||
providerData.MariaDBCustomEndpoint = providerConfig.MariaDBCustomEndpoint.ValueString()
|
||||
}
|
||||
if !(providerConfig.AuthorizationCustomEndpoint.IsUnknown() || providerConfig.AuthorizationCustomEndpoint.IsNull()) {
|
||||
providerData.AuthorizationCustomEndpoint = providerConfig.AuthorizationCustomEndpoint.ValueString()
|
||||
}
|
||||
if !(providerConfig.ObjectStorageCustomEndpoint.IsUnknown() || providerConfig.ObjectStorageCustomEndpoint.IsNull()) {
|
||||
providerData.ObjectStorageCustomEndpoint = providerConfig.ObjectStorageCustomEndpoint.ValueString()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue