Fix data source references (#61)
Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
parent
49ec81ae25
commit
175ce93f85
21 changed files with 69 additions and 69 deletions
|
|
@ -75,7 +75,7 @@ func (d *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaReques
|
||||||
resp.Schema = schema.Schema{
|
resp.Schema = schema.Schema{
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"id": schema.StringAttribute{
|
"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,
|
Computed: true,
|
||||||
},
|
},
|
||||||
"project_id": schema.StringAttribute{
|
"project_id": schema.StringAttribute{
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ func (d *scrapeConfigDataSource) Schema(_ context.Context, _ datasource.SchemaRe
|
||||||
resp.Schema = schema.Schema{
|
resp.Schema = schema.Schema{
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"id": schema.StringAttribute{
|
"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,
|
Computed: true,
|
||||||
},
|
},
|
||||||
"project_id": schema.StringAttribute{
|
"project_id": schema.StringAttribute{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ func (d *recordSetDataSource) Metadata(_ context.Context, req datasource.Metadat
|
||||||
resp.TypeName = req.ProviderTypeName + "_dns_record_set"
|
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) {
|
func (d *recordSetDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
if req.ProviderData == nil {
|
||||||
|
|
@ -76,7 +76,7 @@ func (d *recordSetDataSource) Schema(_ context.Context, _ datasource.SchemaReque
|
||||||
Description: "DNS Record Set Resource schema.",
|
Description: "DNS Record Set Resource schema.",
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"id": schema.StringAttribute{
|
"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,
|
Computed: true,
|
||||||
},
|
},
|
||||||
"project_id": schema.StringAttribute{
|
"project_id": schema.StringAttribute{
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ func (d *zoneDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, r
|
||||||
Description: "DNS Zone resource schema.",
|
Description: "DNS Zone resource schema.",
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"id": schema.StringAttribute{
|
"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,
|
Computed: true,
|
||||||
},
|
},
|
||||||
"project_id": schema.StringAttribute{
|
"project_id": schema.StringAttribute{
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type credentialsDataSource struct {
|
||||||
client *logme.APIClient
|
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) {
|
func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_logme_credentials"
|
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) {
|
func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "LogMe credentials data source schema.",
|
"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.",
|
"credentials_id": "The credentials ID.",
|
||||||
"instance_id": "ID of the LogMe instance.",
|
"instance_id": "ID of the LogMe instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ type instanceDataSource struct {
|
||||||
client *logme.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_logme_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "LogMe instance data source schema.",
|
"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.",
|
"instance_id": "ID of the LogMe instance.",
|
||||||
"project_id": "STACKIT Project ID to which the instance is associated.",
|
"project_id": "STACKIT Project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type credentialsDataSource struct {
|
||||||
client *mariadb.APIClient
|
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) {
|
func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_mariadb_credentials"
|
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) {
|
func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "MariaDB credentials data source schema.",
|
"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.",
|
"credentials_id": "The credentials ID.",
|
||||||
"instance_id": "ID of the MariaDB instance.",
|
"instance_id": "ID of the MariaDB instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ type instanceDataSource struct {
|
||||||
client *mariadb.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_mariadb_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "MariaDB instance data source schema.",
|
"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.",
|
"instance_id": "ID of the MariaDB instance.",
|
||||||
"project_id": "STACKIT Project ID to which the instance is associated.",
|
"project_id": "STACKIT Project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type credentialsDataSource struct {
|
||||||
client *opensearch.APIClient
|
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) {
|
func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_opensearch_credentials"
|
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) {
|
func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "OpenSearch credentials data source schema.",
|
"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.",
|
"credentials_id": "The credentials ID.",
|
||||||
"instance_id": "ID of the OpenSearch instance.",
|
"instance_id": "ID of the OpenSearch instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ type instanceDataSource struct {
|
||||||
client *opensearch.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_opensearch_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "OpenSearch instance data source schema.",
|
"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.",
|
"instance_id": "ID of the OpenSearch instance.",
|
||||||
"project_id": "STACKIT Project ID to which the instance is associated.",
|
"project_id": "STACKIT Project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,12 @@ type instanceDataSource struct {
|
||||||
client *postgresflex.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_postgresflex_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "PostgresFlex instance data source schema.",
|
"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.",
|
"instance_id": "ID of the PostgresFlex instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@ type userDataSource struct {
|
||||||
client *postgresflex.APIClient
|
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) {
|
func (r *userDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_postgresflex_user"
|
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) {
|
func (r *userDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *userDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "PostgresFlex user data source schema.",
|
"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.",
|
"user_id": "User ID.",
|
||||||
"instance_id": "ID of the PostgresFlex instance.",
|
"instance_id": "ID of the PostgresFlex instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type credentialsDataSource struct {
|
||||||
client *postgresql.APIClient
|
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) {
|
func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_postgresql_credentials"
|
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) {
|
func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "PostgreSQL credentials data source schema.",
|
"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.",
|
"credentials_id": "The credentials ID.",
|
||||||
"instance_id": "ID of the PostgreSQL instance.",
|
"instance_id": "ID of the PostgreSQL instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type instanceDataSource struct {
|
||||||
client *postgresql.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_postgresql_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "PostgreSQL instance data source schema.",
|
"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.",
|
"instance_id": "ID of the PostgreSQL instance.",
|
||||||
"project_id": "STACKIT Project ID to which the instance is associated.",
|
"project_id": "STACKIT Project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type credentialsDataSource struct {
|
||||||
client *rabbitmq.APIClient
|
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) {
|
func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_rabbitmq_credentials"
|
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) {
|
func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "RabbitMQ credentials data source schema.",
|
"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.",
|
"credentials_id": "The credentials ID.",
|
||||||
"instance_id": "ID of the RabbitMQ instance.",
|
"instance_id": "ID of the RabbitMQ instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ type instanceDataSource struct {
|
||||||
client *rabbitmq.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_rabbitmq_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "RabbitMQ instance data source schema.",
|
"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.",
|
"instance_id": "ID of the RabbitMQ instance.",
|
||||||
"project_id": "STACKIT Project ID to which the instance is associated.",
|
"project_id": "STACKIT Project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type credentialsDataSource struct {
|
||||||
client *redis.APIClient
|
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) {
|
func (r *credentialsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_redis_credentials"
|
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) {
|
func (r *credentialsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *credentialsDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "Redis credentials data source schema.",
|
"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.",
|
"credentials_id": "The credentials ID.",
|
||||||
"instance_id": "ID of the Redis instance.",
|
"instance_id": "ID of the Redis instance.",
|
||||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ type instanceDataSource struct {
|
||||||
client *redis.APIClient
|
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) {
|
func (r *instanceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_redis_instance"
|
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) {
|
func (r *instanceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
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")
|
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) {
|
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "Redis instance data source schema.",
|
"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.",
|
"instance_id": "ID of the Redis instance.",
|
||||||
"project_id": "STACKIT Project ID to which the instance is associated.",
|
"project_id": "STACKIT Project ID to which the instance is associated.",
|
||||||
"name": "Instance name.",
|
"name": "Instance name.",
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
func (d *projectDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
descriptions := map[string]string{
|
descriptions := map[string]string{
|
||||||
"main": "Resource Manager project data source schema.",
|
"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.",
|
"container_id": "Project container ID.",
|
||||||
"parent_container_id": "Parent container ID",
|
"parent_container_id": "Parent container ID",
|
||||||
"name": "Project name.",
|
"name": "Project name.",
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ type clusterDataSource struct {
|
||||||
client *ske.APIClient
|
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) {
|
func (r *clusterDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_ske_cluster"
|
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) {
|
func (r *clusterDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
if req.ProviderData == nil {
|
||||||
|
|
@ -76,7 +76,7 @@ func (r *clusterDataSource) Schema(_ context.Context, _ datasource.SchemaRequest
|
||||||
Description: "SKE Cluster data source schema.",
|
Description: "SKE Cluster data source schema.",
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"id": schema.StringAttribute{
|
"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,
|
Computed: true,
|
||||||
},
|
},
|
||||||
"project_id": schema.StringAttribute{
|
"project_id": schema.StringAttribute{
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ type projectDataSource struct {
|
||||||
client *ske.APIClient
|
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) {
|
func (r *projectDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
|
||||||
resp.TypeName = req.ProviderTypeName + "_ske_project"
|
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) {
|
func (r *projectDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
|
||||||
// Prevent panic if the provider has not been configured.
|
// Prevent panic if the provider has not been configured.
|
||||||
if req.ProviderData == nil {
|
if req.ProviderData == nil {
|
||||||
|
|
@ -71,12 +71,12 @@ func (r *projectDataSource) Configure(ctx context.Context, req datasource.Config
|
||||||
tflog.Info(ctx, "SKE client configured")
|
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) {
|
func (r *projectDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||||
resp.Schema = schema.Schema{
|
resp.Schema = schema.Schema{
|
||||||
Attributes: map[string]schema.Attribute{
|
Attributes: map[string]schema.Attribute{
|
||||||
"id": schema.StringAttribute{
|
"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,
|
Computed: true,
|
||||||
},
|
},
|
||||||
"project_id": schema.StringAttribute{
|
"project_id": schema.StringAttribute{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue