Skip to content

Commit 02bccd7

Browse files
aaygoyalsankhsin
authored andcommitted
Deprecated - Support for IPv6 for OCI FSS
1 parent 95e2268 commit 02bccd7

12 files changed

+77
-92
lines changed

examples/storage/fss/mount_target.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ resource "oci_file_storage_mount_target" "my_mount_target_1" {
3030
is_lock_override = var.is_lock_override
3131
}
3232

33-
resource "oci_file_storage_mount_target" "my_mount_target_3" {
33+
/*resource "oci_file_storage_mount_target" "my_mount_target_3" {
3434
#Required
3535
availability_domain = data.oci_identity_availability_domain.ad.name
3636
compartment_id = var.compartment_ocid
@@ -45,7 +45,7 @@ resource "oci_file_storage_mount_target" "my_mount_target_3" {
4545
requested_throughput = "1"
4646
4747
nsg_ids = [oci_core_network_security_group.test_network_security_group.id]
48-
}
48+
}*/
4949

5050
resource "oci_file_storage_mount_target" "my_mount_target_2" {
5151
#Required

examples/storage/fss/network.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resource "oci_core_vcn" "my_vcn" {
66
compartment_id = var.compartment_ocid
77
display_name = "myvcn"
88
dns_label = "myvcn"
9-
is_ipv6enabled = true
9+
// is_ipv6enabled = true
1010
}
1111

1212
resource "oci_core_internet_gateway" "my_internet_gateway" {
@@ -39,7 +39,7 @@ resource "oci_core_subnet" "my_subnet" {
3939
route_table_id = oci_core_route_table.my_route_table.id
4040
}
4141

42-
resource "oci_core_subnet" "my_subnet1" {
42+
/*resource "oci_core_subnet" "my_subnet1" {
4343
depends_on = [oci_core_network_security_group.test_network_security_group]
4444
availability_domain = data.oci_identity_availability_domain.ad.name
4545
cidr_block = var.my_subnet1_cidr
@@ -50,7 +50,7 @@ resource "oci_core_subnet" "my_subnet1" {
5050
security_list_ids = [oci_core_security_list.my_security_list.id]
5151
route_table_id = oci_core_route_table.my_route_table.id
5252
ipv6cidr_blocks = ["${substr(oci_core_vcn.my_vcn.ipv6cidr_blocks[0], 0, length(oci_core_vcn.my_vcn.ipv6cidr_blocks[0]) - 2)}${64}"]
53-
}
53+
}*/
5454

5555
resource "oci_core_network_security_group" "test_network_security_group" {
5656
#Required

examples/storage/fss/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ variable "my_subnet_cidr" {
3434
default = "10.0.1.0/24"
3535
}
3636

37-
variable "my_subnet1_cidr" {
37+
/*variable "my_subnet1_cidr" {
3838
default = "10.0.2.0/24"
39-
}
39+
}*/
4040

4141
variable "file_system_1_display_name" {
4242
default = "my_fs_1"
@@ -82,9 +82,9 @@ variable "mount_target_2_display_name" {
8282
default = "my_mount_target_2"
8383
}
8484

85-
variable "mount_target_3_display_name" {
85+
/*variable "mount_target_3_display_name" {
8686
default = "my_mount_target_3"
87-
}
87+
}*/
8888

8989
variable "export_path_fs1_mt1" {
9090
default = "/myfsspaths/fs1/path1"

internal/integrationtest/file_storage_mount_target_test.go

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import (
88
"fmt"
99
"regexp"
1010
"strconv"
11-
"strings"
11+
12+
//"strings"
1213
"testing"
1314
"time"
1415

@@ -103,7 +104,7 @@ var (
103104
"requested_throughput": acctest.Representation{RepType: acctest.Optional, Create: `1`},
104105
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation},
105106
}
106-
FileStorageIPV6MountTargetRepresentation = map[string]interface{}{
107+
/* FileStorageIPV6MountTargetRepresentation = map[string]interface{}{
107108
"availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`},
108109
"compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`},
109110
"subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet1.id}`},
@@ -113,7 +114,7 @@ var (
113114
"ip_address": acctest.Representation{RepType: acctest.Optional, Create: `${cidrhost(oci_core_vcn.test_vcn.ipv6cidr_blocks[0], 21)}`},
114115
"requested_throughput": acctest.Representation{RepType: acctest.Optional, Create: `1`},
115116
"lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation},
116-
}
117+
}*/
117118
FileStorageMountTargetKerberosRepresentation = map[string]interface{}{
118119
"kerberos_realm": acctest.Representation{RepType: acctest.Required, Create: `kerberosRealm`, Update: `kerberosRealm2`},
119120
"backup_key_tab_secret_version": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `0`},
@@ -495,53 +496,56 @@ func TestFileStorageMountTargetResource_failedWorkRequest(t *testing.T) {
495496
},
496497
})
497498
}
498-
func TestFileStorageMountTargetResource_ipv6(t *testing.T) {
499-
httpreplay.SetScenario("TestFileStorageMountTargetResource_ipv6")
500-
defer httpreplay.SaveScenario()
501-
config := acctest.ProviderTestConfig()
502-
503-
compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid")
504-
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId)
505-
506-
resourceName := "oci_file_storage_mount_target.test_mount_target123"
507-
// Get subnet CIDR block based on its VCN CIDR Block
508-
// For example: VCN CIDR Block: 2607:9b80:9a0f:0100::/56, Subnet CIDR Block: 2607:9b80:9a0f:0100::/64
509-
subnetCidrBlock := `${substr(oci_core_vcn.test_vcn.ipv6cidr_blocks[0], 0, length(oci_core_vcn.test_vcn.ipv6cidr_blocks[0]) - 2)}${64}`
510-
//subnetCidrBlock := `fd1b:392a:ffb6::/64`
511-
acctest.ResourceTest(t, testAccCheckFileStorageMountTargetDestroy, []resource.TestStep{
512-
// verify resource creation fails for the second mount target with the same ip_address
513-
{
514-
Config: config + compartmentIdVariableStr +
515-
acctest.GenerateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", acctest.Required, acctest.Create, CoreNetworkSecurityGroupRepresentation) +
516-
acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet1", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{
517-
"availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`},
518-
"dns_label": acctest.Representation{RepType: acctest.Required, Create: `dnslabel`},
519-
"ipv6cidr_blocks": acctest.Representation{RepType: acctest.Required, Create: []string{subnetCidrBlock}},
520-
})) +
521-
acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreVcnRepresentation, map[string]interface{}{
522-
"dns_label": acctest.Representation{RepType: acctest.Required, Create: `dnslabel`},
523-
"is_ipv6enabled": acctest.Representation{RepType: acctest.Required, Create: `true`},
524-
})) +
525-
AvailabilityDomainConfig +
526-
acctest.GenerateResourceFromRepresentationMap("oci_file_storage_mount_target", "test_mount_target123", acctest.Optional, acctest.Update, acctest.RepresentationCopyWithRemovedProperties(FileStorageIPV6MountTargetRepresentation, []string{"idmap_type", "kerberos", "ldap_idmap"})),
527-
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
528-
//resource.TestCheckResourceAttr(resourceName, "ip_address", "fd1b:392a:ffb6::20"),
529-
func(s *terraform.State) (err error) {
530-
// Get the IP address from the resource state
531-
ipAddress, err := acctest.FromInstanceState(s, resourceName, "ip_address")
532499

533-
// Check if the IP address contains a colon (which is typical for IPv6)
534-
if !strings.Contains(ipAddress, ":") {
535-
return fmt.Errorf("IP address %s is not an IPv6 address (it does not contain a colon)", ipAddress)
536-
}
500+
/*
501+
func TestFileStorageMountTargetResource_ipv6(t *testing.T) {
502+
httpreplay.SetScenario("TestFileStorageMountTargetResource_ipv6")
503+
defer httpreplay.SaveScenario()
504+
config := acctest.ProviderTestConfig()
505+
506+
compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid")
507+
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId)
508+
509+
resourceName := "oci_file_storage_mount_target.test_mount_target123"
510+
// Get subnet CIDR block based on its VCN CIDR Block
511+
// For example: VCN CIDR Block: 2607:9b80:9a0f:0100::/56, Subnet CIDR Block: 2607:9b80:9a0f:0100::/64
512+
subnetCidrBlock := `${substr(oci_core_vcn.test_vcn.ipv6cidr_blocks[0], 0, length(oci_core_vcn.test_vcn.ipv6cidr_blocks[0]) - 2)}${64}`
513+
//subnetCidrBlock := `fd1b:392a:ffb6::/64`
514+
acctest.ResourceTest(t, testAccCheckFileStorageMountTargetDestroy, []resource.TestStep{
515+
// verify resource creation fails for the second mount target with the same ip_address
516+
{
517+
Config: config + compartmentIdVariableStr +
518+
acctest.GenerateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", acctest.Required, acctest.Create, CoreNetworkSecurityGroupRepresentation) +
519+
acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet1", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{
520+
"availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`},
521+
"dns_label": acctest.Representation{RepType: acctest.Required, Create: `dnslabel`},
522+
"ipv6cidr_blocks": acctest.Representation{RepType: acctest.Required, Create: []string{subnetCidrBlock}},
523+
})) +
524+
acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreVcnRepresentation, map[string]interface{}{
525+
"dns_label": acctest.Representation{RepType: acctest.Required, Create: `dnslabel`},
526+
"is_ipv6enabled": acctest.Representation{RepType: acctest.Required, Create: `true`},
527+
})) +
528+
AvailabilityDomainConfig +
529+
acctest.GenerateResourceFromRepresentationMap("oci_file_storage_mount_target", "test_mount_target123", acctest.Optional, acctest.Update, acctest.RepresentationCopyWithRemovedProperties(FileStorageIPV6MountTargetRepresentation, []string{"idmap_type", "kerberos", "ldap_idmap"})),
530+
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
531+
//resource.TestCheckResourceAttr(resourceName, "ip_address", "fd1b:392a:ffb6::20"),
532+
func(s *terraform.State) (err error) {
533+
// Get the IP address from the resource state
534+
ipAddress, err := acctest.FromInstanceState(s, resourceName, "ip_address")
535+
536+
// Check if the IP address contains a colon (which is typical for IPv6)
537+
if !strings.Contains(ipAddress, ":") {
538+
return fmt.Errorf("IP address %s is not an IPv6 address (it does not contain a colon)", ipAddress)
539+
}
537540
538-
// If it contains a colon, it's an IPv6 address, no error
539-
return nil
540-
},
541-
),
542-
},
543-
})
544-
}
541+
// If it contains a colon, it's an IPv6 address, no error
542+
return nil
543+
},
544+
),
545+
},
546+
})
547+
}
548+
*/
545549
func TestFileStorageMountTargetResource_hpmtTest(t *testing.T) {
546550
httpreplay.SetScenario("TestFileStorageMountTargetResource_hpmtTest")
547551
defer httpreplay.SaveScenario()

internal/provider/register_datasource.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,12 @@ func init() {
365365
if common.CheckForEnabledServices("logging") {
366366
tf_logging.RegisterDatasource()
367367
}
368-
if common.CheckForEnabledServices("managedkafka") {
369-
tf_managed_kafka.RegisterDatasource()
370-
}
371368
if common.CheckForEnabledServices("lustrefilestorage") {
372369
tf_lustre_file_storage.RegisterDatasource()
373370
}
371+
if common.CheckForEnabledServices("managedkafka") {
372+
tf_managed_kafka.RegisterDatasource()
373+
}
374374
if common.CheckForEnabledServices("managementagent") {
375375
tf_management_agent.RegisterDatasource()
376376
}

internal/service/file_storage/file_storage_mount_target_resource.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,6 @@ func FileStorageMountTargetResource() *schema.Resource {
248248
Type: schema.TypeString,
249249
Computed: true,
250250
},
251-
"mount_target_ipv6ids": {
252-
Type: schema.TypeList,
253-
Computed: true,
254-
Elem: &schema.Schema{
255-
Type: schema.TypeString,
256-
},
257-
},
258251
"observed_throughput": {
259252
Type: schema.TypeString,
260253
Computed: true,
@@ -701,8 +694,6 @@ func (s *FileStorageMountTargetResourceCrud) SetData() error {
701694
}
702695
s.D.Set("locks", locks)
703696

704-
s.D.Set("mount_target_ipv6ids", s.Res.MountTargetIpv6Ids)
705-
706697
nsgIds := []interface{}{}
707698
for _, item := range s.Res.NsgIds {
708699
nsgIds = append(nsgIds, item)

internal/service/file_storage/file_storage_mount_targets_data_source.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ func (s *FileStorageMountTargetsDataSourceCrud) SetData() error {
163163
}
164164
mountTarget["locks"] = locks
165165

166-
mountTarget["mount_target_ipv6ids"] = r.MountTargetIpv6Ids
167-
168166
mountTarget["nsg_ids"] = r.NsgIds
169167

170168
if r.ObservedThroughput != nil {

website/docs/d/file_storage_exports.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The following attributes are exported:
6666
* `identity_squash` - Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If `ALL`, all users and groups are remapped; if `ROOT`, only the root user and group (UID/GID 0) are remapped; if `NONE`, no remapping is done. If unspecified, defaults to `ROOT`.
6767
* `is_anonymous_access_allowed` - Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
6868
* `require_privileged_source_port` - If `true`, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to `true`.
69-
* `source` - Clients these options should apply to. Must be a either single IPv4/IPv6 address or single IPv4/IPv6 CIDR block.
69+
* `source` - Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
7070

7171
**Note:** Access will also be limited by any applicable VCN security rules and the ability to route IP packets to the mount target. Mount targets do not have Internet-routable IP addresses.
7272
* `export_set_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export's export set.

website/docs/d/file_storage_mount_targets.html.markdown

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ The following attributes are exported:
8080
* `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
8181
* `time_created` - When the lock was created.
8282
* `type` - Type of the lock.
83-
* `mount_target_ipv6ids` - The OCIDs of the IPv6 addresses associated with this mount target.
8483
* `nsg_ids` - A list of Network Security Group [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm).
8584
* `observed_throughput` - Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance).
8685
* `private_ip_ids` - The OCIDs of the private IP addresses associated with this mount target.

website/docs/guides/resource_discovery.html.markdown

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,6 @@ Make sure the `output_path` is empty before running resource discovery
249249
* The compartment export functionality currently supports discovery of the target compartment. The ability to discover resources in child compartments is not yet supported.
250250
* If using Instance Principals, resources can not be discovered if compartment_id is not specified
251251

252-
253-
You can specify the maximum number of parallel chunks used for importing resources by setting the following environment variable. By default, it is set to twice the number of CPU cores.
254-
255-
```
256-
export TF_MAX_PARALLEL_CHUNKS=<Positive Integer>
257-
```
258-
259252
### Exit status
260253

261254
While discovering resources if there is any error related to the APIs or service unavailability, the tool will move on to find next resource. All the errors encountered will be displayed after the discovery is complete.
@@ -399,7 +392,7 @@ apm
399392
* oci\_apm\_apm\_domain
400393

401394
apm_config
402-
395+
403396
* oci\_apm\_config\_config
404397

405398
apm_synthetics
@@ -632,12 +625,12 @@ data_safe
632625
* oci\_data\_safe\_sensitive\_data\_model\_referential\_relation
633626
* oci\_data\_safe\_sensitive\_type\_group\_grouped\_sensitive\_type
634627
* oci\_data\_safe\_sensitive\_type\_group
635-
* oci\_data\_safe\_target\_database\_group
636-
* oci\_data\_safe\_unified\_audit\_policy\_definition
637628
* oci\_data\_safe\_security\_assessment\_check
638-
* oci\_data\_safe\_attribute\_set
639629
* oci\_data\_safe\_security\_policy\_config
630+
* oci\_data\_safe\_attribute\_set
631+
* oci\_data\_safe\_unified\_audit\_policy\_definition
640632
* oci\_data\_safe\_unified\_audit\_policy
633+
* oci\_data\_safe\_target\_database\_group
641634

642635
database
643636

@@ -1036,6 +1029,11 @@ lustre_file_storage
10361029

10371030
* oci\_lustre\_file\_storage\_lustre\_file\_system
10381031

1032+
managed_kafka
1033+
1034+
* oci\_managed\_kafka\_kafka\_cluster\_config
1035+
* oci\_managed\_kafka\_kafka\_cluster
1036+
10391037
management_agent
10401038

10411039
* oci\_management\_agent\_management\_agent

0 commit comments

Comments
 (0)