You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ <path-to-plugin>/terraform-provider-oci
2017/10/13 01:12:08 [INFO] terraform-provider-oci 2.0.1
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically
Description:
Include a description with repro steps, expected result and actual result
I am in a need to pass egress and ingress rule for a security list which is stored in another variable.tf file to the resource in the create_network.tf file. I get the below error with this approach, but when substituting the value directly in the resource works fine.
I don't believe Terraform supports this. Can you point to some docs or examples where this is has been achieved? Perhaps you can inquire as to the feasibility of this on the Terraform project.
Terraform Version
$ terraform -v
Terraform v0.10.7
OCI Provider Version
$ <path-to-plugin>/terraform-provider-oci
2017/10/13 01:12:08 [INFO] terraform-provider-oci 2.0.1
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically
Description:
Include a description with repro steps, expected result and actual result
I am in a need to pass egress and ingress rule for a security list which is stored in another variable.tf file to the resource in the create_network.tf file. I get the below error with this approach, but when substituting the value directly in the resource works fine.
Error
Terraform Plan
#Template for different ADs
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.compartment_ocid}"
}
#Resource for creating VCN
resource "oci_core_virtual_network" "CompleteVCN" {
count = "${var.enable_flag}"
cidr_block = "${var.VCN-CIDR}"
compartment_id = "${var.compartment_ocid}"
display_name = "TFCompleteVCN"
dns_label = "vnc1"
}
#Resource for creating IG
resource "oci_core_internet_gateway" "CompleteIG" {
count = "${var.enable_flag}"
compartment_id = "${var.compartment_ocid}"
display_name = "TFCompleteIG"
vcn_id = "${oci_core_virtual_network.CompleteVCN.id}"
}
#Resource for creating Routing table
resource "oci_core_route_table" "RouteForComplete" {
count = "${var.enable_flag}"
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.CompleteVCN.id}"
display_name = "TFRouteTableForComplete"
route_rules {
cidr_block = "0.0.0.0/0"
network_entity_id = "${oci_core_internet_gateway.CompleteIG.id}"
}
}
#Rsource for creating custom security list
resource "oci_core_security_list" "CustmSecurityList" {
count = "${var.enable_flag}"
compartment_id = "${var.compartment_ocid}"
display_name = "Custom_SecurityList"
vcn_id = "${oci_core_virtual_network.CompleteVCN.id}"
egress_security_rules = "${var.egress_rule}"
ingress_security_rules = "${var.ingress_rule}"
}
variable.tf
variable "VCN-CIDR" {
default = "10.0.0.0/16"
}
variable "sl_egress" {
type = "list"
default = [{
destination = "0.0.0.0/0"
protocol = "all"
}]
}
variable "sl_ingress" {
type = "list"
default = [{
tcp_options {
"max" = 10250
"min" = 10250
}
protocol = "6"
source = "10.0.0.0/16"
},
{
tcp_options {
"max" = 6443
"min" = 6443
}
protocol = "6"
source = "10.0.0.0/16"
},
{
tcp_options {
"max" = 30999
"min" = 30000
}
protocol = "6"
source = "10.0.0.0/16"
},
{
tcp_options {
"max" = 2380
"min" = 2379
}
protocol = "6"
source = "10.0.0.0/16"
},
{
tcp_options {
"max" = 111
"min" = 111
}
protocol = "6"
source = "10.0.0.0/16"
}]
}
Alternative tried in Security List creation --> Unsuccessfull
resource "oci_core_security_list" "CustmSecurityList" {
compartment_id = "${var.compartment_ocid}"
display_name = "Custom_SecurityList"
vcn_id = "${oci_core_virtual_network.CompleteVCN.id}"
egress_security_rules = {
variables = "${var.sl_egress}"
}
ingress_security_rules = {
variables = "${var.sl_ingress}"
}
}
Error
6 error(s) occurred:
The text was updated successfully, but these errors were encountered: