-
Notifications
You must be signed in to change notification settings - Fork 50
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
HCCP-138 breaking changes for Peering and TGW attachment #128
HCCP-138 breaking changes for Peering and TGW attachment #128
Conversation
9929b0a
to
dbf389c
Compare
Well written @smaant 💪 ,as hvn_routes are a new concept to users. In your description can you refer/link to the docs for that? Either way, I am thinking...
|
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.
Excellent work! 👍 We paired on testing all the migration steps and they worked as expected. ✅
@xargs-P I've updated description to include a link to the |
* HCCP-138 required id and removed cidr from peering * HCCP-138 fixed tgw-attachment resource import * HCCP-138 removed cidrs from tgw-attachment * bonus: drop deleted guide example * update peering examples in guides Co-authored-by: Brenna Hewer-Darroch <[email protected]>
* HCCP-138 required id and removed cidr from peering * HCCP-138 fixed tgw-attachment resource import * HCCP-138 removed cidrs from tgw-attachment * bonus: drop deleted guide example * update peering examples in guides Co-authored-by: Brenna Hewer-Darroch <[email protected]>
* HCCP-138 required id and removed cidr from peering * HCCP-138 fixed tgw-attachment resource import * HCCP-138 removed cidrs from tgw-attachment * bonus: drop deleted guide example * update peering examples in guides Co-authored-by: Brenna Hewer-Darroch <[email protected]>
* HCCP-91 HVN route resource (#122) * added create, scaffolded read and delete for hvn route resource * Adds delete for HVN route resource * Adds hvn route import function * Handle both peering and tgw attachment resource types in HVN route resources * Regenerate docs, add example s for hvn route resource * Re-run go generate after adding example * ACreate hvn route function checks for target existence before proceeding * Add peering to example for hvn route, regenerate docs * Resolves comments - better logging and commenting for HVN route resource * removed unnecessary validation * removed todos * removed tgw attachment from hvn route example * added examples of the hvn route target * moved hvn route creation into clients * simplified parsing target_link for the hvn route resource * dropped checking for hvn route existance * fixed hvn routes import * gofmt hvn_route.go * redo hvn route import to use route ID * go mod tidy * redo hvn route datasource to use route ID * renamed hvn -> hvn_link * refactored WaitForHVNRouteToBeActive * unified hvn route errors/logs * small refactoring * improved logs * messages improvements * regenarated docs * HCCP-138 breaking changes for Peering and TGW attachment (#128) * HCCP-138 required id and removed cidr from peering * HCCP-138 fixed tgw-attachment resource import * HCCP-138 removed cidrs from tgw-attachment * bonus: drop deleted guide example * update peering examples in guides * HVN route migration guide (#129) * add note to changelog * update readme * add hvn route migration guide * id -> ID * bonus: fix error typo * go gen * add context to HVN route intro * update link in banner to registry migration guide * update changelog * update version in examples * add warning banner to hvn route doc * added handling 404 when deleting hvn route (#137) * HCCP-184 acceptance tests for HVN route, TGW attachment and network peering (#130) * HCCP-184 added acceptance tests for HVN route resource * HCCP-184 added acceptance tests for TGW attachment resource * HCCP-184 added acceptance tests for network peering resource * HCCP-138 added clarification about AWS credentials * HCCP-184 renamed tgw attachment acceptance test resource * HCCP-184 improved tests doc * HCCP-184 fixed test after rebasing * added dedicated timeout for hvn route delete (#138) Co-authored-by: Ti Zhang <[email protected]> Co-authored-by: Anton Panferov <[email protected]> Co-authored-by: Brenna Hewer-Darroch <[email protected]>
🛠️ Description
This PR introduces a few breaking changes:
hcp_aws_network_peering
resource now requirespeering_id
to be specified and doesn't acceptpeer_vpc_cidr_block
hcp_aws_network_peering
datasource no longer returnspeer_vpc_cidr_block
hcp_aws_transit_gateway_attachment
resource doesn't acceptdestination_cidrs
anymorehcp_aws_transit_gateway_attachment
datasource no longer returnsdestination_cidrs
In order to associate CIDRs with Peerings and TGW attachments one would have to use
hcp_hvn_route
resource, example:Migrating existing Terraform managed Peerings and TGW attachments
There are two ways to migrate existing Peerings and TGW attachments managed by Terraform:
Recreate Resources with Updated Schema
hcp_aws_network_peering
andhcp_aws_transit_gateway_attachment
resources.terraform apply
to destroy currently existing connections.hcp_aws_network_peering
andhcp_aws_transit_gateway_attachment
resource definitions to match the new schema.hcp_hvn_route
resources for each CIDR targeting corresponding peering connections or transit gateway attachment.terraform apply
to recreate connections.Re-Import with Updated Syntax:
hcp_aws_network_peering
andhcp_aws_transit_gateway_attachment
resource definitions to match the new schema. All values needed can be found on the details pages of Peerings and TGW attachment in the HCP UI.hcp_hvn_route
resources for each CIDR targeting corresponding peering connections or transit gateway attachments.terraform import hcp_hvn_route.<route-name> <hvn-id>:<hvn-route-id>
for eachhcp_hvn_route
.<hvn-route-id>
can be found on the details pages of the corresponding HVN connection in the HCP UI.terraform plan
and make sure that there are no changes detected by the Terraform.Example of Re-Importing Peering:
Given:
Rewrite it to the new schema and add corresponding HVN route:
Run
import
for thehcp_hvn_route
:Run
terraform plan
to make sure there are no changes detected by the Terraform:Example of Re-Importing TGW Attachment:
Given:
Rewrite it to the new schema and add corresponding HVN route:
Run
import
for eachhcp_hvn_route
you've added:Run
terraform plan
to make sure there are no changes detected by the Terraform: