From 175ce93f85313583489bdcdc10b54ce3050d1f3d Mon Sep 17 00:00:00 2001 From: Henrique Santos <118177985+hcsa73@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:12:18 +0100 Subject: [PATCH] Fix data source references (#61) Co-authored-by: Henrique Santos --- stackit/internal/services/argus/instance/datasource.go | 2 +- .../internal/services/argus/scrapeconfig/datasource.go | 2 +- stackit/internal/services/dns/recordset/datasource.go | 4 ++-- stackit/internal/services/dns/zone/datasource.go | 2 +- stackit/internal/services/logme/credentials/datasource.go | 8 ++++---- stackit/internal/services/logme/instance/datasource.go | 8 ++++---- .../internal/services/mariadb/credentials/datasource.go | 8 ++++---- stackit/internal/services/mariadb/instance/datasource.go | 8 ++++---- .../services/opensearch/credentials/datasource.go | 8 ++++---- .../internal/services/opensearch/instance/datasource.go | 8 ++++---- .../internal/services/postgresflex/instance/datasource.go | 8 ++++---- stackit/internal/services/postgresflex/user/datasource.go | 8 ++++---- .../services/postgresql/credentials/datasource.go | 8 ++++---- .../internal/services/postgresql/instance/datasource.go | 8 ++++---- .../internal/services/rabbitmq/credentials/datasource.go | 8 ++++---- stackit/internal/services/rabbitmq/instance/datasource.go | 8 ++++---- stackit/internal/services/redis/credentials/datasource.go | 8 ++++---- stackit/internal/services/redis/instance/datasource.go | 8 ++++---- .../services/resourcemanager/project/datasource.go | 2 +- stackit/internal/services/ske/cluster/datasource.go | 6 +++--- stackit/internal/services/ske/project/datasource.go | 8 ++++---- 21 files changed, 69 insertions(+), 69 deletions(-) diff --git a/stackit/internal/services/argus/instance/datasource.go b/stackit/internal/services/argus/instance/datasource.go index cc896154..1fca05ca 100644 --- a/stackit/internal/services/argus/instance/datasource.go +++ b/stackit/internal/services/argus/instance/datasource.go @@ -75,7 +75,7 @@ func (d *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ - Description: "Terraform's internal resource ID. It is structured as \"`project_id`,`instance_id`\".", + Description: "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`\".", Computed: true, }, "project_id": schema.StringAttribute{ diff --git a/stackit/internal/services/argus/scrapeconfig/datasource.go b/stackit/internal/services/argus/scrapeconfig/datasource.go index d709c490..6775214a 100644 --- a/stackit/internal/services/argus/scrapeconfig/datasource.go +++ b/stackit/internal/services/argus/scrapeconfig/datasource.go @@ -75,7 +75,7 @@ func (d *scrapeConfigDataSource) Schema(_ context.Context, _ datasource.SchemaRe resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ - Description: "Terraform's internal resource ID. It is structured as \"`project_id`,`instance_id`,`name`\".", + Description: "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`,`name`\".", Computed: true, }, "project_id": schema.StringAttribute{ diff --git a/stackit/internal/services/dns/recordset/datasource.go b/stackit/internal/services/dns/recordset/datasource.go index 121befcf..18288dbe 100644 --- a/stackit/internal/services/dns/recordset/datasource.go +++ b/stackit/internal/services/dns/recordset/datasource.go @@ -35,7 +35,7 @@ func (d *recordSetDataSource) Metadata(_ context.Context, req datasource.Metadat resp.TypeName = req.ProviderTypeName + "_dns_record_set" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (d *recordSetDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -76,7 +76,7 @@ func (d *recordSetDataSource) Schema(_ context.Context, _ datasource.SchemaReque Description: "DNS Record Set Resource schema.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ - Description: "Terraform's internal resource ID. It is structured as \"`project_id`,`zone_id`,`record_set_id`\".", + Description: "Terraform's internal data source. ID. It is structured as \"`project_id`,`zone_id`,`record_set_id`\".", Computed: true, }, "project_id": schema.StringAttribute{ diff --git a/stackit/internal/services/dns/zone/datasource.go b/stackit/internal/services/dns/zone/datasource.go index 1383296c..37839c9e 100644 --- a/stackit/internal/services/dns/zone/datasource.go +++ b/stackit/internal/services/dns/zone/datasource.go @@ -75,7 +75,7 @@ func (d *zoneDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, r Description: "DNS Zone resource schema.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ - Description: "Terraform's internal resource ID. It is structured as \"`project_id`,`zone_id`\".", + Description: "Terraform's internal data source. ID. It is structured as \"`project_id`,`zone_id`\".", Computed: true, }, "project_id": schema.StringAttribute{ diff --git a/stackit/internal/services/logme/credentials/datasource.go b/stackit/internal/services/logme/credentials/datasource.go index 5cd08f72..e572f05d 100644 --- a/stackit/internal/services/logme/credentials/datasource.go +++ b/stackit/internal/services/logme/credentials/datasource.go @@ -31,12 +31,12 @@ type credentialsDataSource struct { client *logme.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_logme_credentials" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.Co tflog.Info(ctx, "LogMe credentials client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "LogMe credentials data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", "credentials_id": "The credentials ID.", "instance_id": "ID of the LogMe instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/logme/instance/datasource.go b/stackit/internal/services/logme/instance/datasource.go index 2d40ca1d..a380426e 100644 --- a/stackit/internal/services/logme/instance/datasource.go +++ b/stackit/internal/services/logme/instance/datasource.go @@ -30,12 +30,12 @@ type instanceDataSource struct { client *logme.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_logme_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -71,11 +71,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "LogMe instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "LogMe instance data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the LogMe instance.", "project_id": "STACKIT Project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/mariadb/credentials/datasource.go b/stackit/internal/services/mariadb/credentials/datasource.go index e25db628..a018ab73 100644 --- a/stackit/internal/services/mariadb/credentials/datasource.go +++ b/stackit/internal/services/mariadb/credentials/datasource.go @@ -31,12 +31,12 @@ type credentialsDataSource struct { client *mariadb.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_mariadb_credentials" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.Co tflog.Info(ctx, "mariadb credentials client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "MariaDB credentials data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", "credentials_id": "The credentials ID.", "instance_id": "ID of the MariaDB instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/mariadb/instance/datasource.go b/stackit/internal/services/mariadb/instance/datasource.go index c21b4b77..2d4ea66a 100644 --- a/stackit/internal/services/mariadb/instance/datasource.go +++ b/stackit/internal/services/mariadb/instance/datasource.go @@ -30,12 +30,12 @@ type instanceDataSource struct { client *mariadb.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_mariadb_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -71,11 +71,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "MariaDB instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "MariaDB instance data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the MariaDB instance.", "project_id": "STACKIT Project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/opensearch/credentials/datasource.go b/stackit/internal/services/opensearch/credentials/datasource.go index 98cdfb3f..41916770 100644 --- a/stackit/internal/services/opensearch/credentials/datasource.go +++ b/stackit/internal/services/opensearch/credentials/datasource.go @@ -31,12 +31,12 @@ type credentialsDataSource struct { client *opensearch.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_opensearch_credentials" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.Co tflog.Info(ctx, "OpenSearch credentials client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "OpenSearch credentials data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", "credentials_id": "The credentials ID.", "instance_id": "ID of the OpenSearch instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/opensearch/instance/datasource.go b/stackit/internal/services/opensearch/instance/datasource.go index d8396796..60be7dda 100644 --- a/stackit/internal/services/opensearch/instance/datasource.go +++ b/stackit/internal/services/opensearch/instance/datasource.go @@ -30,12 +30,12 @@ type instanceDataSource struct { client *opensearch.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_opensearch_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -71,11 +71,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "OpenSearch instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "OpenSearch instance data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the OpenSearch instance.", "project_id": "STACKIT Project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/postgresflex/instance/datasource.go b/stackit/internal/services/postgresflex/instance/datasource.go index 1d812b89..be3bbf2b 100644 --- a/stackit/internal/services/postgresflex/instance/datasource.go +++ b/stackit/internal/services/postgresflex/instance/datasource.go @@ -32,12 +32,12 @@ type instanceDataSource struct { client *postgresflex.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_postgresflex_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -73,11 +73,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "PostgresFlex instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "PostgresFlex instance data source schema.", - "id": "Terraform's internal resource ID. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the PostgresFlex instance.", "project_id": "STACKIT project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/postgresflex/user/datasource.go b/stackit/internal/services/postgresflex/user/datasource.go index 6ecd3b4f..405eb726 100644 --- a/stackit/internal/services/postgresflex/user/datasource.go +++ b/stackit/internal/services/postgresflex/user/datasource.go @@ -45,12 +45,12 @@ type userDataSource struct { client *postgresflex.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *userDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_postgresflex_user" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *userDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -86,11 +86,11 @@ func (r *userDataSource) Configure(ctx context.Context, req datasource.Configure tflog.Info(ctx, "PostgresFlex user client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *userDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "PostgresFlex user data source schema.", - "id": "Terraform's internal resource ID. It is structured as \"`project_id`,`instance_id`,`user_id`\".", + "id": "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`,`user_id`\".", "user_id": "User ID.", "instance_id": "ID of the PostgresFlex instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/postgresql/credentials/datasource.go b/stackit/internal/services/postgresql/credentials/datasource.go index 4c10edfb..cc808120 100644 --- a/stackit/internal/services/postgresql/credentials/datasource.go +++ b/stackit/internal/services/postgresql/credentials/datasource.go @@ -31,12 +31,12 @@ type credentialsDataSource struct { client *postgresql.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_postgresql_credentials" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.Co tflog.Info(ctx, "PostgreSQL credentials client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "PostgreSQL credentials data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", "credentials_id": "The credentials ID.", "instance_id": "ID of the PostgreSQL instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/postgresql/instance/datasource.go b/stackit/internal/services/postgresql/instance/datasource.go index c3fd3d1d..936b02e2 100644 --- a/stackit/internal/services/postgresql/instance/datasource.go +++ b/stackit/internal/services/postgresql/instance/datasource.go @@ -31,12 +31,12 @@ type instanceDataSource struct { client *postgresql.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_postgresql_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "PostgreSQL instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "PostgreSQL instance data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the PostgreSQL instance.", "project_id": "STACKIT Project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/rabbitmq/credentials/datasource.go b/stackit/internal/services/rabbitmq/credentials/datasource.go index 659332db..de5dfd5c 100644 --- a/stackit/internal/services/rabbitmq/credentials/datasource.go +++ b/stackit/internal/services/rabbitmq/credentials/datasource.go @@ -31,12 +31,12 @@ type credentialsDataSource struct { client *rabbitmq.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_rabbitmq_credentials" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.Co tflog.Info(ctx, "RabbitMQ credentials client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "RabbitMQ credentials data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", "credentials_id": "The credentials ID.", "instance_id": "ID of the RabbitMQ instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/rabbitmq/instance/datasource.go b/stackit/internal/services/rabbitmq/instance/datasource.go index 18e21c71..45bf1eba 100644 --- a/stackit/internal/services/rabbitmq/instance/datasource.go +++ b/stackit/internal/services/rabbitmq/instance/datasource.go @@ -30,12 +30,12 @@ type instanceDataSource struct { client *rabbitmq.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_rabbitmq_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -71,11 +71,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "RabbitMQ instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "RabbitMQ instance data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the RabbitMQ instance.", "project_id": "STACKIT Project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/redis/credentials/datasource.go b/stackit/internal/services/redis/credentials/datasource.go index fb033f47..d0f96676 100644 --- a/stackit/internal/services/redis/credentials/datasource.go +++ b/stackit/internal/services/redis/credentials/datasource.go @@ -31,12 +31,12 @@ type credentialsDataSource struct { client *redis.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_redis_credentials" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -72,11 +72,11 @@ func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.Co tflog.Info(ctx, "Redis credentials client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "Redis credentials data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`,`credentials_id`\".", "credentials_id": "The credentials ID.", "instance_id": "ID of the Redis instance.", "project_id": "STACKIT project ID to which the instance is associated.", diff --git a/stackit/internal/services/redis/instance/datasource.go b/stackit/internal/services/redis/instance/datasource.go index 1b3efdde..340c9990 100644 --- a/stackit/internal/services/redis/instance/datasource.go +++ b/stackit/internal/services/redis/instance/datasource.go @@ -30,12 +30,12 @@ type instanceDataSource struct { client *redis.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_redis_instance" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -71,11 +71,11 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi tflog.Info(ctx, "Redis instance client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "Redis instance data source schema.", - "id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`instance_id`\".", + "id": "Terraform's internal data source. identifier. It is structured as \"`project_id`,`instance_id`\".", "instance_id": "ID of the Redis instance.", "project_id": "STACKIT Project ID to which the instance is associated.", "name": "Instance name.", diff --git a/stackit/internal/services/resourcemanager/project/datasource.go b/stackit/internal/services/resourcemanager/project/datasource.go index fb39ea29..5b8ae12a 100644 --- a/stackit/internal/services/resourcemanager/project/datasource.go +++ b/stackit/internal/services/resourcemanager/project/datasource.go @@ -90,7 +90,7 @@ func (d *projectDataSource) Configure(ctx context.Context, req datasource.Config func (d *projectDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { descriptions := map[string]string{ "main": "Resource Manager project data source schema.", - "id": "Terraform's internal resource ID. It is structured as \"`container_id`\".", + "id": "Terraform's internal data source. ID. It is structured as \"`container_id`\".", "container_id": "Project container ID.", "parent_container_id": "Parent container ID", "name": "Project name.", diff --git a/stackit/internal/services/ske/cluster/datasource.go b/stackit/internal/services/ske/cluster/datasource.go index a802a58c..c665c4cd 100644 --- a/stackit/internal/services/ske/cluster/datasource.go +++ b/stackit/internal/services/ske/cluster/datasource.go @@ -31,12 +31,12 @@ type clusterDataSource struct { client *ske.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *clusterDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_ske_cluster" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *clusterDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -76,7 +76,7 @@ func (r *clusterDataSource) Schema(_ context.Context, _ datasource.SchemaRequest Description: "SKE Cluster data source schema.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ - Description: "Terraform's internal resource ID. It is structured as \"`project_id`,`name`\".", + Description: "Terraform's internal data source. ID. It is structured as \"`project_id`,`name`\".", Computed: true, }, "project_id": schema.StringAttribute{ diff --git a/stackit/internal/services/ske/project/datasource.go b/stackit/internal/services/ske/project/datasource.go index 96822999..c1b87ae8 100644 --- a/stackit/internal/services/ske/project/datasource.go +++ b/stackit/internal/services/ske/project/datasource.go @@ -30,12 +30,12 @@ type projectDataSource struct { client *ske.APIClient } -// Metadata returns the resource type name. +// Metadata returns the data source type name. func (r *projectDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { resp.TypeName = req.ProviderTypeName + "_ske_project" } -// Configure adds the provider configured client to the resource. +// Configure adds the provider configured client to the data source. func (r *projectDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { @@ -71,12 +71,12 @@ func (r *projectDataSource) Configure(ctx context.Context, req datasource.Config tflog.Info(ctx, "SKE client configured") } -// Schema defines the schema for the resource. +// Schema defines the schema for the data source. func (r *projectDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ - Description: "Terraform's internal resource ID. It is structured as \"`project_id`\".", + Description: "Terraform's internal data source. ID. It is structured as \"`project_id`\".", Computed: true, }, "project_id": schema.StringAttribute{