Add support for Artifact Registry package mirrors#407
Merged
Conversation
Currently, OS packages are downloaded directly from the OS vendor's mirrors, requiring outgoing Internet access for the database host. Although it works, it presents data exfiltration risks and is not inline with a secure-by-default configuration. This changes adds a new, optional Terraform variable `enable_os_package_mirror` that, for Oracle Linux deployments, configures an Artifact Registry remote repostiory (https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo) covering Base OS and Appstream repositories. It requires IAM permissions to use the repository: `artifactregistry.admin` for the Terraform runner, and `artifactregistry.reader` for the database VM's service account. The VPC must have Private Google Access enabled. Current support is limited to Google Cloud VMs running non-free editions, with Oracle Linux. For RHEL environments, which already use private repositories accessible via Private Google Access, this variable has no effect. Sample output: https://gist.github.com/mfielding/a731a5ae604b02f9c60519cb6acd7f52
* For clarity and consistency, removing "AR Mirror" references in favor or "AR Repo" or "AR Remote Repo" * Added (and documented) a new parameter --ar-repo-url with the base URL of the Artifact Registry remote repo * Added a validation to error out if attempted with free edition * I couldn't find a clean way to avoid the disabling of all repositories, as we actually want to fix yum updates post-install too. So adding some verbiage to the user guide. * Keeping NTP as-is, as a RAC-only thing; NTP is deprecated in our current supported OSes anyway. * Updating data guard presubmit tests to use this AR configuration, and not to have Internet access. (Free edition tests remain as-is.) Sample output from an install run in a VPC without Internet access: https://gist.github.com/mfielding/7b474a2142f1554481ec9ffab3e5c345
Member
Author
|
/retest |
For the presubmit tests, I'd rather not grant firewall modification permissions, so I'm removing the firewall creation knob. Also updating Terraform docs to note the permissions required for Artifact Registry.
Member
Author
|
/retest |
4 similar comments
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
AlexBasinov
approved these changes
Feb 6, 2026
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlexBasinov, mfielding The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Currently, OS packages are downloaded directly from the OS vendor's mirrors, requiring outgoing Internet access for the database host. Although it works, it presents data exfiltration risks and is not in line with a secure-by-default configuration.
This changes adds a new, optional Terraform variable
enable_os_package_mirrorthat, for Oracle Linux deployments,configures an Artifact Registry remote repository (https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo) covering Base OS and Appstream repositories.
It requires IAM permissions to use the repository:
artifactregistry.adminfor the Terraform runner, andartifactregistry.readerfor the database VM's service account. The VPC must have Private Google Access enabled.Current support is limited to Google Cloud VMs running non-free editions, with Oracle Linux. For RHEL environments, which already use private repositories accessible via Private Google Access, this variable has no effect.
Sample output, in a VPC without Internet access: https://gist.github.com/mfielding/7b474a2142f1554481ec9ffab3e5c345