Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Q:Creating subnet using terraform and private IP

ATaelJul 27 2017 — edited Jul 27 2017

Hello,

when creating subnets using terraform I would like to Prohibit public IP addresses for Instances in this Subnet. I can't seem to find a parameter that configures this.

I tried something like this (but it didn't work) after looking at the API documentation, https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/20160918/requests/CreateSubnetDetails

resource "baremetal_core_subnet" "TF_PrivateSubnet_Web_PHX_0" {

  availability_domain = "${lookup(data.baremetal_identity_availability_domains.ADs.availability_domains[0],"name")}"

  cidr_block = "10.0.1.0/24"

  display_name = "TF_PrivateSubnet_Web_PHX_0"

  compartment_id = "${var.compartment_ocid}"

  vcn_id = "${baremetal_core_virtual_network.TF_VCN_PHX.id}"

  route_table_id = "${baremetal_core_route_table.TF_Web_PHX.id}"

  security_list_ids = ["${baremetal_core_security_list.TF_Web_SecList_Public_PHX.id}"]

  prohibit_public_ip_onvnic = "true"

  dhcp_options_id = "${baremetal_core_virtual_network.TF_VCN_PHX.default_dhcp_options_id}"

}

I also tried the following parameter naming convention but with no luck: prohibitpubliciponvnic = "true"

Any idea what it could be? Also is there any documentation that outlines all the paremeters etc when using terraform?

Thanks

Andy

This post has been answered by ATael on Jul 27 2017
Jump to Answer
Comments
Post Details
Added on Jul 27 2017
1 comment
478 views