diff --git a/mongodbatlas/data_source_mongodbatlas_cloud_provider_access_setup_test.go b/mongodbatlas/data_source_mongodbatlas_cloud_provider_access_setup_test.go index 9abff7810b..4d7ae08435 100644 --- a/mongodbatlas/data_source_mongodbatlas_cloud_provider_access_setup_test.go +++ b/mongodbatlas/data_source_mongodbatlas_cloud_provider_access_setup_test.go @@ -54,7 +54,7 @@ func TestAccConfigDSCloudProviderAccessSetup_aws_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "created_date"), resource.TestCheckResourceAttrSet(resourceName, "role_id"), - resource.TestCheckResourceAttrSet(dsName, "aws.atlas_assumed_role_external_id"), + resource.TestCheckResourceAttrSet(dsName, "aws_config.0.atlas_assumed_role_external_id"), ), }, }, diff --git a/mongodbatlas/data_source_mongodbatlas_cluster.go b/mongodbatlas/data_source_mongodbatlas_cluster.go index c75c4c9560..a8a34a3bbf 100644 --- a/mongodbatlas/data_source_mongodbatlas_cluster.go +++ b/mongodbatlas/data_source_mongodbatlas_cluster.go @@ -39,14 +39,6 @@ func dataSourceMongoDBAtlasCluster() *schema.Resource { Type: schema.TypeBool, Computed: true, }, - "bi_connector": { - Type: schema.TypeMap, - Computed: true, - Deprecated: "use bi_connector_config instead", - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, "bi_connector_config": { Type: schema.TypeList, Computed: true, @@ -426,10 +418,6 @@ func dataSourceMongoDBAtlasClusterRead(ctx context.Context, d *schema.ResourceDa return diag.FromErr(fmt.Errorf(errorClusterSetting, "state_name", clusterName, err)) } - if err := d.Set("bi_connector", flattenBiConnector(cluster.BiConnector)); err != nil { - return diag.FromErr(fmt.Errorf(errorClusterSetting, "bi_connector", clusterName, err)) - } - if err := d.Set("bi_connector_config", flattenBiConnectorConfig(cluster.BiConnector)); err != nil { return diag.FromErr(fmt.Errorf(errorClusterSetting, "bi_connector_config", clusterName, err)) } diff --git a/mongodbatlas/data_source_mongodbatlas_clusters.go b/mongodbatlas/data_source_mongodbatlas_clusters.go index e116dcae18..ce67afcf54 100644 --- a/mongodbatlas/data_source_mongodbatlas_clusters.go +++ b/mongodbatlas/data_source_mongodbatlas_clusters.go @@ -46,14 +46,6 @@ func dataSourceMongoDBAtlasClusters() *schema.Resource { Type: schema.TypeBool, Computed: true, }, - "bi_connector": { - Type: schema.TypeMap, - Computed: true, - Deprecated: "use bi_connector_config instead", - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, "bi_connector_config": { Type: schema.TypeList, Computed: true, @@ -406,7 +398,6 @@ func flattenClusters(ctx context.Context, d *schema.ResourceData, conn *matlas.C "provider_instance_size_name": clusters[i].ProviderSettings.InstanceSizeName, "provider_name": clusters[i].ProviderSettings.ProviderName, "provider_region_name": clusters[i].ProviderSettings.RegionName, - "bi_connector": flattenBiConnector(clusters[i].BiConnector), "bi_connector_config": flattenBiConnectorConfig(clusters[i].BiConnector), "replication_specs": flattenReplicationSpecs(clusters[i].ReplicationSpecs), "labels": flattenLabels(clusters[i].Labels), diff --git a/mongodbatlas/data_source_mongodbatlas_global_cluster_config_test.go b/mongodbatlas/data_source_mongodbatlas_global_cluster_config_test.go index 8679175a57..c7256369b1 100644 --- a/mongodbatlas/data_source_mongodbatlas_global_cluster_config_test.go +++ b/mongodbatlas/data_source_mongodbatlas_global_cluster_config_test.go @@ -38,7 +38,7 @@ func testAccDSMongoDBAtlasGlobalClusterConfig(projectID, name string) string { project_id = "%s" name = "%s" disk_size_gb = 80 - provider_backup_enabled = false + cloud_backup = false cluster_type = "GEOSHARDED" // Provider Settings "block" diff --git a/mongodbatlas/data_source_mongodbatlas_ldap_verify_test.go b/mongodbatlas/data_source_mongodbatlas_ldap_verify_test.go index fb2758a794..80f701cdfc 100644 --- a/mongodbatlas/data_source_mongodbatlas_ldap_verify_test.go +++ b/mongodbatlas/data_source_mongodbatlas_ldap_verify_test.go @@ -61,7 +61,7 @@ func testAccMongoDBAtlasDataSourceLDAPVerifyConfig(projectName, orgID, clusterNa provider_name = "AWS" provider_region_name = "US_EAST_2" provider_instance_size_name = "M10" - provider_backup_enabled = true //enable cloud provider snapshots + cloud_backup = true //enable cloud provider snapshots } resource "mongodbatlas_ldap_verify" "test" { diff --git a/mongodbatlas/data_source_mongodbatlas_project_api_key.go b/mongodbatlas/data_source_mongodbatlas_project_api_key.go index e0b61ee886..4415a488cc 100644 --- a/mongodbatlas/data_source_mongodbatlas_project_api_key.go +++ b/mongodbatlas/data_source_mongodbatlas_project_api_key.go @@ -33,14 +33,6 @@ func dataSourceMongoDBAtlasProjectAPIKey() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "role_names": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "project_assignment"), - }, "project_assignment": { Type: schema.TypeSet, Computed: true, @@ -97,10 +89,6 @@ func dataSourceMongoDBAtlasProjectAPIKeyRead(ctx context.Context, d *schema.Reso return diag.Errorf(errorProjectSetting, `project_assignment`, projectID, err) } } - - if err := d.Set("role_names", flattenProjectAPIKeyRoles(projectID, val.Roles)); err != nil { - return diag.FromErr(fmt.Errorf("error setting `roles`: %s", err)) - } } d.SetId(id.UniqueId()) diff --git a/mongodbatlas/data_source_mongodbatlas_project_api_keys.go b/mongodbatlas/data_source_mongodbatlas_project_api_keys.go index 9b23c467a6..e397fd732d 100644 --- a/mongodbatlas/data_source_mongodbatlas_project_api_keys.go +++ b/mongodbatlas/data_source_mongodbatlas_project_api_keys.go @@ -48,14 +48,6 @@ func dataSourceMongoDBAtlasProjectAPIKeys() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "role_names": { - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "project_assignment"), - }, "project_assignment": { Type: schema.TypeSet, Optional: true, @@ -125,7 +117,6 @@ func flattenProjectAPIKeys(ctx context.Context, conn *matlas.Client, projectID s "description": apiKey.Desc, "public_key": apiKey.PublicKey, "private_key": apiKey.PrivateKey, - "role_names": flattenProjectAPIKeyRoles(projectID, apiKey.Roles), } projectAssignment, err := newProjectAssignment(ctx, conn, projectID, apiKey.ID) diff --git a/mongodbatlas/fw_provider.go b/mongodbatlas/fw_provider.go index ced99b981d..a9dbe5205f 100644 --- a/mongodbatlas/fw_provider.go +++ b/mongodbatlas/fw_provider.go @@ -6,11 +6,9 @@ import ( "regexp" "time" - "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/datasource" - "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/hashicorp/terraform-plugin-framework/provider/schema" "github.com/hashicorp/terraform-plugin-framework/providerserver" @@ -58,7 +56,6 @@ type tfAssumeRoleModel struct { RoleARN types.String `tfsdk:"role_arn"` SessionName types.String `tfsdk:"session_name"` SourceIdentity types.String `tfsdk:"source_identity"` - DurationSeconds types.Int64 `tfsdk:"duration_seconds"` } func (p *MongodbtlasProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) { @@ -130,20 +127,6 @@ var fwAssumeRoleSchema = schema.ListNestedBlock{ Description: "The duration, between 15 minutes and 12 hours, of the role session. Valid time units are ns, us (or µs), ms, s, h, or m.", Validators: []validator.String{ cstmvalidator.ValidDurationBetween(15, 12*60), - stringvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("duration_seconds"), - }...), - }, - }, - "duration_seconds": schema.Int64Attribute{ - Optional: true, - DeprecationMessage: "Use assume_role.duration instead", - Description: "The duration, in seconds, of the role session.", - Validators: []validator.Int64{ - int64validator.Between(900, 43200), - int64validator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("duration"), - }...), }, }, "external_id": schema.StringAttribute{ @@ -261,8 +244,6 @@ func parseTfModel(ctx context.Context, tfAssumeRoleModel *tfAssumeRoleModel) *As if !tfAssumeRoleModel.Duration.IsNull() { duration, _ := time.ParseDuration(tfAssumeRoleModel.Duration.ValueString()) assumeRole.Duration = duration - } else if !tfAssumeRoleModel.DurationSeconds.IsNull() { - assumeRole.Duration = time.Duration(tfAssumeRoleModel.DurationSeconds.ValueInt64()) * time.Second } assumeRole.ExternalID = tfAssumeRoleModel.ExternalID.ValueString() diff --git a/mongodbatlas/fw_resource_mongodbatlas_database_user_test.go b/mongodbatlas/fw_resource_mongodbatlas_database_user_test.go index 9d10258788..c7667ce150 100644 --- a/mongodbatlas/fw_resource_mongodbatlas_database_user_test.go +++ b/mongodbatlas/fw_resource_mongodbatlas_database_user_test.go @@ -863,7 +863,7 @@ func testAccMongoDBAtlasDatabaseUserWithScopes(username, password, projectName, provider_name = "AWS" provider_region_name = "US_EAST_2" provider_instance_size_name = "M10" - provider_backup_enabled = true //enable cloud provider snapshots + cloud_backup = true //enable cloud provider snapshots } resource "mongodbatlas_database_user" "test" { diff --git a/mongodbatlas/provider.go b/mongodbatlas/provider.go index fe5f45ae99..d0250c653c 100644 --- a/mongodbatlas/provider.go +++ b/mongodbatlas/provider.go @@ -39,13 +39,12 @@ var ( ) const ( - endPointSTSDefault = "https://sts.amazonaws.com" - DeprecationMessage = "this resource is deprecated and will be removed in %s, please transition to %s" - DeprecationMessageParameterToResource = "this parameter is deprecated and will be removed in %s, please transition to %s" - MissingAuthAttrError = "either Atlas Programmatic API Keys or AWS Secrets Manager attributes must be set" - ProviderConfigError = "error in configuring the provider." - AWS = "AWS" - AZURE = "AZURE" + endPointSTSDefault = "https://sts.amazonaws.com" + DeprecationMessage = "this resource is deprecated and will be removed in %s, please transition to %s" + MissingAuthAttrError = "either Atlas Programmatic API Keys or AWS Secrets Manager attributes must be set" + ProviderConfigError = "error in configuring the provider." + AWS = "AWS" + AZURE = "AZURE" GCP ) @@ -703,19 +702,10 @@ func assumeRoleSchema() *schema.Schema { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "duration": { - Type: schema.TypeString, - Optional: true, - Description: "The duration, between 15 minutes and 12 hours, of the role session. Valid time units are ns, us (or µs), ms, s, h, or m.", - ValidateFunc: validAssumeRoleDuration, - ConflictsWith: []string{"assume_role.0.duration_seconds"}, - }, - "duration_seconds": { - Type: schema.TypeInt, - Optional: true, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "assume_role.duration"), - Description: "The duration, in seconds, of the role session.", - ValidateFunc: validation.IntBetween(900, 43200), - ConflictsWith: []string{"assume_role.0.duration"}, + Type: schema.TypeString, + Optional: true, + Description: "The duration, between 15 minutes and 12 hours, of the role session. Valid time units are ns, us (or µs), ms, s, h, or m.", + ValidateFunc: validAssumeRoleDuration, }, "external_id": { Type: schema.TypeString, @@ -823,8 +813,6 @@ func expandAssumeRole(tfMap map[string]interface{}) *AssumeRole { if v, ok := tfMap["duration"].(string); ok && v != "" { duration, _ := time.ParseDuration(v) assumeRole.Duration = duration - } else if v, ok := tfMap["duration_seconds"].(int); ok && v != 0 { - assumeRole.Duration = time.Duration(v) * time.Second } if v, ok := tfMap["external_id"].(string); ok && v != "" { diff --git a/mongodbatlas/resource_mongodbatlas_advanced_cluster.go b/mongodbatlas/resource_mongodbatlas_advanced_cluster.go index 50aa290b39..b02ef67b34 100644 --- a/mongodbatlas/resource_mongodbatlas_advanced_cluster.go +++ b/mongodbatlas/resource_mongodbatlas_advanced_cluster.go @@ -74,34 +74,11 @@ func resourceMongoDBAtlasAdvancedCluster() *schema.Resource { Optional: true, Description: "Flag that indicates whether to retain backup snapshots for the deleted dedicated cluster", }, - "bi_connector": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{"bi_connector_config"}, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "bi_connector_config"), - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "enabled": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - "read_preference": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - }, - }, - }, "bi_connector_config": { - Type: schema.TypeList, - Optional: true, - ConflictsWith: []string{"bi_connector"}, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enabled": { @@ -388,13 +365,6 @@ func resourceMongoDBAtlasAdvancedClusterCreate(ctx context.Context, d *schema.Re if v, ok := d.GetOk("backup_enabled"); ok { request.BackupEnabled = pointy.Bool(v.(bool)) } - if _, ok := d.GetOk("bi_connector"); ok { - biConnector, err := expandBiConnectorConfig(d) - if err != nil { - return diag.FromErr(fmt.Errorf(errorClusterAdvancedCreate, err)) - } - request.BiConnector = biConnector - } if _, ok := d.GetOk("bi_connector_config"); ok { biConnector, err := expandBiConnectorConfig(d) if err != nil { @@ -523,10 +493,6 @@ func resourceMongoDBAtlasAdvancedClusterRead(ctx context.Context, d *schema.Reso return diag.FromErr(fmt.Errorf(errorClusterAdvancedSetting, "backup_enabled", clusterName, err)) } - if err := d.Set("bi_connector", flattenBiConnectorConfig(cluster.BiConnector)); err != nil { - return diag.FromErr(fmt.Errorf(errorClusterAdvancedSetting, "bi_connector", clusterName, err)) - } - if err := d.Set("bi_connector_config", flattenBiConnectorConfig(cluster.BiConnector)); err != nil { return diag.FromErr(fmt.Errorf(errorClusterAdvancedSetting, "bi_connector_config", clusterName, err)) } @@ -669,10 +635,6 @@ func resourceMongoDBAtlasAdvancedClusterUpdate(ctx context.Context, d *schema.Re cluster.BiConnector, _ = expandBiConnectorConfig(d) } - if d.HasChange("bi_connector") { - cluster.BiConnector, _ = expandBiConnectorConfig(d) - } - if d.HasChange("cluster_type") { cluster.ClusterType = d.Get("cluster_type").(string) } diff --git a/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job.go b/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job.go index 7c7f821bba..4960c8678a 100644 --- a/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job.go +++ b/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job.go @@ -38,74 +38,11 @@ func resourceMongoDBAtlasCloudBackupSnapshotRestoreJob() *schema.Resource { Required: true, ForceNew: true, }, - "delivery_type": { - Type: schema.TypeMap, - Optional: true, - ForceNew: true, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "delivery_type_config"), - ConflictsWith: []string{"delivery_type_config"}, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) { - v := val.(map[string]interface{}) - - _, automated := v["automated"] - _, download := v["download"] - _, pointInTime := v["point_in_time"] - - if (v["automated"] == "true" && v["download"] == "true" && v["point_in_time"] == "true") || - (v["automated"] == "false" && v["download"] == "false" && v["point_in_time"] == "false") || - (!automated && !download && !pointInTime) { - errs = append(errs, fmt.Errorf("%q you can only submit one type of restore job: automated, download or point_in_time", key)) - } - if v["automated"] == "true" && (v["download"] == "false" || v["download"] == "" || !download) { - if targetClusterName, ok := v["target_cluster_name"]; !ok || targetClusterName == "" { - errs = append(errs, fmt.Errorf("%q target_cluster_name must be set", key)) - } - if targetGroupID, ok := v["target_project_id"]; !ok || targetGroupID == "" { - errs = append(errs, fmt.Errorf("%q target_project_id must be set", key)) - } - } - if v["download"] == "true" && (v["automated"] == "false" || v["automated"] == "" || !automated) && - (v["point_in_time"] == "false" || v["point_in_time"] == "" || !pointInTime) { - if targetClusterName, ok := v["target_cluster_name"]; ok || targetClusterName == "" { - errs = append(errs, fmt.Errorf("%q it's not necessary implement target_cluster_name when you are using download delivery type", key)) - } - if targetGroupID, ok := v["target_project_id"]; ok || targetGroupID == "" { - errs = append(errs, fmt.Errorf("%q it's not necessary implement target_project_id when you are using download delivery type", key)) - } - } - if v["point_in_time"] == "true" && (v["download"] == "false" || v["download"] == "" || !download) && - (v["automated"] == "false" || v["automated"] == "" || !automated) { - _, oplogTS := v["oplog_ts"] - _, pointTimeUTC := v["point_in_time_utc_seconds"] - _, oplogInc := v["oplog_inc"] - if targetClusterName, ok := v["target_cluster_name"]; !ok || targetClusterName == "" { - errs = append(errs, fmt.Errorf("%q target_cluster_name must be set", key)) - } - if targetGroupID, ok := v["target_project_id"]; !ok || targetGroupID == "" { - errs = append(errs, fmt.Errorf("%q target_project_id must be set", key)) - } - if !pointTimeUTC && !oplogTS && !oplogInc { - errs = append(errs, fmt.Errorf("%q point_in_time_utc_seconds or oplog_ts and oplog_inc must be set", key)) - } - if (oplogTS && !oplogInc) || (!oplogTS && oplogInc) { - errs = append(errs, fmt.Errorf("%q if oplog_ts or oplog_inc is provided, oplog_inc and oplog_ts must be set", key)) - } - if pointTimeUTC && (oplogTS || oplogInc) { - errs = append(errs, fmt.Errorf("%q you can't use both point_in_time_utc_seconds and oplog_ts or oplog_inc", key)) - } - } - return - }, - }, "delivery_type_config": { - Type: schema.TypeList, - MaxItems: 1, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"delivery_type"}, + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "download": { @@ -206,27 +143,6 @@ func resourceMongoDBAtlasCloudBackupSnapshotRestoreJobCreate(ctx context.Context snapshotReq := buildRequestSnapshotReq(d) - if _, ok := d.GetOk("delivery_type"); ok { - deliveryType := "automated" - if aut, _ := d.Get("delivery_type.download").(string); aut != "true" { - deliveryType = "download" - } - - if aut, _ := d.Get("delivery_type.point_in_time").(string); aut == "true" { - deliveryType = "pointInTime" - } - - snapshotReq = &matlas.CloudProviderSnapshotRestoreJob{ - SnapshotID: getEncodedID(d.Get("snapshot_id").(string), "snapshot_id"), - DeliveryType: deliveryType, - TargetClusterName: d.Get("delivery_type.target_cluster_name").(string), - TargetGroupID: d.Get("delivery_type.target_project_id").(string), - OplogTs: cast.ToInt64(d.Get("delivery_type.oplog_ts")), - OplogInc: cast.ToInt64(d.Get("delivery_type.oplog_inc")), - PointInTimeUTCSeconds: cast.ToInt64(d.Get("delivery_type.point_in_time_utc_seconds")), - } - } - cloudProviderSnapshotRestoreJob, _, err := conn.CloudProviderSnapshotRestoreJobs.Create(ctx, requestParameters, snapshotReq) if err != nil { return diag.FromErr(fmt.Errorf("error restore a snapshot: %s", err)) @@ -310,11 +226,6 @@ func resourceMongoDBAtlasCloudBackupSnapshotRestoreJobDelete(ctx context.Context shouldDelete := true // Validate because automated restore can not be cancelled - if aut, _ := d.Get("delivery_type.automated").(string); aut == "true" { - log.Print("Automated restore cannot be cancelled") - shouldDelete = false - } - if aut, _ := d.Get("delivery_type_config.0.automated").(bool); aut { log.Print("Automated restore cannot be cancelled") shouldDelete = false @@ -379,12 +290,6 @@ func resourceMongoDBAtlasCloudBackupSnapshotRestoreJobImportState(ctx context.Co deliveryTypeConfig["target_project_id"] = u.TargetGroupID } - if _, ok := d.GetOk("delivery_type"); ok { - if err := d.Set("delivery_type", deliveryType); err != nil { - log.Printf("[WARN] Error setting delivery_type for (%s): %s", d.Id(), err) - } - } - if err := d.Set("delivery_type_config", []interface{}{deliveryTypeConfig}); err != nil { log.Printf("[WARN] Error setting delivery_type for (%s): %s", d.Id(), err) } diff --git a/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job_test.go b/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job_test.go index 8950bd28c2..2e27dff3d4 100644 --- a/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job_test.go +++ b/mongodbatlas/resource_mongodbatlas_cloud_backup_snapshot_restore_job_test.go @@ -328,7 +328,7 @@ resource "mongodbatlas_cluster" "my_cluster" { provider_name = "AWS" provider_region_name = "US_EAST_1" provider_instance_size_name = "M10" - provider_backup_enabled = true // enable cloud provider snapshots + cloud_backup = true // enable cloud provider snapshots } resource "mongodbatlas_cloud_backup_snapshot" "test" { diff --git a/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup.go b/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup.go index 998a87704d..02009b4cc9 100644 --- a/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup.go +++ b/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup.go @@ -38,14 +38,6 @@ func resourceMongoDBAtlasCloudProviderAccessSetup() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{AWS, AZURE}, false), ForceNew: true, }, - "aws": { - Type: schema.TypeMap, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "aws_config"), - }, "aws_config": { Type: schema.TypeList, Computed: true, @@ -200,10 +192,6 @@ func roleToSchemaSetup(role *matlas.CloudProviderAccessRole) map[string]interfac if role.ProviderName == "AWS" { out := map[string]interface{}{ "provider_name": role.ProviderName, - "aws": map[string]interface{}{ // Deprecated, will be deleted later - "atlas_aws_account_arn": role.AtlasAWSAccountARN, - "atlas_assumed_role_external_id": role.AtlasAssumedRoleExternalID, - }, "aws_config": []interface{}{map[string]interface{}{ "atlas_aws_account_arn": role.AtlasAWSAccountARN, "atlas_assumed_role_external_id": role.AtlasAssumedRoleExternalID, @@ -221,7 +209,6 @@ func roleToSchemaSetup(role *matlas.CloudProviderAccessRole) map[string]interfac "service_principal_id": role.AzureServicePrincipalID, "tenant_id": role.AzureTenantID, }}, - "aws": map[string]interface{}{}, "aws_config": []interface{}{map[string]interface{}{}}, "created_date": role.CreatedDate, "last_updated_date": role.LastUpdatedDate, diff --git a/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup_test.go b/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup_test.go index 3dded9a531..25a09a1ddc 100644 --- a/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup_test.go +++ b/mongodbatlas/resource_mongodbatlas_cloud_provider_access_setup_test.go @@ -29,8 +29,6 @@ func TestAccConfigRSCloudProviderAccessSetupAWS_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( // same as regular cloud resource testAccCheckMongoDBAtlasProviderAccessExists(resourceName, &targetRole), - resource.TestCheckResourceAttrSet(resourceName, "aws.atlas_assumed_role_external_id"), - resource.TestCheckResourceAttrSet(resourceName, "aws.atlas_aws_account_arn"), resource.TestCheckResourceAttrSet(dataSourceName, "aws_config.0.atlas_assumed_role_external_id"), resource.TestCheckResourceAttrSet(dataSourceName, "aws_config.0.atlas_aws_account_arn"), resource.TestCheckResourceAttrSet(dataSourceName, "created_date"), @@ -59,8 +57,8 @@ func TestAccConfigRSCloudProviderAccessSetupAWS_importBasic(t *testing.T) { Check: resource.ComposeTestCheckFunc( // same as regular cloud provider because we are just checking in the api testAccCheckMongoDBAtlasProviderAccessExists(resourceName, &targetRole), - resource.TestCheckResourceAttrSet(resourceName, "aws.atlas_assumed_role_external_id"), - resource.TestCheckResourceAttrSet(resourceName, "aws.atlas_aws_account_arn"), + resource.TestCheckResourceAttrSet(resourceName, "aws_config.0.atlas_assumed_role_external_id"), + resource.TestCheckResourceAttrSet(resourceName, "aws_config.0.atlas_aws_account_arn"), ), }, { diff --git a/mongodbatlas/resource_mongodbatlas_cluster.go b/mongodbatlas/resource_mongodbatlas_cluster.go index 3e612abeae..6c9e7b9cb6 100644 --- a/mongodbatlas/resource_mongodbatlas_cluster.go +++ b/mongodbatlas/resource_mongodbatlas_cluster.go @@ -9,7 +9,6 @@ import ( "net/http" "reflect" "regexp" - "strconv" "strings" "time" @@ -87,21 +86,11 @@ func resourceMongoDBAtlasCluster() *schema.Resource { Optional: true, Description: "Flag that indicates whether to retain backup snapshots for the deleted dedicated cluster", }, - "bi_connector": { - Type: schema.TypeMap, - Optional: true, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "bi_connector_config"), - ConflictsWith: []string{"bi_connector_config"}, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, "bi_connector_config": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, - ConflictsWith: []string{"bi_connector"}, + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enabled": { @@ -149,17 +138,11 @@ func resourceMongoDBAtlasCluster() *schema.Resource { Optional: true, Default: 1, }, - "provider_backup_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "cloud_backup"), - }, "cloud_backup": { Type: schema.TypeBool, Optional: true, Default: false, - ConflictsWith: []string{"provider_backup_enabled", "backup_enabled"}, + ConflictsWith: []string{"backup_enabled"}, }, "provider_instance_size_name": { Type: schema.TypeString, @@ -491,27 +474,6 @@ func resourceMongoDBAtlasClusterCreate(ctx context.Context, d *schema.ResourceDa clusterRequest.ProviderBackupEnabled = pointy.Bool(v.(bool)) } - // Deprecated will remove later - if v, ok := d.GetOk("provider_backup_enabled"); ok { - clusterRequest.ProviderBackupEnabled = pointy.Bool(v.(bool)) - } - - if _, ok := d.GetOk("bi_connector"); ok { - biConnector, err := expandBiConnector(d) - if err != nil { - return diag.FromErr(fmt.Errorf(errorClusterCreate, err)) - } - clusterRequest.BiConnector = biConnector - } - - if _, ok := d.GetOk("bi_connector"); ok { - biConnector, err := expandBiConnector(d) - if err != nil { - return diag.FromErr(fmt.Errorf(errorClusterCreate, err)) - } - clusterRequest.BiConnector = biConnector - } - if _, ok := d.GetOk("bi_connector_config"); ok { biConnector, err := expandBiConnectorConfig(d) if err != nil { @@ -655,12 +617,6 @@ func resourceMongoDBAtlasClusterRead(ctx context.Context, d *schema.ResourceData return diag.FromErr(fmt.Errorf(errorClusterSetting, "backup_enabled", clusterName, err)) } - if _, ok := d.GetOk("provider_backup_enabled"); ok { - if err := d.Set("provider_backup_enabled", cluster.ProviderBackupEnabled); err != nil { - return diag.FromErr(fmt.Errorf(errorClusterSetting, "provider_backup_enabled", clusterName, err)) - } - } - if _, ok := d.GetOk("cloud_backup"); ok { if err := d.Set("cloud_backup", cluster.ProviderBackupEnabled); err != nil { return diag.FromErr(fmt.Errorf(errorClusterSetting, "cloud_backup", clusterName, err)) @@ -730,12 +686,6 @@ func resourceMongoDBAtlasClusterRead(ctx context.Context, d *schema.ResourceData return diag.FromErr(fmt.Errorf(errorClusterSetting, "termination_protection_enabled", clusterName, err)) } - if _, ok := d.GetOk("bi_connector"); ok { - if err = d.Set("bi_connector", flattenBiConnector(cluster.BiConnector)); err != nil { - return diag.FromErr(fmt.Errorf(errorClusterSetting, "bi_connector", clusterName, err)) - } - } - if err := d.Set("bi_connector_config", flattenBiConnectorConfig(cluster.BiConnector)); err != nil { return diag.FromErr(fmt.Errorf(errorClusterSetting, "bi_connector_config", clusterName, err)) } @@ -812,10 +762,6 @@ func resourceMongoDBAtlasClusterUpdate(ctx context.Context, d *schema.ResourceDa clusterChangeDetect := new(matlas.Cluster) clusterChangeDetect.AutoScaling = &matlas.AutoScaling{Compute: &matlas.Compute{}} - if d.HasChange("bi_connector") { - cluster.BiConnector, _ = expandBiConnector(d) - } - if d.HasChange("name") { cluster.Name, _ = d.Get("name").(string) } @@ -884,11 +830,6 @@ func resourceMongoDBAtlasClusterUpdate(ctx context.Context, d *schema.ResourceDa cluster.DiskSizeGB = pointy.Float64(d.Get("disk_size_gb").(float64)) } - // Deprecated will remove later - if d.HasChange("provider_backup_enabled") { - cluster.ProviderBackupEnabled = pointy.Bool(d.Get("provider_backup_enabled").(bool)) - } - if d.HasChange("cloud_backup") { cluster.ProviderBackupEnabled = pointy.Bool(d.Get("cloud_backup").(bool)) } @@ -923,9 +864,6 @@ func resourceMongoDBAtlasClusterUpdate(ctx context.Context, d *schema.ResourceDa // when Provider instance type changes this argument must be passed explicitly in patch request if d.HasChange("provider_instance_size_name") { - if _, ok := d.GetOk("provider_backup_enabled"); ok { - cluster.ProviderBackupEnabled = pointy.Bool(d.Get("provider_backup_enabled").(bool)) - } if _, ok := d.GetOk("cloud_backup"); ok { cluster.ProviderBackupEnabled = pointy.Bool(d.Get("cloud_backup").(bool)) } @@ -1103,24 +1041,6 @@ func splitSClusterImportID(id string) (projectID, clusterName *string, err error return } -// Deprecated: will be deleted later -func expandBiConnector(d *schema.ResourceData) (*matlas.BiConnector, error) { - var biConnector matlas.BiConnector - - if v, ok := d.GetOk("bi_connector"); ok { - biConnMap := v.(map[string]interface{}) - - enabled := cast.ToBool(biConnMap["enabled"]) - - biConnector = matlas.BiConnector{ - Enabled: &enabled, - ReadPreference: cast.ToString(biConnMap["read_preference"]), - } - } - - return &biConnector, nil -} - func expandBiConnectorConfig(d *schema.ResourceData) (*matlas.BiConnector, error) { var biConnector matlas.BiConnector @@ -1141,21 +1061,6 @@ func expandBiConnectorConfig(d *schema.ResourceData) (*matlas.BiConnector, error return &biConnector, nil } -// Deprecated: will be deleted later -func flattenBiConnector(biConnector *matlas.BiConnector) map[string]interface{} { - biConnectorMap := make(map[string]interface{}) - - if biConnector.Enabled != nil { - biConnectorMap["enabled"] = strconv.FormatBool(*biConnector.Enabled) - } - - if biConnector.ReadPreference != "" { - biConnectorMap["read_preference"] = biConnector.ReadPreference - } - - return biConnectorMap -} - func flattenBiConnectorConfig(biConnector *matlas.BiConnector) []interface{} { return []interface{}{ map[string]interface{}{ @@ -1543,13 +1448,11 @@ func flattenConnectionStrings(connectionStrings *matlas.ConnectionStrings) []map connections := make([]map[string]interface{}, 0) connections = append(connections, map[string]interface{}{ - "standard": connectionStrings.Standard, - "standard_srv": connectionStrings.StandardSrv, - "aws_private_link": connectionStrings.AwsPrivateLink, - "aws_private_link_srv": connectionStrings.AwsPrivateLinkSrv, - "private": connectionStrings.Private, - "private_srv": connectionStrings.PrivateSrv, - "private_endpoint": flattenPrivateEndpoint(connectionStrings.PrivateEndpoint), + "standard": connectionStrings.Standard, + "standard_srv": connectionStrings.StandardSrv, + "private": connectionStrings.Private, + "private_srv": connectionStrings.PrivateSrv, + "private_endpoint": flattenPrivateEndpoint(connectionStrings.PrivateEndpoint), }) return connections @@ -1613,16 +1516,6 @@ func clusterConnectionStringsSchema() *schema.Schema { Type: schema.TypeString, Computed: true, }, - "aws_private_link": { - Type: schema.TypeMap, - Computed: true, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "connection_strings.private_endpoint[n].connection_string"), - }, - "aws_private_link_srv": { - Type: schema.TypeMap, - Computed: true, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "connection_strings.private_endpoint[n].srv_connection_string"), - }, "private": { Type: schema.TypeString, Computed: true, diff --git a/mongodbatlas/resource_mongodbatlas_cluster_test.go b/mongodbatlas/resource_mongodbatlas_cluster_test.go index e6d7f1f116..a1b1bd7b01 100644 --- a/mongodbatlas/resource_mongodbatlas_cluster_test.go +++ b/mongodbatlas/resource_mongodbatlas_cluster_test.go @@ -966,7 +966,7 @@ func TestAccClusterRSCluster_importBasic(t *testing.T) { ImportStateIdFunc: testAccCheckMongoDBAtlasClusterImportStateIDFunc(resourceName), ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"cloud_backup", "provider_backup_enabled", "retain_backups_enabled"}, + ImportStateVerifyIgnore: []string{"cloud_backup", "retain_backups_enabled"}, }, }, }) @@ -1229,7 +1229,7 @@ func TestAccClusterRSCluster_basicAWS_UnpauseToPaused(t *testing.T) { ImportStateIdFunc: testAccCheckMongoDBAtlasClusterImportStateIDFunc(resourceName), ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"cloud_backup", "provider_backup_enabled"}, + ImportStateVerifyIgnore: []string{"cloud_backup", "backup_enabled"}, }, }, }) @@ -1691,7 +1691,7 @@ func testAccMongoDBAtlasClusterConfigMultiRegion(orgID, projectName, name, backu name = %[3]q disk_size_gb = 100 num_shards = 1 - provider_backup_enabled = %[4]s + cloud_backup = %[4]s cluster_type = "REPLICASET" // Provider Settings "block" @@ -1719,8 +1719,7 @@ func testAccMongoDBAtlasClusterConfigGlobal(resourceName, orgID, projectName, na name = %[4]q disk_size_gb = 80 num_shards = 1 - backup_enabled = %[5]s - provider_backup_enabled = true + cloud_backup = %[5]s cluster_type = "GEOSHARDED" // Provider Settings "block" @@ -1875,8 +1874,8 @@ func testAccMongoDBAtlasClusterConfigWithPrivateEndpointLink(awsAccessKey, awsSe provider_name = "AWS" provider_region_name = "${upper(replace("%[5]s", "-", "_"))}" provider_instance_size_name = "M10" - provider_backup_enabled = true // enable cloud provider snapshots - depends_on = ["mongodbatlas_privatelink_endpoint_service.test"] + cloud_backup = true // enable cloud provider snapshots + depends_on = ["mongodbatlas_privatelink_endpoint_service.test"] } `, awsAccessKey, awsSecretKey, projectID, providerName, region, vpcID, subnetID, securityGroupID, clusterName) } @@ -2205,11 +2204,11 @@ func testAccMongoDBAtlasClusterConfigRegions( org_id = %[1]q } resource "mongodbatlas_cluster" "test" { - project_id = mongodbatlas_project.cluster_project.id - name = "%[3]s" - disk_size_gb = 400 + project_id = mongodbatlas_project.cluster_project.id + name = "%[3]s" + disk_size_gb = 400 num_shards = 3 - provider_backup_enabled = true + cloud_backup = true cluster_type = "GEOSHARDED" // Provider Settings "block" provider_name = "AWS" diff --git a/mongodbatlas/resource_mongodbatlas_global_cluster_config_test.go b/mongodbatlas/resource_mongodbatlas_global_cluster_config_test.go index 95fec2d0a5..135130eae2 100644 --- a/mongodbatlas/resource_mongodbatlas_global_cluster_config_test.go +++ b/mongodbatlas/resource_mongodbatlas_global_cluster_config_test.go @@ -289,7 +289,7 @@ func testAccMongoDBAtlasGlobalClusterConfig(projectID, name, backupEnabled, isCu name = "%s" disk_size_gb = 80 backup_enabled = "%s" - provider_backup_enabled = true + cloud_backup = true cluster_type = "GEOSHARDED" // Provider Settings "block" @@ -345,7 +345,7 @@ func testAccMongoDBAtlasGlobalClusterWithAWSClusterConfig(projectID, name, backu project_id = "%s" name = "%s" disk_size_gb = 80 - provider_backup_enabled = %s + cloud_backup = %s cluster_type = "GEOSHARDED" // Provider Settings "block" diff --git a/mongodbatlas/resource_mongodbatlas_ldap_configuration_test.go b/mongodbatlas/resource_mongodbatlas_ldap_configuration_test.go index 2078b9e3d0..7ea47576f9 100644 --- a/mongodbatlas/resource_mongodbatlas_ldap_configuration_test.go +++ b/mongodbatlas/resource_mongodbatlas_ldap_configuration_test.go @@ -224,7 +224,7 @@ func testAccMongoDBAtlasLDAPConfigurationWithVerifyConfig(projectName, orgID, cl provider_name = "AWS" provider_region_name = "US_EAST_2" provider_instance_size_name = "M10" - provider_backup_enabled = true //enable cloud provider snapshots + cloud_backup = true //enable cloud provider snapshots } resource "mongodbatlas_ldap_verify" "test" { diff --git a/mongodbatlas/resource_mongodbatlas_ldap_verify_test.go b/mongodbatlas/resource_mongodbatlas_ldap_verify_test.go index b9e67e2861..ab783b5326 100644 --- a/mongodbatlas/resource_mongodbatlas_ldap_verify_test.go +++ b/mongodbatlas/resource_mongodbatlas_ldap_verify_test.go @@ -202,7 +202,7 @@ func testAccMongoDBAtlasLDAPVerifyConfig(projectName, orgID, clusterName, hostna provider_name = "AWS" provider_region_name = "US_EAST_2" provider_instance_size_name = "M10" - provider_backup_enabled = true //enable cloud provider snapshots + cloud_backup = true //enable cloud provider snapshots } resource "mongodbatlas_ldap_verify" "test" { @@ -230,7 +230,7 @@ func testAccMongoDBAtlasLDAPVerifyWithConfigurationConfig(projectName, orgID, cl provider_name = "AWS" provider_region_name = "US_EAST_2" provider_instance_size_name = "M10" - provider_backup_enabled = true //enable cloud provider snapshots + backup_enabled = true //enable cloud provider snapshots } resource "mongodbatlas_ldap_verify" "test" { diff --git a/mongodbatlas/resource_mongodbatlas_project_api_key.go b/mongodbatlas/resource_mongodbatlas_project_api_key.go index 4f56b43bcc..77c2595026 100644 --- a/mongodbatlas/resource_mongodbatlas_project_api_key.go +++ b/mongodbatlas/resource_mongodbatlas_project_api_key.go @@ -49,15 +49,6 @@ func resourceMongoDBAtlasProjectAPIKey() *schema.Resource { Computed: true, Sensitive: true, }, - "role_names": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - ConflictsWith: []string{"project_assignment"}, - Deprecated: fmt.Sprintf(DeprecationMessageParameterToResource, "v1.12.0", "project_assignment"), - }, "project_assignment": { Type: schema.TypeSet, Optional: true, @@ -76,7 +67,6 @@ func resourceMongoDBAtlasProjectAPIKey() *schema.Resource { }, }, }, - ConflictsWith: []string{"role_names"}, }, }, } @@ -130,17 +120,6 @@ func resourceMongoDBAtlasProjectAPIKeyCreate(ctx context.Context, d *schema.Reso } } } - } else { - createRequest.Roles = expandStringList(d.Get("role_names").(*schema.Set).List()) - apiKey, resp, err = conn.ProjectAPIKeys.Create(ctx, projectID, createRequest) - if err != nil { - if resp != nil && resp.StatusCode == http.StatusNotFound { - d.SetId("") - return nil - } - - return diag.FromErr(fmt.Errorf("error create API key: %s", err)) - } } if err := d.Set("public_key", apiKey.PublicKey); err != nil { @@ -189,19 +168,9 @@ func resourceMongoDBAtlasProjectAPIKeyRead(ctx context.Context, d *schema.Resour return diag.FromErr(fmt.Errorf("error setting `public_key`: %s", err)) } - _, roleOk := d.GetOk("role_names") - if !roleOk { - if err := d.Set("role_names", nil); err != nil { - return diag.FromErr(fmt.Errorf("error setting `roles`: %s", err)) - } - if projectAssignments, err := newProjectAssignment(ctx, conn, projectID, apiKeyID); err == nil { - if err := d.Set("project_assignment", projectAssignments); err != nil { - return diag.Errorf(errorProjectSetting, `created`, projectID, err) - } - } - } else { - if err := d.Set("role_names", flattenProjectAPIKeyRoles(projectID, val.Roles)); err != nil { - return diag.FromErr(fmt.Errorf("error setting `roles`: %s", err)) + if projectAssignments, err := newProjectAssignment(ctx, conn, projectID, apiKeyID); err == nil { + if err := d.Set("project_assignment", projectAssignments); err != nil { + return diag.Errorf(errorProjectSetting, `created`, projectID, err) } } } diff --git a/mongodbatlas/resource_mongodbatlas_project_api_key_test.go b/mongodbatlas/resource_mongodbatlas_project_api_key_test.go index 39f55ccc34..d5b2903c72 100644 --- a/mongodbatlas/resource_mongodbatlas_project_api_key_test.go +++ b/mongodbatlas/resource_mongodbatlas_project_api_key_test.go @@ -272,7 +272,10 @@ func testAccMongoDBAtlasProjectAPIKeyConfigBasic(orgID, projectName, description resource "mongodbatlas_project_api_key" "test" { project_id = mongodbatlas_project.test.id description = %[3]q - role_names = [%[4]q] + project_assignment { + project_id = mongodbatlas_project.test.id + role_names = [%[4]q] + } } `, orgID, projectName, description, roleNames) } diff --git a/website/docs/d/advanced_cluster.html.markdown b/website/docs/d/advanced_cluster.html.markdown index 96c6fa8131..1f7edce2ca 100644 --- a/website/docs/d/advanced_cluster.html.markdown +++ b/website/docs/d/advanced_cluster.html.markdown @@ -169,8 +169,6 @@ In addition to all arguments above, the following attributes are exported: - `connection_strings.standard` - Public mongodb:// connection string for this cluster. - `connection_strings.standard_srv` - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t , use connectionStrings.standard. - - `connection_strings.aws_private_link` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. **DEPRECATED** Use `connection_strings.private_endpoint[n].connection_string` instead. - - `connection_strings.aws_private_link_srv` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. **DEPRECATED** Use `connection_strings.private_endpoint[n].srv_connection_string` instead. - `connection_strings.private` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_srv` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_endpoint` - Private endpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes. diff --git a/website/docs/d/advanced_clusters.html.markdown b/website/docs/d/advanced_clusters.html.markdown index 8644c932d6..5eb2fbb277 100644 --- a/website/docs/d/advanced_clusters.html.markdown +++ b/website/docs/d/advanced_clusters.html.markdown @@ -163,8 +163,6 @@ In addition to all arguments above, the following attributes are exported: - `connection_strings.standard` - Public mongodb:// connection string for this cluster. - `connection_strings.standard_srv` - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t , use connectionStrings.standard. - - `connection_strings.aws_private_link` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. **DEPRECATED** Use `connection_strings.private_endpoint[n].connection_string` instead. - - `connection_strings.aws_private_link_srv` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. **DEPRECATED** Use `connection_strings.private_endpoint[n].srv_connection_string` instead. - `connection_strings.private` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_srv` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_endpoint` - Private endpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes. diff --git a/website/docs/d/backup_compliance_policy.html.markdown b/website/docs/d/backup_compliance_policy.html.markdown index 1a6849c421..6b2244c9d7 100644 --- a/website/docs/d/backup_compliance_policy.html.markdown +++ b/website/docs/d/backup_compliance_policy.html.markdown @@ -25,7 +25,7 @@ resource "mongodbatlas_cluster" "my_cluster" { provider_name = "AWS" provider_region_name = "EU_CENTRAL_1" provider_instance_size_name = "M10" - provider_backup_enabled = true // enable cloud backup snapshots + cloud_backup = true // enable cloud backup snapshots } resource "mongodbatlas_cloud_backup_schedule" "test" { diff --git a/website/docs/d/cloud_provider_snapshot_backup_policy.html.markdown b/website/docs/d/cloud_provider_snapshot_backup_policy.html.markdown index 4c4e600cc8..0a1b97fcf8 100644 --- a/website/docs/d/cloud_provider_snapshot_backup_policy.html.markdown +++ b/website/docs/d/cloud_provider_snapshot_backup_policy.html.markdown @@ -27,7 +27,7 @@ resource "mongodbatlas_cluster" "my_cluster" { provider_name = "AWS" provider_region_name = "EU_CENTRAL_1" provider_instance_size_name = "M10" - provider_backup_enabled = true // enable cloud backup snapshots + cloud_backup = true // enable cloud backup snapshots } resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" { diff --git a/website/docs/d/cloud_provider_snapshot_restore_jobs.html.markdown b/website/docs/d/cloud_provider_snapshot_restore_jobs.html.markdown index e1f7ad54a6..5ea2e2e223 100644 --- a/website/docs/d/cloud_provider_snapshot_restore_jobs.html.markdown +++ b/website/docs/d/cloud_provider_snapshot_restore_jobs.html.markdown @@ -30,7 +30,7 @@ resource "mongodbatlas_cloud_provider_snapshot_restore_job" "test" { project_id = "5cf5a45a9ccf6400e60981b6" cluster_name = "MyCluster" snapshot_id = mongodbatlas_cloud_provider_snapshot.test.id - delivery_type { + delivery_type_config { automated = true target_cluster_name = "MyCluster" target_project_id = "5cf5a45a9ccf6400e60981b6" diff --git a/website/docs/d/cluster.html.markdown b/website/docs/d/cluster.html.markdown index fea47457dc..602b29c716 100644 --- a/website/docs/d/cluster.html.markdown +++ b/website/docs/d/cluster.html.markdown @@ -79,7 +79,6 @@ In addition to all arguments above, the following attributes are exported: * `auto_scaling_compute_scale_down_enabled` - Specifies whether cluster tier auto-down-scaling is enabled. * `backup_enabled` - Legacy Option, Indicates whether Atlas continuous backups are enabled for the cluster. -* `bi_connector` - Indicates BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details. **DEPRECATED** Use `bi_connector_config` instead. * `bi_connector_config` - Indicates BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details. * `cluster_type` - Indicates the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment. * `connection_strings` - Set of connection strings that your applications use to connect to this cluster. More info in [Connection-strings](https://docs.mongodb.com/manual/reference/connection-string/). Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see [Connection String Options](https://docs.atlas.mongodb.com/reference/faq/connection-changes/). @@ -96,8 +95,6 @@ In addition to all arguments above, the following attributes are exported: ``` - `connection_strings.standard` - Public mongodb:// connection string for this cluster. - `connection_strings.standard_srv` - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.standard. - - `connection_strings.aws_private_link` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. **DEPRECATED** Use `connection_strings.private_endpoint[n].connection_string` instead. - - `connection_strings.aws_private_link_srv` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. **DEPRECATED** Use `connection_strings.private_endpoint[n].srv_connection_string` instead. - `connection_strings.private` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_srv` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_endpoint.#.connection_string` - Private-endpoint-aware `mongodb://`connection string for this private endpoint. @@ -113,7 +110,6 @@ In addition to all arguments above, the following attributes are exported: * `name` - Name of the cluster as it appears in Atlas. * `mongo_db_major_version` - Indicates the version of the cluster to deploy. * `num_shards` - Indicates whether the cluster is a replica set or a sharded cluster. -* `provider_backup_enabled` - **(DEPRECATED)** Flag indicating if the cluster uses Cloud Backup Snapshots for backups. * `cloud_backup` - Flag indicating if the cluster uses Cloud Backup Snapshots for backups. * `termination_protection_enabled` - Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster. * `provider_instance_size_name` - Atlas provides different instance sizes, each with a default storage capacity and RAM size. diff --git a/website/docs/d/clusters.html.markdown b/website/docs/d/clusters.html.markdown index 2ef0d355ac..11bd711d06 100644 --- a/website/docs/d/clusters.html.markdown +++ b/website/docs/d/clusters.html.markdown @@ -81,14 +81,11 @@ In addition to all arguments above, the following attributes are exported: * `auto_scaling_compute_enabled` - Specifies whether cluster tier auto-scaling is enabled. The default is false. * `auto_scaling_compute_scale_down_enabled` - * `auto_scaling_compute_scale_down_enabled` - Specifies whether cluster tier auto-down-scaling is enabled. * `backup_enabled` - Legacy Option, Indicates whether Atlas continuous backups are enabled for the cluster. -* `bi_connector` - Indicates BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details. **DEPRECATED** Use `bi_connector_config` instead. * `bi_connector_config` - Indicates BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details. * `cluster_type` - Indicates the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment. * `connection_strings` - Set of connection strings that your applications use to connect to this cluster. More info in [Connection-strings](https://docs.mongodb.com/manual/reference/connection-string/). Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see [Connection String Options](https://docs.atlas.mongodb.com/reference/faq/connection-changes/). NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster. - `connection_strings.standard` - Public mongodb:// connection string for this cluster. - `connection_strings.standard_srv` - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.standard. - - `connection_strings.aws_private_link` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. **DEPRECATED** Use `connection_strings.private_endpoint[n].connection_string` instead. - - `connection_strings.aws_private_link_srv` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. **DEPRECATED** `connection_strings.private_endpoint[n].srv_connection_string` instead. - `connection_strings.private` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_srv` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_endpoint.#.connection_string` - Private-endpoint-aware `mongodb://`connection string for this private endpoint. diff --git a/website/docs/d/project_api_key.html.markdown b/website/docs/d/project_api_key.html.markdown index 3e031e9e55..6f35ea5b85 100644 --- a/website/docs/d/project_api_key.html.markdown +++ b/website/docs/d/project_api_key.html.markdown @@ -43,7 +43,7 @@ In addition to all arguments above, the following attributes are exported: * `description` - Description of this Project API key. * `public_key` - Public key for this Organization API key. * `private_key` - Private key for this Organization API key. -* `role_names` - Name of the role. This resource returns all the roles the user has in Atlas. The [MongoDB Documentation](https://www.mongodb.com/docs/atlas/reference/user-roles/#project-roles) describes the valid roles that can be assigned. **DEPRECATED** Use `project_assignment` instead. + ### project_assignment List of Project roles that the Programmatic API key needs to have. diff --git a/website/docs/d/project_api_keys.html.markdown b/website/docs/d/project_api_keys.html.markdown index b29de9ee84..1257e3b458 100644 --- a/website/docs/d/project_api_keys.html.markdown +++ b/website/docs/d/project_api_keys.html.markdown @@ -21,7 +21,6 @@ resource "mongodbatlas_project_api_key" "test" { description = "Description of the API key" project_id = "32b6e34b3d91647abb20e7b8" role_names = ["GROUP_READ_ONLY"] - } } data "mongodbatlas_project_api_keys" "test" { @@ -45,7 +44,6 @@ data "mongodbatlas_project_api_keys" "test" { * `project_id` - Unique identifier for the project whose API keys you want to retrieve. Use the /groups endpoint to retrieve all projects to which the authenticated user has access. * `api_key_id` - Unique identifier for the API key you want to update. Use the /orgs/{ORG-ID}/apiKeys endpoint to retrieve all API keys to which the authenticated user has access for the specified organization. * `description` - Description of this Project API key. -* `role_names` - Name of the role. This resource returns all the roles the user has in Atlas. The [MongoDB Documentation](https://www.mongodb.com/docs/atlas/reference/user-roles/#project-roles) describes the valid roles that can be assigned. **DEPRECATED** Use `project_assignment` instead. ### project_assignment List of Project roles that the Programmatic API key needs to have. diff --git a/website/docs/r/advanced_cluster.html.markdown b/website/docs/r/advanced_cluster.html.markdown index 6241c17804..d862b524a8 100644 --- a/website/docs/r/advanced_cluster.html.markdown +++ b/website/docs/r/advanced_cluster.html.markdown @@ -625,8 +625,6 @@ In addition to all arguments above, the following attributes are exported: - `connection_strings.standard` - Public mongodb:// connection string for this cluster. - `connection_strings.standard_srv` - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t , use connectionStrings.standard. - - `connection_strings.aws_private_link` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. **DEPRECATED** Use `connection_strings.private_endpoint[n].connection_string` instead. - - `connection_strings.aws_private_link_srv` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. **DEPRECATED** Use `connection_strings.private_endpoint[n].srv_connection_string` instead. - `connection_strings.private` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_srv` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_endpoint` - Private endpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes. diff --git a/website/docs/r/cloud_backup_snapshot.html.markdown b/website/docs/r/cloud_backup_snapshot.html.markdown index 35d7d7712d..17fa3fe7e8 100644 --- a/website/docs/r/cloud_backup_snapshot.html.markdown +++ b/website/docs/r/cloud_backup_snapshot.html.markdown @@ -42,7 +42,7 @@ On-demand snapshots happen immediately, unlike scheduled snapshots which occur a project_id = mongodbatlas_cloud_backup_snapshot.test.project_id cluster_name = mongodbatlas_cloud_backup_snapshot.test.cluster_name snapshot_id = mongodbatlas_cloud_backup_snapshot.test.snapshot_id - delivery_type { + delivery_type_config { download = true } } diff --git a/website/docs/r/cloud_provider_access.markdown b/website/docs/r/cloud_provider_access.markdown index 76295d248f..0983ea0fa1 100644 --- a/website/docs/r/cloud_provider_access.markdown +++ b/website/docs/r/cloud_provider_access.markdown @@ -100,8 +100,8 @@ resource "mongodbatlas_cloud_provider_access_authorization" "auth_role" { project_id = mongodbatlas_cloud_provider_access_setup.setup_only.project_id role_id = mongodbatlas_cloud_provider_access_setup.setup_only.role_id - aws { - iam_assumed_role_arn = "arn:aws:iam::772401394250:role/test-user-role" + aws_config { + atlas_aws_account_arn = "arn:aws:iam::772401394250:role/test-user-role" } } diff --git a/website/docs/r/cloud_provider_snapshot.html.markdown b/website/docs/r/cloud_provider_snapshot.html.markdown index 1332dd8d7b..adecd6d2ac 100644 --- a/website/docs/r/cloud_provider_snapshot.html.markdown +++ b/website/docs/r/cloud_provider_snapshot.html.markdown @@ -42,7 +42,7 @@ On-demand snapshots happen immediately, unlike scheduled snapshots which occur a project_id = mongodbatlas_cloud_provider_snapshot.test.project_id cluster_name = mongodbatlas_cloud_provider_snapshot.test.cluster_name snapshot_id = mongodbatlas_cloud_provider_snapshot.test.snapshot_id - delivery_type { + delivery_type_config { download = true } } diff --git a/website/docs/r/cloud_provider_snapshot_backup_policy.html.markdown b/website/docs/r/cloud_provider_snapshot_backup_policy.html.markdown index 46180268b0..70c6e07cd1 100644 --- a/website/docs/r/cloud_provider_snapshot_backup_policy.html.markdown +++ b/website/docs/r/cloud_provider_snapshot_backup_policy.html.markdown @@ -29,7 +29,7 @@ resource "mongodbatlas_cluster" "my_cluster" { provider_name = "AWS" provider_region_name = "EU_CENTRAL_1" provider_instance_size_name = "M10" - provider_backup_enabled = true // must be enabled in order to use cloud_provider_snapshot_backup_policy resource + cloud_backup = true // must be enabled in order to use cloud_provider_snapshot_backup_policy resource } resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" { @@ -80,7 +80,7 @@ resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" { } ``` -~> **IMPORTANT:** `policies.#.policy_item.#.id` is obtained when the cluster is created. The example here shows the default order of the default policy when Cloud Backup is enabled (provider_backup_enabled is set to true). The default policy is viewable in the Terraform State file. +~> **IMPORTANT:** `policies.#.policy_item.#.id` is obtained when the cluster is created. The example here shows the default order of the default policy when Cloud Backup is enabled (`cloud_backup` is set to true). The default policy is viewable in the Terraform State file. ## Example Usage - Create a Cluster and Modify 3 Default Policies and Remove 1 Default Policy Simultaneously @@ -93,7 +93,7 @@ resource "mongodbatlas_cluster" "my_cluster" { provider_name = "AWS" provider_region_name = "EU_CENTRAL_1" provider_instance_size_name = "M10" - provider_backup_enabled = true // must be enabled in order to use cloud_provider_snapshot_backup_policy resource + cloud_backup = true // must be enabled in order to use cloud_provider_snapshot_backup_policy resource } resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" { @@ -159,7 +159,7 @@ resource "mongodbatlas_cluster" "my_cluster" { provider_name = "AWS" provider_region_name = "EU_CENTRAL_1" provider_instance_size_name = "M10" - provider_backup_enabled = true // must be enabled in order to use cloud_provider_snapshot_backup_policy resource + cloud_backup = true // must be enabled in order to use cloud_provider_snapshot_backup_policy resource } resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" { @@ -225,11 +225,11 @@ resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "test" { ### Policies * `policies` - (Required) Contains a document for each backup policy item in the desired updated backup policy. -* `policies.#.id` - (Required) Unique identifier of the backup policy that you want to update. policies.#.id is a value obtained via the mongodbatlas_cluster resource. provider_backup_enabled of the mongodbatlas_cluster resource must be set to true. See the example above for how to refer to the mongodbatlas_cluster resource for policies.#.id +* `policies.#.id` - (Required) Unique identifier of the backup policy that you want to update. policies.#.id is a value obtained via the mongodbatlas_cluster resource. `cloud_backup` of the mongodbatlas_cluster resource must be set to true. See the example above for how to refer to the mongodbatlas_cluster resource for policies.#.id #### Policy Item * `policies.#.policy_item` - (Required) Array of backup policy items. -* `policies.#.policy_item.#.id` - (Required) Unique identifier of the backup policy item. `policies.#.policy_item.#.id` is a value obtained via the mongodbatlas_cluster resource. provider_backup_enabled of the mongodbatlas_cluster resource must be set to true. See the example above for how to refer to the mongodbatlas_cluster resource for policies.#.policy_item.#.id +* `policies.#.policy_item.#.id` - (Required) Unique identifier of the backup policy item. `policies.#.policy_item.#.id` is a value obtained via the mongodbatlas_cluster resource. `cloud_backup` of the mongodbatlas_cluster resource must be set to true. See the example above for how to refer to the mongodbatlas_cluster resource for policies.#.policy_item.#.id * `policies.#.policy_item.#.frequency_interval` - (Required) Desired frequency of the new backup policy item specified by frequencyType. * `policies.#.policy_item.#.frequency_type` - (Required) Frequency associated with the backup policy item. One of the following values: hourly, daily, weekly or monthly. * `policies.#.policy_item.#.retention_unit` - (Required) Scope of the backup policy item: days, weeks, or months. diff --git a/website/docs/r/cloud_provider_snapshot_restore_job.html.markdown b/website/docs/r/cloud_provider_snapshot_restore_job.html.markdown index d06504a4ea..218dae9e61 100644 --- a/website/docs/r/cloud_provider_snapshot_restore_job.html.markdown +++ b/website/docs/r/cloud_provider_snapshot_restore_job.html.markdown @@ -94,7 +94,6 @@ description: |- * `project_id` - (Required) The unique identifier of the project for the Atlas cluster whose snapshot you want to restore. * `cluster_name` - (Required) The name of the Atlas cluster whose snapshot you want to restore. * `snapshot_id` - (Required) Unique identifier of the snapshot to restore. -* `delivery_type` - (Required) Type of restore job to create. Possible values are: **download** or **automated**, only one must be set it in ``true``. ### Download Atlas provides a URL to download a .tar.gz of the snapshot with snapshotId. diff --git a/website/docs/r/cluster.html.markdown b/website/docs/r/cluster.html.markdown index f7056c3c9d..a20a6f35d4 100644 --- a/website/docs/r/cluster.html.markdown +++ b/website/docs/r/cluster.html.markdown @@ -325,7 +325,6 @@ But in order to explicitly change `provider_instance_size_name` comment the `lif * The default value is false. M10 and above only. * `retain_backups_enabled` - (Optional) Set to true to retain backup snapshots for the deleted cluster. M10 and above only. -* `bi_connector` - (Optional) Specifies BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details. **DEPRECATED** Use `bi_connector_config` instead. * `bi_connector_config` - (Optional) Specifies BI Connector for Atlas configuration on this cluster. BI Connector for Atlas is only available for M10+ clusters. See [BI Connector](#bi-connector) below for more details. * `cluster_type` - (Required) Specifies the type of the cluster that you want to modify. You cannot convert a sharded cluster deployment to a replica set deployment. @@ -346,7 +345,6 @@ But in order to explicitly change `provider_instance_size_name` comment the `lif * `mongo_db_major_version` - (Optional) Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters: `4.2`, `4.4`, `5.0`, or `6.0`. If omitted, Atlas deploys a cluster that runs MongoDB 5.0. If `provider_instance_size_name`: `M0`, `M2` or `M5`, Atlas deploys MongoDB 5.0. Atlas always deploys the cluster with the latest stable release of the specified version. See [Release Notes](https://www.mongodb.com/docs/upcoming/release-notes/) for latest Current Stable Release. * `num_shards` - (Optional) Selects whether the cluster is a replica set or a sharded cluster. If you use the replicationSpecs parameter, you must set num_shards. * `pit_enabled` - (Optional) - Flag that indicates if the cluster uses Continuous Cloud Backup. If set to true, cloud_backup must also be set to true. -* `provider_backup_enabled` - (Optional) Flag indicating if the cluster uses Cloud Backup for backups. **Deprecated** use `cloud_backup` instead. * `cloud_backup` - (Optional) Flag indicating if the cluster uses Cloud Backup for backups. If true, the cluster uses Cloud Backup for backups. If cloud_backup and backup_enabled are false, the cluster does not use Atlas backups. @@ -536,8 +534,6 @@ In addition to all arguments above, the following attributes are exported: - `connection_strings.standard` - Public mongodb:// connection string for this cluster. - `connection_strings.standard_srv` - Public mongodb+srv:// connection string for this cluster. The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn’t , use connectionStrings.standard. - - `connection_strings.aws_private_link` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. **DEPRECATED** Use `connection_strings.private_endpoint[n].connection_string` instead. - - `connection_strings.aws_private_link_srv` - [Private-endpoint-aware](https://docs.atlas.mongodb.com/security-private-endpoint/#private-endpoint-connection-strings) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a AWS PrivateLink connection to this cluster. Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink. **DEPRECATED** Use `connection_strings.private_endpoint[n].srv_connection_string` instead. - `connection_strings.private` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_srv` - [Network-peering-endpoint-aware](https://docs.atlas.mongodb.com/security-vpc-peering/#vpc-peering) mongodb+srv://connection strings for each interface VPC endpoint you configured to connect to this cluster. Returned only if you created a network peering connection to this cluster. - `connection_strings.private_endpoint` - Private endpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster's nodes. @@ -563,7 +559,7 @@ In addition to all arguments above, the following attributes are exported: **WARNING:** This property is deprecated, use `mongodbatlas_cloud_backup_schedule` resource instead. -Cloud Backup Policy will be added if provider_backup_enabled or cloud_backup is enabled because MongoDB Atlas automatically creates a default policy, if not, returned values will be empty. +Cloud Backup Policy will be added if `cloud_backup` is enabled because MongoDB Atlas automatically creates a default policy, if not, returned values will be empty. * `snapshot_backup_policy` - current snapshot schedule and retention settings for the cluster. diff --git a/website/docs/r/project_api_key.html.markdown b/website/docs/r/project_api_key.html.markdown index bf21d3a3c9..d4ffe3f7b7 100644 --- a/website/docs/r/project_api_key.html.markdown +++ b/website/docs/r/project_api_key.html.markdown @@ -76,7 +76,6 @@ resource "mongodbatlas_project_api_key" "api_1" { * `project_id` -Unique 24-hexadecimal digit string that identifies your project. * `description` - Description of this Project API key. -* `role_names` - List of Project roles that the Programmatic API key needs to have. Ensure you provide: at least one role and ensure all roles are valid for the Project. You must specify an array even if you are only associating a single role with the Programmatic API key. The [MongoDB Documentation](https://www.mongodb.com/docs/atlas/reference/user-roles/#project-roles) describes the valid roles that can be assigned. **DEPRECATED** Use `project_assignment` instead. ~> **NOTE:** Project created by API Keys must belong to an existing organization.