Skip to content
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

Changes for Dedicated Host with Landing Zone VSI - Reg #777

Closed

Conversation

Louies-Jhony
Copy link
Contributor

Description

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

1 similar comment
@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

default = null
description = "ID of the dedicated host for hosting the VSI's"

validation {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to use this validation, users need to be on terraform version >=1.9.0. So can we bump the required terraform version in the module's version.tf as all submodules and examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to 1.9.0

@@ -51,3 +51,9 @@ variable "secondary_use_vsi_security_group" {
type = bool
default = false
}

variable "enable_dedicated_host" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to expose a new variable in the example - we don't want to make examples flexible solutions. Suggest to just hard code this to true in the example main.tf

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update the examples/complete/README.md file to mention about dedicated host

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

variables.tf Outdated
variable "enable_dedicated_host" {
type = bool
default = false
description = "Setting this option to true will enable dedicated hosts for the VSI's, the default value is set to false. Refer [Understanding Dedicated Hosts](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-dedicated-hosts-instances&interface=ui#about-dedicated-hosts) for more details"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the description to mention that when set to true, a value is required for the dedicated_host_id input

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

variables.tf Outdated

validation {
condition = var.enable_dedicated_host == false || (var.enable_dedicated_host == true && var.dedicated_host_id != null)
error_message = "When enable_dedicated_host is set to true, provide dedicated_host_id or new dedicated host will be created."
Copy link
Member

@ocofaigh ocofaigh Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"new dedicated host will be created"? Should this say "new dedicated host will not be created"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

variables.tf Outdated
variable "dedicated_host_id" {
type = string
default = null
description = "ID of the dedicated host for hosting the VSI's"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the description to mention that enable_dedicated_host needs to be set to true if passing a dedicated host ID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

}

#############################################################################
# Dedicated Host
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe put the code for dedicated host above the VSI code since host is needed before VSI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -24,7 +24,7 @@ module "resource_group" {

module "key_protect_all_inclusive" {
source = "terraform-ibm-modules/kms-all-inclusive/ibm"
version = "4.19.2"
version = "4.19.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an older version to whats in main branch - suggest to change it back

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments. Can you also expose this feature in the fscloud submodule code (found in modules/fscloud)

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony
Copy link
Contributor Author

Louies-Jhony commented Jan 15, 2025

@ocofaigh

For dedicated host testing, the existing VSI module create VSI's with placement group across zones. Since VSI can be placed either in a placement group or a dedicated host, I have introduced a separate module for VSI which will create a VSI in a dedicated host on zone-1.

On the PR test go file, for complete and upgrade test cases, we are using the same setup.(i.e same folder COMPLETE)
All test functions runs in parallel which creates quota issue. Hence dedicated host cannot be included on fscloud or upgrade test cases.

I have addressed all other comments.

Please advice.

@Louies-Jhony Louies-Jhony changed the title Test for a pipeline build Changes for Dedicated Host with Landing Zone VSI - Reg Jan 15, 2025
@Louies-Jhony
Copy link
Contributor Author

/run pipeline

@Louies-Jhony Louies-Jhony mentioned this pull request Jan 16, 2025
4 tasks
@Aashiq-J
Copy link
Member

This PR no longer valid.
Changes made in #780

@Aashiq-J Aashiq-J closed this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants