CodexBloom - Programming Q&A Platform

OCI Resource Manager: scenarios Deploying Terraform Configuration with Invalid Provider Version

👀 Views: 67 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-09
oci terraform resource-manager HCL

After trying multiple solutions online, I still can't figure this out. I've tried everything I can think of but I'm working on a personal project and I'm currently working with an scenario while trying to deploy my Terraform configuration using OCI Resource Manager... I have specified a provider version in my Terraform configuration file, but when I attempt to run the plan command, I encounter the following behavior: ``` behavior: Provider "oci" version ">= 3.0.0" not installed. To install it, run the following command: terraform init ``` I've already run `terraform init`, and my Terraform version is 1.1.5, which should be compatible. My main configuration file is structured like this: ```hcl provider "oci" { version = ">= 3.0.0" tenancy_ocid = var.tenancy_ocid user_ocid = var.user_ocid fingerprint = var.fingerprint private_key_path = var.private_key_path region = var.region } resource "oci_core_virtual_network" "my_vcn" { compartment_id = var.compartment_id display_name = "my_vcn" cidr_block = "10.0.0.0/16" dns_label = "myvcn" } ``` I've double-checked that the OCI provider is correctly referenced in my `versions.tf` file: ```hcl terraform { required_providers { oci = { source = "oracle/oci" version = ">= 3.0.0" } } required_version = ">= 1.1.0" } ``` I've also ensured that I have the correct credentials set up and that they are valid. However, I'm still exploring on this scenario. I've tried cleaning the `.terraform` directory and re-initializing the project, but it doesn't seem to resolve the question. Any insights on how I can fix this or further debug the scenario would be greatly appreciated. Thanks in advance! My development environment is Ubuntu 20.04. What's the correct way to implement this? This is part of a larger service I'm building. I'm working on a desktop app that needs to handle this. Thanks for any help you can provide!