feat(telemetry link): Onboarding TelemetryLink#1456
Conversation
Fyusel
left a comment
There was a problem hiding this comment.
Added some first review comments, need to have a deeper look
| "display_name": config.StringVariable("tf-acc-test-link-max"), | ||
| "description": config.StringVariable("tf-acc-test-link-description"), | ||
| "access_token": config.StringVariable("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30"), | ||
| "telemetry_router_id": config.StringVariable("97272f10-87ec-4715-b280-195a4ab1856c"), |
There was a problem hiding this comment.
This won't work here. Where does this ID come from? Manually created telemetry router?
Those acc tests should work without manual steps so if there are additional resources required you need to add those to the resource-min.tf and resource-max.tf. Same for access_token
| Status types.String `tfsdk:"status"` | ||
| } | ||
|
|
||
| type telemetryLinkLinkDataSource struct { |
| resp.TypeName = req.ProviderTypeName + "_telemetrylink" | ||
| } | ||
|
|
||
| func (r *telemetryLinkInstanceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { |
There was a problem hiding this comment.
Hm, I saw that for telemetryrouter this is defined:
resp.TypeName = req.ProviderTypeName + "_telemetryrouter_instance" with a instance folder
Here is just
resp.TypeName = req.ProviderTypeName + "_telemetrylink"
but the struct is called telemetryLinkInstanceResource
If the name instance is feasible here and makes sense I would propose to rename this like the following:
Folder name: instance instead of link
Struct: keep instance
Provider name: resp.TypeName = req.ProviderTypeName + "_telemetrylink_instance"
(of course the other occurrences need to be updated as well)
This would also help in the future when new parts of the telemetrylink service are added.
| "telemetry_router_id": schema.StringAttribute{ | ||
| Description: schemaDescriptions["telemetry_router_id"], | ||
| Required: true, | ||
| }, |
There was a problem hiding this comment.
telemetry_router_id is listed as required, description above is optional, please modify the order that the required fields are on top.
| return newVars | ||
| } | ||
|
|
||
| func TestAccTelemetryLinkLinkMin(t *testing.T) { |
| }) | ||
| } | ||
|
|
||
| func TestAccTelemetryLinkLinkMax(t *testing.T) { |
Description
TelemetryLink service resources and datasources.
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)