oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
753 stars 672 forks source link

FSDR protection group moveable compute throws error if private IP address is null (should be optional) #2167

Open jeliker opened 1 month ago

jeliker commented 1 month ago

Community Note

Terraform Version and Provider Version

Terraform v1.7.4
on darwin_arm64
+ provider registry.terraform.io/oracle/oci v6.4.0

Affected Resource(s)

affected_resources = oci_disaster_recovery_dr_protection_group

Terraform Configuration Files

resource "oci_disaster_recovery_dr_protection_group" "the_protection_group" {
    #Required
    compartment_id = var.compartment_id
    display_name = "PRIMARY"
    log_location {
        #Required
        bucket = "FSDR"
        namespace = var.namespace
    }

    members {
        #Required
        member_id = var.member_id
        member_type = "COMPUTE_INSTANCE_MOVABLE"

        #Optional
        destination_availability_domain = var.destination_availability_domain
        is_movable = true
        is_retain_fault_domain = true
        is_start_stop_enabled = true
        vnic_mapping {

            #Optional
            destination_primary_private_ip_address = null
            destination_subnet_id = var.dr_subnet_id
            source_vnic_id = var.source_vnic_id
        }
    }
}

Debug Output

│ Error: 400-InvalidParameter, members[0].vnicMappings[0].destinationPrimaryPrivateIpAddress size must be between 1 and 32; members[0].vnicMappings[0].destinationPrimaryPrivateIpHostnameLabel size must be between 1 and 63
│ Suggestion: Please update the parameter(s) in the Terraform config as per error message members[0].vnicMappings[0].destinationPrimaryPrivateIpAddress size must be between 1 and 32; members[0].vnicMappings[0].destinationPrimaryPrivateIpHostnameLabel size must be between 1 and 63
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/disaster_recovery_dr_protection_group 
│ API Reference: https://docs.oracle.com/iaas/api/#/en/disaster-recovery/20220125/DrProtectionGroup/UpdateDrProtectionGroup 
│ Request Target: PUT https://disaster-recovery.us-phoenix-1.oci.oraclecloud.com/20220125/drProtectionGroups/ocid1.drprotectiongroup.oc1.phx.aaaaaaaalq5u6ue6buwemdpfiffq36zh5k3slikxypuq4sax5b4wvhen2aea 
│ Provider version: 6.4.0, released on 2024-07-24.  
│ Service: Disaster Recovery Dr Protection Group 
│ Operation Name: UpdateDrProtectionGroup 
│ OPC request ID: abc802f377633d82d0c47ecc0d764293/4E3D825EF9A40F026835E7E46D35A7F8/6AFB894237EF459DCAC6A8BFE53C25A1 
│ 
│ 
│   with oci_disaster_recovery_dr_protection_group.the_protection_group,
│   on main.tf line 1, in resource "oci_disaster_recovery_dr_protection_group" "the_group":
│    1: resource "oci_disaster_recovery_dr_protection_group" "the_protection_group" {

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

tf-oci-pub commented 1 month ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.

jeliker commented 1 month ago

@varmax2511 why is this tagged awaiting-affected-resources? I very specifically added that information when submitting the issue

jeliker commented 1 month ago

@tf-oci-pub why is this tagged awaiting-affected-resources? I very specifically added that information when submitting the issue