As per documentation , the vnic_id field is optional , however , its throwing error with missing vnicId . Further documentation does not reference any subnet_id , however its complaining about missing subnetId . When I tried to use the subnet_id , this resource does not recognize this field either.
This documentation needs to be corrected , further we have a use case where we first deploy the infrastructure including the VCN, subnets and Route tables via main pipeline and then deploy the firewall VMs via separate pipeline. In main pipeline code, we require Route Table entry with firewall IP as next hop to force traffic through the firewall. This entry requires IP OCID which is not available during the first run as FW is not deployed yet. We wanted to use oci_core_private_ip to create the IP and inject its OCID in the routing table before deploying the firewall. And for the firewall VM, we wanted to use this IP in the "oci_core_vnic_attachment" resource , however it looks like that resource does not support attaching pre-existing IP (for that we will open another ticket/case).
In a nutshell , we should be able to create an IP that later we can attach to existing or new NIC interface as Secondary IP.
Steps to Reproduce
create VM with private IP resource with following code:
Community Note
Terraform Version and Provider Version
Terraform v1.7.3 on linux_amd64
Affected Resource(s)
oci_core_private_ip
Terraform Configuration Files
Debug Output
│ Error: 400-MissingParameter, This request is missing one of the following arguments: subnetId, vnicId, vlanId. │ Suggestion: Please retry or contact support for help with service: Core Private Ip │ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/core_private_ip │ API Reference: https://docs.oracle.com/iaas/api/#/en/iaas/20160918/PrivateIp/CreatePrivateIp │ Request Target: POST https://iaas.ca-toronto-1.oraclecloud.com/20160918/privateIps │ Provider version: 5.39.0, released on 2024-04-24. │ Service: Core Private Ip │ Operation Name: CreatePrivateIp
Panic Output
Expected Behavior
It should have created a private IP.
Actual Behavior
As per documentation , the vnic_id field is optional , however , its throwing error with missing vnicId . Further documentation does not reference any subnet_id , however its complaining about missing subnetId . When I tried to use the subnet_id , this resource does not recognize this field either. This documentation needs to be corrected , further we have a use case where we first deploy the infrastructure including the VCN, subnets and Route tables via main pipeline and then deploy the firewall VMs via separate pipeline. In main pipeline code, we require Route Table entry with firewall IP as next hop to force traffic through the firewall. This entry requires IP OCID which is not available during the first run as FW is not deployed yet. We wanted to use oci_core_private_ip to create the IP and inject its OCID in the routing table before deploying the firewall. And for the firewall VM, we wanted to use this IP in the "oci_core_vnic_attachment" resource , however it looks like that resource does not support attaching pre-existing IP (for that we will open another ticket/case). In a nutshell , we should be able to create an IP that later we can attach to existing or new NIC interface as Secondary IP.
Steps to Reproduce
terraform apply
Important Factoids
References