Documentation ¶
Index ¶
- Variables
- func DataSource() datasource.DataSource
- func NewMongoDBAtlasLabels(labels []*TfLabelModel) *[]admin.ComponentLabel
- func NewMongoDBAtlasRoles(roles []*TfRoleModel) *[]admin.DatabaseUserRole
- func NewMongoDBAtlasScopes(scopes []*TfScopeModel) *[]admin.UserScope
- func NewMongoDBDatabaseUser(ctx context.Context, statePasswordValue types.String, ...) (*admin.CloudDatabaseUser, diag.Diagnostics)
- func PluralDataSource() datasource.DataSource
- func Resource() resource.Resource
- func SplitDatabaseUserImportID(id string) (projectID, username, authDatabaseName string, err error)
- type DatabaseUsersDS
- type TfDatabaseUserDSModel
- type TfDatabaseUserModel
- type TfDatabaseUsersDSModel
- type TfLabelModel
- type TfRoleModel
- type TfScopeModel
Constants ¶
This section is empty.
Variables ¶
View Source
var LabelObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "key": types.StringType, "value": types.StringType, }}
View Source
var RoleObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "role_name": types.StringType, "collection_name": types.StringType, "database_name": types.StringType, }}
View Source
var ScopeObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "name": types.StringType, "type": types.StringType, }}
Functions ¶
func DataSource ¶
func DataSource() datasource.DataSource
func NewMongoDBAtlasLabels ¶
func NewMongoDBAtlasLabels(labels []*TfLabelModel) *[]admin.ComponentLabel
func NewMongoDBAtlasRoles ¶
func NewMongoDBAtlasRoles(roles []*TfRoleModel) *[]admin.DatabaseUserRole
func NewMongoDBAtlasScopes ¶
func NewMongoDBAtlasScopes(scopes []*TfScopeModel) *[]admin.UserScope
func NewMongoDBDatabaseUser ¶
func NewMongoDBDatabaseUser(ctx context.Context, statePasswordValue types.String, dbUserModel *TfDatabaseUserModel) (*admin.CloudDatabaseUser, diag.Diagnostics)
func PluralDataSource ¶
func PluralDataSource() datasource.DataSource
Types ¶
type DatabaseUsersDS ¶
func (*DatabaseUsersDS) Read ¶
func (d *DatabaseUsersDS) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*DatabaseUsersDS) Schema ¶
func (d *DatabaseUsersDS) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type TfDatabaseUserDSModel ¶
type TfDatabaseUserDSModel struct { ID types.String `tfsdk:"id"` ProjectID types.String `tfsdk:"project_id"` AuthDatabaseName types.String `tfsdk:"auth_database_name"` Username types.String `tfsdk:"username"` X509Type types.String `tfsdk:"x509_type"` OIDCAuthType types.String `tfsdk:"oidc_auth_type"` LDAPAuthType types.String `tfsdk:"ldap_auth_type"` AWSIAMType types.String `tfsdk:"aws_iam_type"` Roles []TfRoleModel `tfsdk:"roles"` Labels []TfLabelModel `tfsdk:"labels"` Scopes []TfScopeModel `tfsdk:"scopes"` }
func NewTFDatabaseDSUserModel ¶
func NewTFDatabaseDSUserModel(ctx context.Context, dbUser *admin.CloudDatabaseUser) (*TfDatabaseUserDSModel, diag.Diagnostics)
type TfDatabaseUserModel ¶
type TfDatabaseUserModel struct { ID types.String `tfsdk:"id"` ProjectID types.String `tfsdk:"project_id"` AuthDatabaseName types.String `tfsdk:"auth_database_name"` Username types.String `tfsdk:"username"` Password types.String `tfsdk:"password"` X509Type types.String `tfsdk:"x509_type"` OIDCAuthType types.String `tfsdk:"oidc_auth_type"` LDAPAuthType types.String `tfsdk:"ldap_auth_type"` AWSIAMType types.String `tfsdk:"aws_iam_type"` Roles types.Set `tfsdk:"roles"` Labels types.Set `tfsdk:"labels"` Scopes types.Set `tfsdk:"scopes"` }
func NewTfDatabaseUserModel ¶
func NewTfDatabaseUserModel(ctx context.Context, model *TfDatabaseUserModel, dbUser *admin.CloudDatabaseUser) (*TfDatabaseUserModel, diag.Diagnostics)
type TfDatabaseUsersDSModel ¶
type TfDatabaseUsersDSModel struct { ID types.String `tfsdk:"id"` ProjectID types.String `tfsdk:"project_id"` Results []*TfDatabaseUserDSModel `tfsdk:"results"` }
func NewTFDatabaseUsersModel ¶
func NewTFDatabaseUsersModel(ctx context.Context, projectID string, dbUsers []admin.CloudDatabaseUser) (*TfDatabaseUsersDSModel, diag.Diagnostics)
type TfLabelModel ¶
func NewTFLabelsModel ¶
func NewTFLabelsModel(labels []admin.ComponentLabel) []TfLabelModel
type TfRoleModel ¶
type TfRoleModel struct { RoleName types.String `tfsdk:"role_name"` CollectionName types.String `tfsdk:"collection_name"` DatabaseName types.String `tfsdk:"database_name"` }
func NewTFRolesModel ¶
func NewTFRolesModel(roles []admin.DatabaseUserRole) []TfRoleModel
type TfScopeModel ¶
func NewTFScopesModel ¶
func NewTFScopesModel(scopes []admin.UserScope) []TfScopeModel
Click to show internal directories.
Click to hide internal directories.