Skip to content

Commit 1fa19ff

Browse files
authored
Merge pull request #1898 from oracle/release_gh
merging hotfix
2 parents 99c3933 + ae2dfab commit 1fa19ff

File tree

47 files changed

+174
-239
lines changed

Some content is hidden

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

47 files changed

+174
-239
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 5.2.1 (June 21, 2023)
2+
### Fixed
3+
- Reverted Identity compartment level discovery changes
4+
15
## 5.2.0 (June 21, 2023)
26

37
### Added

internal/globalvar/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"log"
88
)
99

10-
const Version = "5.2.0"
10+
const Version = "5.2.1"
1111
const ReleaseDate = "2023-06-21"
1212

1313
func PrintVersion() {

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.

0 commit comments

Comments
 (0)