-
Notifications
You must be signed in to change notification settings - Fork 45
feat: add dynamic_routes bool to routing_table #1110
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
base: main
Are you sure you want to change the base?
feat: add dynamic_routes bool to routing_table #1110
Conversation
Add the optional bool flag "dynamic_routes" to the routing_table resource.
bf34b1c to
16c916a
Compare
stackit/internal/services/iaasalpha/routingtable/shared/shared.go
Outdated
Show resolved
Hide resolved
stackit/internal/services/iaasalpha/routingtable/shared/shared.go
Outdated
Show resolved
Hide resolved
stackit/internal/services/iaasalpha/routingtable/table/resource.go
Outdated
Show resolved
Hide resolved
| resource.TestCheckResourceAttr("data.stackit_routing_table.routing_table", "region", testutil.Region), | ||
| resource.TestCheckNoResourceAttr("data.stackit_routing_table.routing_table", "description"), | ||
| resource.TestCheckResourceAttr("data.stackit_routing_table.routing_table", "system_routes", "true"), | ||
| resource.TestCheckResourceAttr("stackit_routing_table.routing_table", "dynamic_routes", "true"), |
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.
| resource.TestCheckResourceAttr("stackit_routing_table.routing_table", "dynamic_routes", "true"), | |
| resource.TestCheckResourceAttr("data.stackit_routing_table.routing_table", "dynamic_routes", "true"), |
I guess you want to test the datasource here? Currently you're testing the resource 😄
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.
Yes, fixed
| "dynamic_routes": schema.BoolAttribute{ | ||
| Description: "This controls whether dynamic routes are propagated to this routing table", | ||
| Optional: true, | ||
| Computed: true, |
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.
Why is it marked as computed? 😅
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.
If you do not provide a value it is provided by the provider. Same as with system_routes where it is handled the same.
Add the optional bool flag "dynamic_routes" to the routing_table resource.
Description
Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)