generated from oracle-quickstart/oci-quickstart-template
-
Couldn't load subscription status.
- Fork 8
Added changes for enabling osmh. #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
87614e1
Added changes for enabling osmh
ManviGupta-prog 978bac9
Merge with base
ManviGupta-prog 5cdc87a
Cleaned up code
ManviGupta-prog 8c391f3
Resolved comments
ManviGupta-prog 37bc316
Minor fix.
ManviGupta-prog 6259427
To resolve plugin error in terraform
ManviGupta-prog a612f31
Minor comment fix
ManviGupta-prog 068d801
Added these changes to ensure all the software sources are selected b…
ManviGupta-prog 072ec61
Added changes for the variable name
ManviGupta-prog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| resource "oci_os_management_hub_software_source_change_availability_management" "software_source_change_availability_management" { | ||
| for_each = toset(local.filtered_sources) | ||
|
|
||
| software_source_availabilities { | ||
| software_source_id = each.value | ||
| availability_at_oci = var.software_availabilty | ||
| } | ||
| } | ||
|
|
||
| resource "oci_os_management_hub_profile" "create_profile" { | ||
| compartment_id = var.compartment_id | ||
| display_name = var.display_name | ||
| profile_type = var.profile_type | ||
| software_source_ids = local.filtered_sources | ||
| arch_type = var.arch_type | ||
| is_default_profile = var.is_default_profile | ||
| os_family = var.os_family | ||
| registration_type = var.registration_type | ||
| vendor_name = var.vendor_name | ||
| depends_on = [ | ||
| oci_os_management_hub_software_source_change_availability_management.software_source_change_availability_management | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| data "oci_identity_tenancy" "tenancy_info" { | ||
| tenancy_id = var.tenancy_id | ||
| } | ||
| data "oci_os_management_hub_software_sources" "all_tenancy_osmh_software_sources" { | ||
| compartment_id = data.oci_identity_tenancy.tenancy_info.id | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| locals { | ||
| all_tenancy_osmh_software_sources = data.oci_os_management_hub_software_sources.all_tenancy_osmh_software_sources.software_source_collection[0].items | ||
| software_source_names = [ | ||
| "ol8_addons-x86_64", | ||
| "ol8_appstream-x86_64", | ||
| "ol8_baseos_latest-x86_64", | ||
| "ol8_ksplice-x86_64", | ||
| "ol8_mysql80_connectors_community-x86_64", | ||
| "ol8_mysql80_tools_community-x86_64", | ||
| "ol8_uekr7-x86_64", | ||
| "ol8_mysql80_community-x86_64" | ||
| ] | ||
|
|
||
| filtered_sources = [ | ||
| for src in local.all_tenancy_osmh_software_sources : src.id | ||
| if contains(local.software_source_names, src.display_name) | ||
| ] | ||
| } | ||
ManviGupta-prog marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| output "profile_ocid" { | ||
| value = oci_os_management_hub_profile.create_profile.id | ||
| } | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| variable "display_name" { | ||
| description = "The display name for the profile" | ||
| type = string | ||
| } | ||
|
|
||
| variable "profile_type" { | ||
| description = "The type of the profile (e.g., SOFTWARESOURCE)" | ||
| type = string | ||
| default = "SOFTWARESOURCE" | ||
| } | ||
|
|
||
| variable "arch_type" { | ||
| description = "The architecture type of the profile" | ||
| type = string | ||
| default = "X86_64" | ||
| } | ||
|
|
||
| variable "description" { | ||
| description = "A description for the profile" | ||
| type = string | ||
| default = "" | ||
| } | ||
|
|
||
| variable "os_family" { | ||
| description = "The operating system family for the profile (e.g., LINUX, WINDOWS)" | ||
| type = string | ||
| default = "ORACLE_LINUX_8" | ||
|
|
||
| } | ||
|
|
||
| variable "registration_type" { | ||
| description = "The registration type for the profile" | ||
| type = string | ||
| default = "OCI_LINUX" | ||
| } | ||
|
|
||
| variable "software_source_ids" { | ||
| description = "List of software source IDs associated with the profile" | ||
| type = list(string) | ||
| default = [] | ||
| } | ||
|
|
||
| variable "vendor_name" { | ||
| description = "The vendor name for the profile" | ||
| type = string | ||
| default = "ORACLE" | ||
| } | ||
|
|
||
| variable "compartment_id" { | ||
| description = "The OCID of the compartment where the profile will be created" | ||
| type = string | ||
| } | ||
|
|
||
| variable "is_default_profile" { | ||
| description = "Indicates whether this profile is the default profile" | ||
| type = bool | ||
| default = false | ||
| } | ||
| variable "tenancy_id" { | ||
| description = "The OCID of the tenancy" | ||
| type = string | ||
| } | ||
| variable "software_availabilty" { | ||
| description = "Availability at OCI for the software sources" | ||
| type = string | ||
| default = "SELECTED" | ||
| } |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to provide mysql packages from OSMH OOB? WLS for OCI recommends using Oracle database in general. This is more a PM question if we want to provides updates to mysql by default.