Skip to content

Commit 2f43c21

Browse files
committed
Revert "Bug Fix - Fixed network-source/Domains/Polices resource discovery issue."
This reverts commit 8b62148.
1 parent 99c3933 commit 2f43c21

File tree

45 files changed

+169
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+169
-238
lines changed

internal/integrationtest/identity_domain_test.go

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,12 @@ var (
6565
"state": acctest.Representation{RepType: acctest.Optional, Update: `INACTIVE`},
6666
}
6767

68-
IdentityDomainReplicationToRegionRepresentation1 = map[string]interface{}{
69-
"domain_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_identity_domain.test_domain.id}`},
70-
"replica_region": acctest.Representation{RepType: acctest.Required, Create: `us-sanjose-1`},
71-
}
72-
7368
IdentityDomainResourceDependencies = DefinedTagsDependencies
7469
)
7570

7671
// issue-routing-tag: identity/default
7772
func TestIdentityDomainResource_basic(t *testing.T) {
73+
t.Skip("Skip this test because henosis tenancy is needed")
7874
httpreplay.SetScenario("TestIdentityDomainResource_basic")
7975
defer httpreplay.SaveScenario()
8076

@@ -125,8 +121,7 @@ func TestIdentityDomainResource_basic(t *testing.T) {
125121
// verify Create with optionals
126122
{
127123
Config: config + compartmentIdVariableStr + IdentityDomainResourceDependencies +
128-
acctest.GenerateResourceFromRepresentationMap("oci_identity_domain", "test_domain", acctest.Optional, acctest.Create, IdentityDomainRepresentation) +
129-
acctest.GenerateResourceFromRepresentationMap("oci_identity_domain_replication_to_region", "test_domain_replication_to_region", acctest.Optional, acctest.Create, IdentityDomainReplicationToRegionRepresentation1),
124+
acctest.GenerateResourceFromRepresentationMap("oci_identity_domain", "test_domain", acctest.Optional, acctest.Create, IdentityDomainRepresentation),
130125
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
131126
resource.TestCheckResourceAttr(resourceName, "admin_email", "adminEmail@test.com"),
132127
resource.TestCheckResourceAttr(resourceName, "admin_first_name", "adminFirstName"),
@@ -185,10 +180,6 @@ func TestIdentityDomainResource_basic(t *testing.T) {
185180
resource.TestCheckResourceAttrSet(resourceName, "time_created"),
186181
resource.TestCheckResourceAttrSet(resourceName, "type"),
187182
resource.TestCheckResourceAttrSet(resourceName, "url"),
188-
resource.TestCheckResourceAttrSet(resourceName, "replica_regions.0.regional_url"),
189-
resource.TestCheckResourceAttrSet(resourceName, "replica_regions.0.url"),
190-
resource.TestCheckResourceAttr(resourceName, "replica_regions.0.state", "REPLICATION_ENABLED"),
191-
resource.TestCheckResourceAttr(resourceName, "replica_regions.0.region", "us-sanjose-1"),
192183

193184
func(s *terraform.State) (err error) {
194185
resId2, err = acctest.FromInstanceState(s, resourceName, "id")
@@ -223,10 +214,6 @@ func TestIdentityDomainResource_basic(t *testing.T) {
223214
resource.TestCheckResourceAttrSet(resourceName, "time_created"),
224215
resource.TestCheckResourceAttrSet(resourceName, "type"),
225216
resource.TestCheckResourceAttrSet(resourceName, "url"),
226-
resource.TestCheckResourceAttrSet(resourceName, "replica_regions.0.regional_url"),
227-
resource.TestCheckResourceAttrSet(resourceName, "replica_regions.0.url"),
228-
resource.TestCheckResourceAttr(resourceName, "replica_regions.0.state", "REPLICATION_ENABLED"),
229-
resource.TestCheckResourceAttr(resourceName, "replica_regions.0.region", "us-sanjose-1"),
230217

231218
func(s *terraform.State) (err error) {
232219
resId2, err = acctest.FromInstanceState(s, resourceName, "id")
@@ -267,10 +254,6 @@ func TestIdentityDomainResource_basic(t *testing.T) {
267254
resource.TestCheckResourceAttrSet(datasourceName, "domains.0.time_created"),
268255
resource.TestCheckResourceAttrSet(datasourceName, "domains.0.type"),
269256
resource.TestCheckResourceAttrSet(datasourceName, "domains.0.url"),
270-
resource.TestCheckResourceAttrSet(datasourceName, "domains.0.replica_regions.0.regional_url"),
271-
resource.TestCheckResourceAttrSet(datasourceName, "domains.0.replica_regions.0.url"),
272-
resource.TestCheckResourceAttr(datasourceName, "domains.0.replica_regions.0.state", "REPLICATION_ENABLED"),
273-
resource.TestCheckResourceAttr(datasourceName, "domains.0.replica_regions.0.region", "us-sanjose-1"),
274257
),
275258
},
276259
// verify singular datasource
@@ -293,10 +276,6 @@ func TestIdentityDomainResource_basic(t *testing.T) {
293276
resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"),
294277
resource.TestCheckResourceAttrSet(singularDatasourceName, "type"),
295278
resource.TestCheckResourceAttrSet(singularDatasourceName, "url"),
296-
resource.TestCheckResourceAttrSet(singularDatasourceName, "replica_regions.0.regional_url"),
297-
resource.TestCheckResourceAttrSet(singularDatasourceName, "replica_regions.0.url"),
298-
resource.TestCheckResourceAttr(singularDatasourceName, "replica_regions.0.state", "REPLICATION_ENABLED"),
299-
resource.TestCheckResourceAttr(singularDatasourceName, "replica_regions.0.region", "us-sanjose-1"),
300279
),
301280
},
302281
// verify resource import

internal/integrationtest/identity_network_source_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,14 @@ var (
5555
"public_source_list": acctest.Representation{RepType: acctest.Optional, Create: []string{`128.2.13.5`}, Update: []string{`128.2.13.5`, `128.2.13.6`}},
5656
"services": acctest.Representation{RepType: acctest.Optional, Create: []string{`none`}, Update: []string{`all`}},
5757
"virtual_source_list": acctest.RepresentationGroup{RepType: acctest.Optional, Group: IdentityNetworkVirtualSourceListRepresentation},
58-
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: IdentityNetworkSourceIgnoreChangesRepresentation},
5958
}
6059

6160
IdentityNetworkVirtualSourceListRepresentation = map[string]interface{}{
6261
"vcn_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_vcn.test_vcn.id}`},
6362
"ip_ranges": acctest.Representation{RepType: acctest.Required, Create: []string{`10.0.0.0/16`}},
6463
}
6564

66-
IdentityNetworkSourceIgnoreChangesRepresentation = map[string]interface{}{ // This may vary depending on the tenancy settings
67-
"ignore_changes": acctest.Representation{RepType: acctest.Required, Create: []string{`defined_tags`, `freeform_tags`}},
68-
}
69-
70-
IdentityNetworkSourceResourceDependencies = DefinedTagsDependencies + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation)
65+
IdentityNetworkSourceResourceDependencies = DefinedTagsDependencies // + VcnRequiredOnlyResource
7166
)
7267

7368
// issue-routing-tag: identity/default
@@ -130,7 +125,7 @@ func TestIdentityNetworkSourceResource_basic(t *testing.T) {
130125
func(s *terraform.State) (err error) {
131126
resId, err = acctest.FromInstanceState(s, resourceName, "id")
132127
if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment {
133-
if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &tenancyId, resourceName); errExport != nil {
128+
if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil {
134129
return errExport
135130
}
136131
}
@@ -183,7 +178,6 @@ func TestIdentityNetworkSourceResource_basic(t *testing.T) {
183178
resource.TestCheckResourceAttr(datasourceName, "network_sources.0.name", "corpnet"),
184179
resource.TestCheckResourceAttr(datasourceName, "network_sources.0.public_source_list.#", "2"),
185180
resource.TestCheckResourceAttr(datasourceName, "network_sources.0.services.#", "1"),
186-
resource.TestCheckResourceAttrSet(datasourceName, "network_sources.0.state"),
187181
resource.TestCheckResourceAttrSet(datasourceName, "network_sources.0.time_created"),
188182
resource.TestCheckResourceAttr(datasourceName, "network_sources.0.virtual_source_list.#", "1"),
189183
),

internal/resourcediscovery/export_compartment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,7 @@ func TestUnitGetDiscoverResourceWithGraphSteps(t *testing.T) {
27062706
ctx.Services = []string{"identity"}
27072707
result, err := getDiscoverResourceWithGraphSteps(ctx)
27082708
assert.NoError(t, err)
2709-
assert.Equal(t, 1, len(result))
2709+
assert.Equal(t, 0, len(result))
27102710
})
27112711

27122712
// With targetResource

internal/service/identity/identity_domain_resource.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ func IdentityDomainResource() *schema.Resource {
132132
Type: schema.TypeString,
133133
Computed: true,
134134
},
135-
"regional_url": {
136-
Type: schema.TypeString,
137-
Computed: true,
138-
},
139135
"state": {
140136
Type: schema.TypeString,
141137
Computed: true,
@@ -678,10 +674,6 @@ func ReplicatedRegionDetailsToMap(obj oci_identity.ReplicatedRegionDetails) map[
678674
result["region"] = string(*obj.Region)
679675
}
680676

681-
if obj.RegionalUrl != nil {
682-
result["regional_url"] = string(*obj.RegionalUrl)
683-
}
684-
685677
result["state"] = string(obj.State)
686678

687679
if obj.Url != nil {

internal/service/identity/identity_export.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func init() {
2929
exportIdentityTagHints.ProcessDiscoveredResourcesFn = processTagDefinitions
3030
tf_export.RegisterTenancyGraphs("identity", identityResourceGraph)
3131
tf_export.RegisterCompartmentGraphs("tagging", taggingResourceGraph)
32-
tf_export.RegisterCompartmentGraphs("identity", identityCompartmentResourceGraph)
3332
tf_export.BuildAvailabilityResourceGraph("oci_identity_compartment", customAssociationIdentityCompartment)
3433
}
3534

@@ -510,13 +509,6 @@ var identityResourceGraph = tf_export.TerraformResourceGraph{
510509
},
511510
}
512511

513-
var identityCompartmentResourceGraph = tf_export.TerraformResourceGraph{
514-
"oci_identity_compartment": {
515-
{TerraformResourceHints: exportIdentityPolicyHints},
516-
{TerraformResourceHints: exportIdentityDomainHints},
517-
},
518-
}
519-
520512
var taggingResourceGraph = tf_export.TerraformResourceGraph{
521513
"oci_identity_compartment": {
522514
{TerraformResourceHints: exportIdentityTagDefaultHints},

internal/service/identity/identity_network_sources_data_source.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ func (s *IdentityNetworkSourcesDataSourceCrud) SetData() error {
132132

133133
networkSource["services"] = r.Services
134134

135-
networkSource["state"] = r.LifecycleState
136-
137135
if r.TimeCreated != nil {
138136
networkSource["time_created"] = r.TimeCreated.String()
139137
}

website/docs/d/identity_allowed_domain_license_types.html.markdown

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ description: |-
1010
# Data Source: oci_identity_allowed_domain_license_types
1111
This data source provides the list of Allowed Domain License Types in Oracle Cloud Infrastructure Identity service.
1212

13-
(For tenancies that support identity domains) Lists the license types for identity domains supported by Oracle Cloud Infrastructure.
14-
(License types are also referred to as domain types.)
13+
List the allowed domain license types supported by Oracle Cloud Infrastructure If {@code currentLicenseTypeName} provided, returns allowed license types a domain with the specified license type name can migrate to.
14+
If {@code name} is provided, it filters and returns resources that match the given license type name.
15+
Otherwise, returns all valid license types that are currently supported.
1516

16-
If `currentLicenseTypeName` is provided, then the request returns license types that the identity domain with the specified license
17-
type name can change to. Otherwise, the request returns all valid license types currently supported.
17+
- If license type details are retrieved sucessfully, return 202 ACCEPTED.
18+
- If any internal error occurs, return 500 INTERNAL SERVER ERROR.
1819

1920

2021
## Example Usage
@@ -31,7 +32,7 @@ data "oci_identity_allowed_domain_license_types" "test_allowed_domain_license_ty
3132

3233
The following arguments are supported:
3334

34-
* `current_license_type_name` - (Optional) The license type of the identity domain.
35+
* `current_license_type_name` - (Optional) The domain license type
3536

3637

3738
## Attributes Reference

website/docs/d/identity_auth_tokens.html.markdown

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ The following attributes are exported:
4141
The following attributes are exported:
4242

4343
* `description` - The description you assign to the auth token. Does not have to be unique, and it's changeable.
44-
45-
(For tenancies that support identity domains) You can have an empty description.
4644
* `id` - The OCID of the auth token.
4745
* `inactive_state` - The detailed status of INACTIVE lifecycleState.
4846
* `state` - The token's current state.

website/docs/d/identity_authentication_policy.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_identity_authentication_policy
1111
This data source provides details about a specific Authentication Policy resource in Oracle Cloud Infrastructure Identity service.
1212

13-
Gets the authentication policy for the given tenancy. You must specify your tenant's OCID as the value for
13+
Gets the authentication policy for the given tenancy. You must specify your tenants OCID as the value for
1414
the compartment ID (remember that the tenancy is simply the root compartment).
1515

1616

@@ -35,7 +35,7 @@ The following arguments are supported:
3535
The following attributes are exported:
3636

3737
* `compartment_id` - Compartment OCID.
38-
* `network_policy` - Network policy, which consists of a list of network source IDs.
38+
* `network_policy` - Network policy, Consists of a list of Network Source ids.
3939
* `network_source_ids` - Network Source ids
4040
* `password_policy` - Password policy, currently set for the given compartment.
4141
* `is_lowercase_characters_required` - At least one lower case character required.

website/docs/d/identity_cost_tracking_tags.html.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: |-
1111
This data source provides the list of Cost Tracking Tags in Oracle Cloud Infrastructure Identity service.
1212

1313
Lists all the tags enabled for cost-tracking in the specified tenancy. For information about
14-
cost-tracking tags, see [Using Cost-tracking Tags](https://docs.cloud.oracle.com/iaas/Content/Tagging/Tasks/usingcosttrackingtags.htm).
14+
cost-tracking tags, see [Using Cost-tracking Tags](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/taggingoverview.htm#costs).
1515

1616

1717
## Example Usage
@@ -46,13 +46,13 @@ The following attributes are exported:
4646
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
4747
* `id` - The OCID of the tag definition.
4848
* `is_cost_tracking` - Indicates whether the tag is enabled for cost tracking.
49-
* `is_retired` - Indicates whether the tag is retired. See [Retiring Key Definitions and Namespace Definitions](https://docs.cloud.oracle.com/iaas/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm#retiringkeys).
49+
* `is_retired` - Indicates whether the tag is retired. See [Retiring Key Definitions and Namespace Definitions](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/taggingoverview.htm#Retiring).
5050
* `name` - The name assigned to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
5151
* `state` - The tag's current state. After creating a tag, make sure its `lifecycleState` is ACTIVE before using it. After retiring a tag, make sure its `lifecycleState` is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag's `lifecycleState` changes from DELETING to DELETED.
5252
* `tag_namespace_id` - The OCID of the namespace that contains the tag definition.
5353
* `tag_namespace_name` - The name of the tag namespace that contains the tag definition.
5454
* `time_created` - Date and time the tag was created, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z`
55-
* `validator` - Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see [Limits on Tags](https://docs.cloud.oracle.com/iaas/Content/Tagging/Concepts/taggingoverview.htm#limits).
55+
* `validator` - Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see [Limits on Tags](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/taggingoverview.htm#Limits).
5656

5757
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
5858

0 commit comments

Comments
 (0)