databaseuser

package
v1.21.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

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

func Resource

func Resource() resource.Resource

func SplitDatabaseUserImportID

func SplitDatabaseUserImportID(id string) (projectID, username, authDatabaseName string, err error)

Types

type DatabaseUsersDS

type DatabaseUsersDS struct {
	config.DSCommon
}

func (*DatabaseUsersDS) Read

func (*DatabaseUsersDS) Schema

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"`
}

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"`
}

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

type TfLabelModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

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

type TfScopeModel struct {
	Name types.String `tfsdk:"name"`
	Type types.String `tfsdk:"type"`
}

func NewTFScopesModel

func NewTFScopesModel(scopes []admin.UserScope) []TfScopeModel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL