terraform-oci-oke
terraform-oci-oke copied to clipboard
var.network_compartment_id is not used?
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version and Provider Version
Terraform v1.4.4 on linux_amd64
Affected Resource(s)
module.oke.module.vcn[0].oci_core_vcn.vcn
Terraform Configuration Files
module "oke_prereqs" {
source = "../../modules/oke_prereqs"
compartment_id = local.tenancy_id
name = local.name
region = var.region
config_file_profile = var.config_file_profile
home_config_file_profile = var.home_config_file_profile
}
module "oke" {
source = "oracle-terraform-modules/oke/oci"
version = "5.0.0-beta.2"
cluster_name = local.name
control_plane_type = "private"
compartment_id = module.oke_prereqs.oke_compartment_id
network_compartment_id = module.oke_prereqs.oke_compartment_id
worker_compartment_id = module.oke_prereqs.oke_compartment_id
tenancy_id = local.tenancy_id
ssh_private_key_path = var.ssh_private_key_path
ssh_public_key_path = var.ssh_public_key_path
home_region = local.home_region
region = var.region
// node pool config
node_pools = var.node_pools
check_node_active = "one"
worker_image_id = "none"
worker_image_type = "platform"
worker_image_os = "Oracle Linux"
worker_image_os_version = "8.7"
cluster_kms_key_id = module.oke_prereqs.oke_kms_key_id
// Operator arguments
enable_operator_instance_principal = "true"
providers = {
oci.home = oci.home
}
}
Expected Behavior
When the variable network_compartment_id is set the VCN should be deployed into the value of the variable.
Actual Behavior
VCN is deployed in the value of the variable compartment_id
It seems the variable network_compartment_id isn't actually used anywhere in the terraform code. The VCN module references the variable compartment_id instead.
If someone can confirm this is the case I can submit a PR with updated code using the network_compartment_id variable.
Steps to Reproduce
- Change
network_compartment_idvariable to something different terraform plan
References
- https://github.com/oracle-terraform-modules/terraform-oci-oke/blob/v5.0.0-beta.2/main.tf#L9
- https://github.com/oracle-terraform-modules/terraform-oci-oke/blob/v5.0.0-beta.2/variables-iam.tf#L6
@devoncrouse