Documentation ¶
Index ¶
- Constants
- Variables
- func DataSource() datasource.DataSource
- func FilterUserDefinedLimits(allAtlasLimits []admin.DataFederationLimit, tflimits []TFLimitModel) []admin.DataFederationLimit
- func NewGroupUpdate(tfProject *TFProjectRSModel, tags *[]admin.ResourceTag) *admin.GroupUpdate
- func NewResourceTags(ctx context.Context, tags types.Map) []admin.ResourceTag
- func NewTFIPAddressesModel(ctx context.Context, ipAddresses *admin.GroupIPAddresses) (types.Object, diag.Diagnostics)
- func NewTFTags(tags []admin.ResourceTag) types.Map
- func NewTeamRoleList(ctx context.Context, teams []TFTeamModel) *[]admin.TeamRole
- func NewTfLimitModelMap(limits []TFLimitModel) map[types.String]TFLimitModel
- func NewTfTeamModelMap(teams []TFTeamModel) map[types.String]TFTeamModel
- func PluralDataSource() datasource.DataSource
- func Resource() resource.Resource
- func ResourceProjectDependentsDeletingRefreshFunc(ctx context.Context, projectID string, clustersAPI admin.ClustersApi) retry.StateRefreshFunc
- func SetProjectBool(plan types.Bool, setting **bool)
- func UpdateProject(ctx context.Context, projectsAPI admin.ProjectsApi, ...) error
- func UpdateProjectBool(plan, state types.Bool, setting **bool) bool
- func UpdateProjectLimits(ctx context.Context, projectsAPI admin.ProjectsApi, ...) error
- func UpdateProjectTeams(ctx context.Context, teamsAPI admin.TeamsApi, ...) error
- type AdditionalProperties
- type AtlasProjectDependants
- type ProjectsDS
- type TFClusterIPsModel
- type TFIPAddressesModel
- type TFLimitModel
- type TFProjectDSModel
- type TFProjectRSModel
- type TFServicesModel
- type TFTeamDSModel
- type TFTeamModel
Constants ¶
View Source
const (
ErrorProjectRead = "error getting project (%s): %s"
)
Variables ¶
View Source
var ClusterIPsObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "cluster_name": types.StringType, "inbound": types.ListType{ElemType: types.StringType}, "outbound": types.ListType{ElemType: types.StringType}, }}
View Source
var IPAddressesObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "services": ServicesObjectType, }}
View Source
var ServicesObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "clusters": types.ListType{ElemType: ClusterIPsObjectType}, }}
View Source
var TfLimitObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "name": types.StringType, "value": types.Int64Type, "current_usage": types.Int64Type, "default_limit": types.Int64Type, "maximum_limit": types.Int64Type, }}
View Source
var TfTeamObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{ "team_id": types.StringType, "role_names": types.SetType{ElemType: types.StringType}, }}
Functions ¶
func DataSource ¶
func DataSource() datasource.DataSource
func FilterUserDefinedLimits ¶
func FilterUserDefinedLimits(allAtlasLimits []admin.DataFederationLimit, tflimits []TFLimitModel) []admin.DataFederationLimit
func NewGroupUpdate ¶ added in v1.15.3
func NewGroupUpdate(tfProject *TFProjectRSModel, tags *[]admin.ResourceTag) *admin.GroupUpdate
func NewResourceTags ¶ added in v1.16.0
func NewTFIPAddressesModel ¶ added in v1.15.0
func NewTFIPAddressesModel(ctx context.Context, ipAddresses *admin.GroupIPAddresses) (types.Object, diag.Diagnostics)
func NewTeamRoleList ¶
func NewTeamRoleList(ctx context.Context, teams []TFTeamModel) *[]admin.TeamRole
func NewTfLimitModelMap ¶
func NewTfLimitModelMap(limits []TFLimitModel) map[types.String]TFLimitModel
func NewTfTeamModelMap ¶
func NewTfTeamModelMap(teams []TFTeamModel) map[types.String]TFTeamModel
func PluralDataSource ¶
func PluralDataSource() datasource.DataSource
func ResourceProjectDependentsDeletingRefreshFunc ¶
func ResourceProjectDependentsDeletingRefreshFunc(ctx context.Context, projectID string, clustersAPI admin.ClustersApi) retry.StateRefreshFunc
resourceProjectDependentsDeletingRefreshFunc assumes the project CRUD outcome will be the same for any non-zero number of dependents
If all dependents are deleting, wait to try and delete Else consider the aggregate dependents idle.
If we get a defined error response, return that right away Else retry
func SetProjectBool ¶ added in v1.15.0
func UpdateProject ¶
func UpdateProject(ctx context.Context, projectsAPI admin.ProjectsApi, projectState, projectPlan *TFProjectRSModel) error
func UpdateProjectBool ¶ added in v1.15.0
func UpdateProjectLimits ¶
func UpdateProjectLimits(ctx context.Context, projectsAPI admin.ProjectsApi, projectState, projectPlan *TFProjectRSModel) error
func UpdateProjectTeams ¶
Types ¶
type AdditionalProperties ¶ added in v1.15.0
type AdditionalProperties struct { Teams *admin.PaginatedTeamRole Settings *admin.GroupSettings IPAddresses *admin.GroupIPAddresses Limits []admin.DataFederationLimit }
func GetProjectPropsFromAPI ¶
func GetProjectPropsFromAPI(ctx context.Context, projectsAPI admin.ProjectsApi, teamsAPI admin.TeamsApi, projectID string) (*AdditionalProperties, error)
GetProjectPropsFromAPI fetches properties obtained from complementary endpoints associated with a project.
type AtlasProjectDependants ¶
type AtlasProjectDependants struct {
AdvancedClusters *admin.PaginatedClusterDescription20240805
}
Resources that need to be cleaned up before a project can be deleted
type ProjectsDS ¶
func (*ProjectsDS) Read ¶
func (d *ProjectsDS) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ProjectsDS) Schema ¶
func (d *ProjectsDS) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type TFClusterIPsModel ¶ added in v1.15.0
type TFIPAddressesModel ¶ added in v1.15.0
type TFIPAddressesModel struct {
Services TFServicesModel `tfsdk:"services"`
}
type TFLimitModel ¶ added in v1.15.0
type TFLimitModel struct { Name types.String `tfsdk:"name"` Value types.Int64 `tfsdk:"value"` CurrentUsage types.Int64 `tfsdk:"current_usage"` DefaultLimit types.Int64 `tfsdk:"default_limit"` MaximumLimit types.Int64 `tfsdk:"maximum_limit"` }
func NewTFLimitsDataSourceModel ¶
func NewTFLimitsDataSourceModel(ctx context.Context, dataFederationLimits []admin.DataFederationLimit) []*TFLimitModel
type TFProjectDSModel ¶ added in v1.15.0
type TFProjectDSModel struct { IPAddresses types.Object `tfsdk:"ip_addresses"` Created types.String `tfsdk:"created"` OrgID types.String `tfsdk:"org_id"` RegionUsageRestrictions types.String `tfsdk:"region_usage_restrictions"` ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` ProjectID types.String `tfsdk:"project_id"` Tags types.Map `tfsdk:"tags"` Teams []*TFTeamDSModel `tfsdk:"teams"` Limits []*TFLimitModel `tfsdk:"limits"` ClusterCount types.Int64 `tfsdk:"cluster_count"` IsCollectDatabaseSpecificsStatisticsEnabled types.Bool `tfsdk:"is_collect_database_specifics_statistics_enabled"` IsRealtimePerformancePanelEnabled types.Bool `tfsdk:"is_realtime_performance_panel_enabled"` IsSchemaAdvisorEnabled types.Bool `tfsdk:"is_schema_advisor_enabled"` IsPerformanceAdvisorEnabled types.Bool `tfsdk:"is_performance_advisor_enabled"` IsExtendedStorageSizesEnabled types.Bool `tfsdk:"is_extended_storage_sizes_enabled"` IsDataExplorerEnabled types.Bool `tfsdk:"is_data_explorer_enabled"` }
func NewTFProjectDataSourceModel ¶
func NewTFProjectDataSourceModel(ctx context.Context, project *admin.Group, projectProps AdditionalProperties) (*TFProjectDSModel, diag.Diagnostics)
type TFProjectRSModel ¶ added in v1.15.0
type TFProjectRSModel struct { Limits types.Set `tfsdk:"limits"` Teams types.Set `tfsdk:"teams"` Tags types.Map `tfsdk:"tags"` IPAddresses types.Object `tfsdk:"ip_addresses"` RegionUsageRestrictions types.String `tfsdk:"region_usage_restrictions"` Name types.String `tfsdk:"name"` OrgID types.String `tfsdk:"org_id"` Created types.String `tfsdk:"created"` ProjectOwnerID types.String `tfsdk:"project_owner_id"` ID types.String `tfsdk:"id"` ClusterCount types.Int64 `tfsdk:"cluster_count"` IsDataExplorerEnabled types.Bool `tfsdk:"is_data_explorer_enabled"` IsPerformanceAdvisorEnabled types.Bool `tfsdk:"is_performance_advisor_enabled"` IsRealtimePerformancePanelEnabled types.Bool `tfsdk:"is_realtime_performance_panel_enabled"` IsSchemaAdvisorEnabled types.Bool `tfsdk:"is_schema_advisor_enabled"` IsExtendedStorageSizesEnabled types.Bool `tfsdk:"is_extended_storage_sizes_enabled"` IsCollectDatabaseSpecificsStatisticsEnabled types.Bool `tfsdk:"is_collect_database_specifics_statistics_enabled"` WithDefaultAlertsSettings types.Bool `tfsdk:"with_default_alerts_settings"` }
func NewTFProjectResourceModel ¶
func NewTFProjectResourceModel(ctx context.Context, projectRes *admin.Group, projectProps AdditionalProperties) (*TFProjectRSModel, diag.Diagnostics)
type TFServicesModel ¶ added in v1.15.0
type TFServicesModel struct {
Clusters []TFClusterIPsModel `tfsdk:"clusters"`
}
type TFTeamDSModel ¶ added in v1.15.0
type TFTeamDSModel struct { TeamID types.String `tfsdk:"team_id"` RoleNames types.List `tfsdk:"role_names"` }
func NewTFTeamsDataSourceModel ¶
func NewTFTeamsDataSourceModel(ctx context.Context, atlasTeams *admin.PaginatedTeamRole) []*TFTeamDSModel
Click to show internal directories.
Click to hide internal directories.