diff --git a/azurerm/internal/services/domainservices/active_directory_domain_service_data_source.go b/azurerm/internal/services/domainservices/active_directory_domain_service_data_source.go index 6eff7e2dc0a3..b7e977f27287 100644 --- a/azurerm/internal/services/domainservices/active_directory_domain_service_data_source.go +++ b/azurerm/internal/services/domainservices/active_directory_domain_service_data_source.go @@ -86,55 +86,6 @@ func dataSourceActiveDirectoryDomainService() *pluginsdk.Resource { }, }, - "resource_forest": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "resource_forest": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "trust": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Resource{ - Schema: map[string]*pluginsdk.Schema{ - "name": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "remote_dns_ips": { - Type: pluginsdk.TypeList, - Computed: true, - Elem: &pluginsdk.Schema{ - Type: pluginsdk.TypeString, - }, - }, - - "direction": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "password": { - Type: pluginsdk.TypeString, - Computed: true, - }, - - "trusted_domain_fqdn": { - Type: pluginsdk.TypeString, - Computed: true, - }, - }, - }, - }, - }, - }, - }, - "secure_ldap": { Type: pluginsdk.TypeList, Computed: true, @@ -316,10 +267,6 @@ func dataSourceActiveDirectoryDomainServiceRead(d *pluginsdk.ResourceData, meta return fmt.Errorf("setting `notifications`: %+v", err) } - if err := d.Set("resource_forest", flattenDomainServiceResourceForest(props.ResourceForestSettings)); err != nil { - return fmt.Errorf("setting `resource_forest`: %+v", err) - } - if err := d.Set("secure_ldap", flattenDomainServiceLdaps(d, props.LdapsSettings, true)); err != nil { return fmt.Errorf("setting `secure_ldap`: %+v", err) } diff --git a/azurerm/internal/services/domainservices/active_directory_domain_service_resource.go b/azurerm/internal/services/domainservices/active_directory_domain_service_resource.go index 6874b14f7ffa..7420adc457d6 100644 --- a/azurerm/internal/services/domainservices/active_directory_domain_service_resource.go +++ b/azurerm/internal/services/domainservices/active_directory_domain_service_resource.go @@ -739,62 +739,6 @@ func flattenDomainServiceReplicaSets(input *[]aad.ReplicaSet) (ret []interface{} return } -func flattenDomainServiceResourceForest(input *aad.ResourceForestSettings) []interface{} { - if input == nil { - return make([]interface{}, 0) - } - - forestTrust := make([]map[string]interface{}, 0) - if input.Settings != nil { - for _, rf := range *input.Settings { - ft := map[string]interface{}{ - "name": "", - "remote_dns_ips": make([]string, 0), - "direction": "", - "password": "", - "trusted_domain_fqdn": "", - } - - if rf.FriendlyName != nil { - ft["name"] = *rf.FriendlyName - } - if rf.RemoteDNSIps != nil { - remoteDnsIps := make([]string, 0) - r := strings.Split(*rf.RemoteDNSIps, ",") - for _, i := range r { - remoteDnsIps = append(remoteDnsIps, strings.TrimSpace(i)) - } - ft["remote_dns_ips"] = remoteDnsIps - } - if rf.TrustDirection != nil { - ft["direction"] = *rf.TrustDirection - } - if rf.TrustPassword != nil { - ft["password"] = *rf.TrustPassword - } - if rf.TrustedDomainFqdn != nil { - ft["trusted_domain_fqdn"] = *rf.TrustedDomainFqdn - } - - forestTrust = append(forestTrust, ft) - } - } - - result := map[string]interface{}{ - "resource_forest": "", - "trust": forestTrust, - } - if input.ResourceForest != nil { - result["resource_forest"] = *input.ResourceForest - } - - if result["resource_forest"].(string) == "" && len(result["forest_trust"].([]map[string]interface{})) == 0 { - return make([]interface{}, 0) - } - - return []interface{}{result} -} - func flattenDomainServiceSecurity(input *aad.DomainSecuritySettings) []interface{} { if input == nil { return make([]interface{}, 0) diff --git a/azurerm/internal/services/domainservices/active_directory_domain_service_test.go b/azurerm/internal/services/domainservices/active_directory_domain_service_test.go index 15a5e6584ed2..747546c35b6a 100644 --- a/azurerm/internal/services/domainservices/active_directory_domain_service_test.go +++ b/azurerm/internal/services/domainservices/active_directory_domain_service_test.go @@ -116,7 +116,6 @@ func TestAccActiveDirectoryDomainService_updateWithDatasource(t *testing.T) { check.That(dataSourceData.ResourceName).Key("replica_sets.1.location").Exists(), check.That(dataSourceData.ResourceName).Key("replica_sets.1.service_status").Exists(), check.That(dataSourceData.ResourceName).Key("replica_sets.1.subnet_id").Exists(), - check.That(dataSourceData.ResourceName).Key("resource_forest.#").HasValue("0"), check.That(dataSourceData.ResourceName).Key("secure_ldap.#").HasValue("1"), check.That(dataSourceData.ResourceName).Key("secure_ldap.#").HasValue("1"), check.That(dataSourceData.ResourceName).Key("secure_ldap.0.certificate_expiry").Exists(), diff --git a/website/docs/d/active_directory_domain_service.html.markdown b/website/docs/d/active_directory_domain_service.html.markdown index ca884ac10565..c1478619605b 100644 --- a/website/docs/d/active_directory_domain_service.html.markdown +++ b/website/docs/d/active_directory_domain_service.html.markdown @@ -47,8 +47,6 @@ data "azurerm_active_directory_domain_service" "example" { * `additional_replica_sets` - Zero or more `replica_set` block as defined below. -* `resource_forest` - A `resource_forest` block as defined below. - * `security` - A `security` block as defined below. * `sku` - The SKU of the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`. @@ -95,28 +93,6 @@ A `replica_set` block exports the following: --- -A `resource_forest` block exports the following: - -* `resource_forest` - Resource forest - -* `forest_trust` - One or more `forest_trust` blocks as defined below. - ---- - -A `forest_trust` block exports the following: - -* `name` - A display name to identity the forest trust. - -* `remote_dns_ips` - A list of DNS server IP addresses for the trusted forest root domain. - -* `trust_direction` - The direction of trust. - -* `trust_password` - The password for authenticating the forest trust. - -* `trusted_domain_fqdn` - The fully-qualified DNS name for the trusted forest. - ---- - A `security` block exports the following: * `ntlm_v1_enabled` - Whether legacy NTLM v1 support is enabled.