Run OCI provider in-process without Terraform CLI - #139
Open
kousalya-kethavath wants to merge 7 commits into
Open
Run OCI provider in-process without Terraform CLI#139kousalya-kethavath wants to merge 7 commits into
kousalya-kethavath wants to merge 7 commits into
Conversation
kousalya-kethavath
requested review from
HaoyL666,
chetan79,
mulanwanderingearth and
veera-adithya-d
July 23, 2026 18:35
kousalya-kethavath
force-pushed
the
feature/no-fork-arch
branch
2 times, most recently
from
July 27, 2026 21:10
0fc927e to
a295afd
Compare
kousalya-kethavath
force-pushed
the
feature/no-fork-arch
branch
from
July 29, 2026 05:06
a295afd to
061e1a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
This PR introduces the OCI provider no-fork architecture: OCI Terraform SDKv2 resources run in-process through Upjet/
Crossplane instead of invoking the Terraform CLI at runtime.
The upstream
terraform-provider-ocisource is not permanently forked. A versioned patch is applied only in anisolated build/generation/test workspace, keeping the dependency upgrade path explicit and reviewable.
1. Add no-fork build and patch workflow
terraform-provider-oci.noforkpatchertool and validation tests.generate,build,test, andlint:2. Route OCI resources through no-fork clients
bounded LRU eviction.
defined_tagsfreeform_tagsremain granular maps in both cluster-scoped and namespaced generator configuration.
3. Configure no-fork provider runtime and metrics
4. Regenerate provider artifacts for no-fork
workflow.
5. Remove Terraform CLI from provider image
6. Optimize no-fork package publishing
7. Reuse no-fork patch across family build
Behavior and compatibility notes
runtime behavior.
Validation performed
Ran
make generatesuccessfully using the no-fork patch workflow.Verified regenerated ZPR API markers and CRD schemas preserve granular map ownership for
definedTagsandfreeformTags.Ran focused tests:
go test ./config/cluster/zpr ./config/namespaced/zprRan the package publishing workflow for all subpackages and both target platforms from the equivalent no-fork patch-
reuse commit:
the same workflow run.
Reviewer focus
isolation and removal of unsafe global behavior.
Risks and follow-up considerations
Future terraform-provider-oci upgrades require rebasing and validating the versioned patch.
The first family build remains more expensive because it builds the patched upstream dependency; subsequent service
builds reuse that work.
Generated artifact volume is intentionally large and should be reviewed primarily through generator inputs and
representative generated output.
Rollback is primarily an image/version rollback; CRD changes should be reviewed for compatibility before deployment.
Fixes #
I have:
make generateand committed the results (ideally in a separate commit).make check-diff.How has this code been tested
In-cluster no-fork smoke test
Evidence that reconciliation uses the in-process path
Confirmed Terraform CLI was absent from the live provider containers.
Inspected running processes and found no Terraform CLI or external provider-plugin process.
Searched provider logs and found no Terraform execution patterns (terraform init, plan, apply, destroy, or fork/exec
terraform).
Successful resource operations reported OCI Terraform provider version 8.22.0, consistent with the embedded in-
process SDKv2 provider.
Upgrade and rollback compatibility
Validated upgrade from Terraform CLI-backed providers to no-fork providers for networking and identity resources.
Existing VCN, subnet, and TagNamespace external names remained unchanged and resources stayed Ready=True /
Synced=True after upgrade.
Validated rollback/downgrade to Terraform CLI-backed v1.2.0 provider images: