Comments (5)
@scross01 I pushed a new binary yesterday designed to fixed this issue, are you using the newest version?
from terraform-provider-oci.
I tested with the latest build (v1.0.3)
The problem only seems to occur when using the count
parameter for launching multiple instances. I wonder if it could be a core problem with the ${element()}
function because there are two indexed items in the data item reference - although it's odd that it works okay on a second apply.
from terraform-provider-oci.
I am not sure if you have noticed but I think it works different when you try to obtain vnics info for VMs and BMs. For BMs works perfectly fine. For VMs it looks like there is no vnic at all... But I am still wondering how to posses for further purposes VM's public IP address...
from terraform-provider-oci.
Having the same issue while using count. When TF apply starts it throws errors
* data.baremetal_core_vnic.InstanceVnic[0]: Resource 'data.baremetal_core_vnic_attachments.InstanceVnics' does not have attribute 'vnic_attachments.0.vnic_id' for variable 'data.baremetal_core_vnic_attachments.InstanceVnics.*.vnic_attachments.0.vnic_id'
* data.baremetal_core_vnic.InstanceVnic[1]: Resource 'data.baremetal_core_vnic_attachments.InstanceVnics' does not have attribute 'vnic_attachments.0.vnic_id' for variable 'data.baremetal_core_vnic_attachments.InstanceVnics.*.vnic_attachments.0.vnic_id'
Where code look like this
# Gets a list of vNIC attachments on the instance
data "baremetal_core_vnic_attachments" "InstanceVnics" {
count = "${var.machine_count}"
compartment_id = "${var.compartment_ocid}"
availability_domain = "${lookup(data.baremetal_identity_availability_domains.ADs.availability_domains[var.AD - 1],"name")}"
instance_id = "${element(baremetal_core_instance.TFInstance.*.id,count.index)}"
}
data "baremetal_core_vnic" "InstanceVnic" {
depends_on = ["baremetal_core_instance.TFInstance"]
count = "${var.machine_count}"
vnic_id = "${data.baremetal_core_vnic_attachments.InstanceVnics.*.vnic_attachments.0.vnic_id[count.index]}"
}
If I comment the problem and provision configuration and then uncomment the code it works just fine. Seem TF does check ahead of time when tfstate is formed.
from terraform-provider-oci.
baremetal_core_instance...public_ip|private_ip
will be available in v1.0.10, no longer requiring explicit vnic lookup.
from terraform-provider-oci.
Related Issues (20)
- condition block arguments for oci_network_firewall_network_firewall_policy_security_rule are optional, but required by resource HOT 1
- 400-InvalidParameter, Unable to process JSON input
- Announcement subscription filter group docs are incorrect/incomplete re: importing HOT 1
- Import is not working for oci_identity_domains_identity_providers HOT 2
- Oci data science UpdateNotebookSession update fails without privateEndpointId HOT 2
- OKE nodepool scaling doesn't work as expected HOT 5
- unable to open file "lb.sql"
- Add missing oci_core_instance variables to oci_containerengine_node_pool
- Oci data science UpdateNotebookSession update fails without privateEndpointId Ticket2 HOT 5
- Bring back the provider documentation on registry.terraform.io
- os_version attribute not exported by the oci_database_db_system resource HOT 2
- oci_core_instance import sets assign_private_dns_record to false HOT 2
- oci_apigateway_deployment: does not support dynamic parameter in urls in the in route HOT 3
- Imported oci_stack_monitoring_discovery_job fails on plan/apply because system_tags "doesn't support update" HOT 1
- Identity compartment resource documentation
- oci_log_analytics_namespaces attributes are wrong HOT 1
- resource oci_log_analytics_namespace doesn't support import HOT 1
- '400-InvalidParameter Unable to process JSON input' Error When Creating One-Time Budgets with start_date and end_date HOT 3
- Change OKE app autoscaler config not working HOT 2
- Plugin Crashed: oci_database_autonomous_database_saas_admin_user HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-oci.