Skip to content

Conversation

lewijacn
Copy link
Collaborator

@lewijacn lewijacn commented Oct 31, 2024

Description

Changes functionality to generate two CFN templates for create VPC and import VPC for bootstrap. As well as introduces VPC Id and Subnet intake from CFN parameters that will later be used when deploying the Migration Assistant CDK

Import VPC v1

image

Import VPC v2

image

Create VPC

image

Issues Resolved

https://opensearch.atlassian.net/browse/MIGRATIONS-2166

Is this a backport? If so, please add backport PR # and/or commits #

Testing

Manual CFN deployment testing
CDK tests

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.55%. Comparing base (dc326f0) to head (d03df5a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1113   +/-   ##
=========================================
  Coverage     80.55%   80.55%           
  Complexity     2930     2930           
=========================================
  Files           390      390           
  Lines         14462    14462           
  Branches        998      998           
=========================================
  Hits          11650    11650           
  Misses         2209     2209           
  Partials        603      603           
Flag Coverage Δ
gradle-test 78.63% <ø> (ø)
python-test 90.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lewijacn lewijacn marked this pull request as ready for review November 1, 2024 15:23
@peternied peternied self-assigned this Nov 1, 2024
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, I'll do another pass on the text-descriptions, but these are a huge improvement!

Signed-off-by: Tanner Lewis <[email protected]>
Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Thanks for those updates, a shame about the conditions being not very useful. Going into more nitpicky UX. Could you also see about reviewing the UX with product? - Happy to any additional changes happen out of band of this change.

Comment on lines +87 to +88
availabilityZones: [Fn.select(0, availabilityZones)],
privateSubnetIds: [Fn.select(0, privateSubnetIds)]
Copy link
Member

Choose a reason for hiding this comment

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

Why aren't we including all AZ's/subnets pairs specified by the customer?

Curious, if we don't need them to find the VPC, does this mean that we could accidentally allocate resources under subnets other than the ones specified by the user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My understanding is that since we are not doing lookup and instead essentially crafting parts of an existing VPC from attributes, we will only use attributes that we have specified and no lookup is actually happening. This CFN itself only needs one subnet and one AZ for our EC2 instance

@lewijacn lewijacn merged commit 5c7d575 into opensearch-project:main Nov 4, 2024
15 checks passed
@lewijacn lewijacn deleted the gen-two-solutions-templates branch August 4, 2025 15:46
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.

2 participants