generated from terraform-ibm-modules/terraform-ibm-module-template
-
Couldn't load subscription status.
- Fork 10
Dedicated Host for Long Term DA for LSF #222
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
Closed
Closed
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Basic example | ||
|
|
||
| An end-to-end basic example that will provision the following: | ||
| - A new dedicated host will be created. | ||
| - A new dedicated host group will be created and add the created dedicated host to the group. |
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,25 @@ | ||
| ######################################################################################################################## | ||
| # Dedicated Host Module | ||
| ######################################################################################################################## | ||
|
|
||
| module "dedicated_host" { | ||
| source = "terraform-ibm-modules/dedicated-host/ibm" | ||
| version = "1.1.0" | ||
| dedicated_hosts = [ | ||
| { | ||
| host_group_name = "${var.prefix}-dhgroup" | ||
| existing_host_group = var.existing_host_group | ||
| resource_group_id = var.resource_group_id | ||
| class = var.class | ||
| family = var.family | ||
| zone = var.zone[0] | ||
| resource_tags = var.resource_tags | ||
| dedicated_host = [ | ||
| { | ||
| name = "${var.prefix}-dhhost" | ||
| profile = var.profile | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
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,13 @@ | ||
| ############################################################################## | ||
| # Outputs | ||
| ############################################################################## | ||
|
|
||
| output "dedicated_host_id" { | ||
| value = module.dedicated_host.dedicated_host_ids | ||
| description = "List the Dedicated Host ID's" | ||
| } | ||
|
|
||
| output "dedicated_host_group_id" { | ||
| value = module.dedicated_host.dedicated_host_group_ids | ||
| description = "List the Dedicated Host Group ID's" | ||
| } |
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,46 @@ | ||
| ######################################################################################################################## | ||
| # Dedicated Host Input Variables | ||
| ######################################################################################################################## | ||
|
|
||
| variable "prefix" { | ||
| type = string | ||
| description = "Name of the resources" | ||
| } | ||
|
|
||
| variable "resource_tags" { | ||
| type = list(string) | ||
| description = "A list of access tags to apply to the resources created by the module." | ||
| default = [] | ||
| } | ||
|
|
||
| variable "resource_group_id" { | ||
| type = string | ||
| description = "The name of the resource group where you want to create the service." | ||
| } | ||
|
|
||
| variable "existing_host_group" { | ||
| type = bool | ||
| description = "Allows users to use an existing dedicated host group when set to true. Checks for the host_group_name and validates if exists, if not creates new one." | ||
| default = false | ||
| } | ||
|
|
||
| variable "zone" { | ||
| type = list(string) | ||
| description = "Particular zone selection for creating the dedicated host." | ||
| default = null | ||
| } | ||
|
|
||
| variable "family" { | ||
| description = "Family defines the purpose of the dedicated host, The dedicated host family can be defined from balanced,compute or memory. Refer [Understanding DH Profile family](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles&interface=ui) for more details" | ||
| type = string | ||
| } | ||
|
|
||
| variable "class" { | ||
| description = "Profile class of the dedicated host, this has to be defined based on the VSI usage. Refer [Understanding DH Class](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles&interface=ui) for more details" | ||
| type = string | ||
| } | ||
|
|
||
| variable "profile" { | ||
| description = "Profile for the dedicated hosts(size and resources). Refer [Understanding DH Profile](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles&interface=ui) for more details" | ||
| type = string | ||
| } |
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,3 @@ | ||
| terraform { | ||
| required_version = ">= 1.9.0" | ||
| } |
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
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
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.
@Louies-Jhony Whichever variables we have for dedicated host child module should be added here as we should provide the provision for users so they can override the optional values as well.
We need to add all variables here so that deployer node should understand the overridden values.
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.
@nupurg-ibm