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

Adding new resources to support BGP Route Filters in direct link gateway #4294

Merged
merged 12 commits into from
Apr 10, 2023
Merged

Adding new resources to support BGP Route Filters in direct link gateway #4294

merged 12 commits into from
Apr 10, 2023

Conversation

sushmitha1506
Copy link
Contributor

@sushmitha1506 sushmitha1506 commented Jan 23, 2023

TC-After-Comments-Fix.pdf

Description of the Changes

As part of the addition of the BGP Route Filter to the direct link, do support the terraform to add the export/import filter to the direct link gateway.
As part of this implementation, we have modified the existing direct link gateway resource block used to create a direct link.
And added 4 new data blocks to read all export/import route filters and to read the given export/import filter.

And addressed the delta changes with respect to terraform and API Spec, As part of these changes, below attributes are added to the gateway creation resources ( ibm_dl_gateway )and respected data blocks.(ibm_dl_gateways & ibm_dl_gateway)

"bgp_status_updated_at"
"link_status_updated_at" 
"default_export_route_filter" 
"default_import_route_filter" 

Reference API Spec

APISpec

Modified the resources

 1. ibm_dl_gateway 

Modified the data blocks

 1. ibm_dl_gateways
 2. ibm_dl_gateway

New datasources

1. ibm_dl_export_route_filters
5. ibm_dl_export_route_filter
6. ibm_dl_import_route_filters
7. ibm_dl_import_route_filter

Output from acceptance testing:

 terraform-provider-ibm % make testacc TEST=./ibm/service/directlink TESTARGS='-run=TestAccIBMDLExportRouteFilterDataSource_basic'    
=== RUN   TestAccIBMDLExportRouteFilterDataSource_basic
--- PASS: TestAccIBMDLExportRouteFilterDataSource_basic (513.34s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	514.927s
 terraform-provider-ibm % make testacc TEST=./ibm/service/directlink TESTARGS='-run=TestAccIBMDLExportRouteFiltersDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/directlink -v -run=TestAccIBMDLExportRouteFiltersDataSource_basic -timeout 700m
=== RUN   TestAccIBMDLExportRouteFiltersDataSource_basic
--- PASS: TestAccIBMDLExportRouteFiltersDataSource_basic (376.51s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	377.772s
==> Checking that code complies with gofmt requirements...
=== RUN   TestAccIBMDLImportRouteFiltersDataSource_basic
--- PASS: TestAccIBMDLImportRouteFiltersDataSource_basic (194.17s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	195.448s
 terraform-provider-ibm % make testacc TEST=./ibm/service/directlink TESTARGS='-run=TestAccIBMDLImportRouteFilterDataSource_basic' 
==> Checking that code complies with gofmt requirements...
=== RUN   TestAccIBMDLImportRouteFilterDataSource_basic
--- PASS: TestAccIBMDLImportRouteFilterDataSource_basic (378.12s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	379.294s
terraform-provider-ibm % make testacc TEST=./ibm/service/directlink TESTARGS='-run=TestAccIBMDLGatewayConnect_basic'           
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/directlink -v -run=TestAccIBMDLGatewayConnect_basic -timeout 700m
=== RUN   TestAccIBMDLGatewayConnect_basic

--- PASS: TestAccIBMDLGatewayConnect_basic (715.03s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/directlink	716.261s

Test Result

Sample_terrafrom.txt
TEstResult-BGPRouteFilters.pdf
TR-New-att-GW.pdf

Changes with respect to CIS

Added Preload option to Security Headers of Zone Settings for CIS.
"preload": Whether or not to permit browsers to preload security_header config.
CLI documentation for the same -https://cloud.ibm.com/docs/cli?topic=cli-cis-cli#update-domain-settings

Output from acceptance testing:

arpit-mac@Arpits-MacBook-Pro terraform-provider-ibm % make testacc TEST=./ibm/service/cis TESTARGS='-run=TestAccIBMCisSettings_Basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/cis -v -run=TestAccIBMCisSettings_Basic -timeout 700m
=== RUN TestAccIBMCisSettings_Basic
--- PASS: TestAccIBMCisSettings_Basic (1.603s)
PASS
ok github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cis 1.603s

…dified existing direct link gateway to add BGP Route filter
@sushmitha1506 sushmitha1506 changed the title Added new data blocks to support Direct Link BGP Route filters and m… Adding new resources to support BGP Route Filters in direct link gateway Jan 23, 2023
sushmitha M added 2 commits January 24, 2023 17:09
…dified existing direct link gateway to add BGP Route filter
…dified existing direct link gateway to add BGP Route filter
Copy link
Member

@MalarvizhiK MalarvizhiK left a comment

Choose a reason for hiding this comment

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

Please also add "specific_prefixes" in example. prefix may become deprecated.

cisDomainSettingsSecurityHeaderPreload: {
Type: schema.TypeBool,
Description: "security header preload",
Required: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be breaking change we can't include Required directly mark it as optional

@hkantare hkantare merged commit 9bd771a into IBM-Cloud:master Apr 10, 2023
omaraibrahim pushed a commit to omaraibrahim/terraform-provider-ibm that referenced this pull request Jul 20, 2023
…way (IBM-Cloud#4294)

* Added new data blocks  to support Direct Link BGP Route filters and modified existing direct link gateway to add BGP Route filter

* Added new data blocks  to support Direct Link BGP Route filters and modified existing direct link gateway to add BGP Route filter

* Added new data blocks  to support Direct Link BGP Route filters and modified existing direct link gateway to add BGP Route filter

* addressed reveiw comments

* addressed review comments

* Fixed review comments

* addressed review comments

* addressed review comments

* addressed review comments

---------

Co-authored-by: sushmitha M <sushmitham@sushmithas-MacBook-Pro.local>
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.

4 participants