From 063ae34d64ee67a727d4b038b9758f4be1cb4e3e Mon Sep 17 00:00:00 2001 From: shipperizer Date: Tue, 5 Nov 2024 14:06:44 +0000 Subject: [PATCH] feat: hook up new resource to the provider --- internal/provider/helpers.go | 9 +++++---- internal/provider/provider.go | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/provider/helpers.go b/internal/provider/helpers.go index 0ac70790..4e6ea5b7 100644 --- a/internal/provider/helpers.go +++ b/internal/provider/helpers.go @@ -16,10 +16,11 @@ import ( // // @module=juju.resource-application const ( - LogDataSourceMachine = "datasource-machine" - LogDataSourceModel = "datasource-model" - LogDataSourceOffer = "datasource-offer" - LogDataSourceSecret = "datasource-secret" + LogDataSourceApplication = "datasource-application" + LogDataSourceMachine = "datasource-machine" + LogDataSourceModel = "datasource-model" + LogDataSourceOffer = "datasource-offer" + LogDataSourceSecret = "datasource-secret" LogResourceApplication = "resource-application" LogResourceAccessModel = "resource-access-model" diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 4507dd78..bcc86c9b 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -389,6 +389,7 @@ func (p *jujuProvider) Resources(_ context.Context) []func() resource.Resource { // the Metadata method. All data sources must have unique names. func (p *jujuProvider) DataSources(_ context.Context) []func() datasource.DataSource { return []func() datasource.DataSource{ + func() datasource.DataSource { return NewApplicationDataSource() }, func() datasource.DataSource { return NewMachineDataSource() }, func() datasource.DataSource { return NewModelDataSource() }, func() datasource.DataSource { return NewOfferDataSource() },