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

Feat: add support for LPG #45

Merged
merged 1 commit into from
Aug 8, 2021

Conversation

kral2
Copy link
Contributor

@kral2 kral2 commented Jun 1, 2021

Fix #38

  • each vcn can have one or many lpg
  • peer_id argument is supported and optional
  • route_table_id is supported and optional

new example using this feature to build hub-and-spoke.

Copy link
Contributor

@hyder hyder left a comment

Choose a reason for hiding this comment

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

In a previous release, you also added a drg attachment : https://github.com/oracle-terraform-modules/terraform-oci-vcn/blob/main/vcn_gateways.tf#L207. See also issue #44

The problem is the following:

  1. A VCN can have only 1 DRG at a time but a DRG can have multiple attachment.
  2. The DRG attachment that is currently created in the VCN attaches the VCN to this DRG. However, we may need to specify additional parameters such as network details: See here: https://registry.terraform.io/providers/hashicorp/oci/latest/docs/resources/core_drg_attachment
  3. This is particularly relevant if have a firewall in the hub and we therefore need to specify a private IP address in a custom route table and attach this route table to the drg_attachment.

The drg_attachment should therefore be able to accept custom route table ids. Currently, it does not.

examples/hub-spoke/variables.tf Show resolved Hide resolved
examples/hub-spoke/main.tf Show resolved Hide resolved
@kral2 kral2 changed the title WIP: add support for LPG WIP: Feat: add support for LPG Jun 3, 2021
@kral2
Copy link
Contributor Author

kral2 commented Jun 3, 2021

In a previous release, you also added a drg attachment : https://github.com/oracle-terraform-modules/terraform-oci-vcn/blob/main/vcn_gateways.tf#L207. See also issue #44

The problem is the following:

1. A VCN can have only 1 DRG at a time but a DRG can have multiple attachment.

2. The DRG attachment that is currently created in the VCN attaches the VCN to this DRG. However, we may need to specify additional parameters such as network details: See here: https://registry.terraform.io/providers/hashicorp/oci/latest/docs/resources/core_drg_attachment

3. This is particularly relevant if have a firewall in the hub and we therefore need to specify a private IP address in a custom route table and attach this route table to the drg_attachment.

The drg_attachment should therefore be able to accept custom route table ids. Currently, it does not.

This PR is related to issue #38 only: creating and controlling LPGs. The DRG attachment problem is related to the new capabilities of the DRG and should be handled in a different issue. #46 opened for this subject and should probably be addressed together with #44 in the same PR.

vcn_gateways.tf Show resolved Hide resolved
@kral2 kral2 changed the title WIP: Feat: add support for LPG Feat: add support for LPG Aug 3, 2021
@kral2 kral2 requested a review from hyder August 3, 2021 19:20
@hyder hyder requested a review from slevey August 4, 2021 05:27
Copy link
Contributor

@hyder hyder left a comment

Choose a reason for hiding this comment

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

In the root terraform.tfvars.example, you need to provide a commented example of how these 2 variables will look like:

  • local_peering_gateways
  • internet_gateway_route_rules
  • nat_gateway_route_rules

In terraformoptions doc, you also need to add for:

  • local_peering_gateways

vcn_gateways.tf Show resolved Hide resolved
@kral2 kral2 requested a review from hyder August 4, 2021 17:52
hyder
hyder previously approved these changes Aug 6, 2021
- each vcn can have one or many lpg
- peer_id argument is supported and optional
- route_table_id is supported and optional

new example using this feature to build hub-and-spoke
Copy link
Contributor

@hyder hyder left a comment

Choose a reason for hiding this comment

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

approved. some minor grammatical mistakes in the docs but we can fix that later

@kral2 kral2 merged commit 8840466 into oracle-terraform-modules:main Aug 8, 2021
@kral2 kral2 deleted the 38_add_LPG_support branch August 27, 2021 14:41
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.

add Local Peering Gateway support
3 participants