-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package flexcluster | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/terraform-plugin-framework/datasource/schema" | ||
"github.com/hashicorp/terraform-plugin-framework/types" | ||
) | ||
|
||
func DataSourcePluralSchema(ctx context.Context) schema.Schema { | ||
return schema.Schema{ | ||
Attributes: map[string]schema.Attribute{ | ||
"project_id": schema.StringAttribute{ | ||
Required: true, | ||
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.", | ||
}, | ||
"flex_clusters": schema.ListNestedAttribute{ | ||
Computed: true, | ||
NestedObject: schema.NestedAttributeObject{ | ||
Attributes: dataSourceSchema(true), | ||
}, | ||
MarkdownDescription: "List of returned documents that MongoDB Cloud provides when completing this request.", | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
type TFModelDSP struct { | ||
ProjectId types.String `tfsdk:"project_id"` | ||
FlexClusters []TFModel `tfsdk:"flex_clusters"` | ||
} |