Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/hashicorp/terraform-plugin-sdk v1.17.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.40.0
github.com/stretchr/testify v1.11.1
goauthentik.io/api/v3 v3.2026020.6
goauthentik.io/api/v3 v3.2026020.3-rc1
)

require (
Expand Down Expand Up @@ -79,7 +79,6 @@ require (
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/text v0.34.0 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
goauthentik.io/api/v3 v3.2026020.6 h1:ww545OfZAS0OayLkMQGheR3AsgQ2rc61vhRwSo9dBco=
goauthentik.io/api/v3 v3.2026020.6/go.mod h1:82lqAz4jxzl6Cg0YDbhNtvvTG2rm6605ZhdJFnbbsl8=
goauthentik.io/api/v3 v3.2026020.3-rc1 h1:PxLFiSPYAVZ4qIhstdUx6lD1XlO6ih/Wm2oit/6qq98=
goauthentik.io/api/v3 v3.2026020.3-rc1/go.mod h1:uYa+yGMglhJy8ymyUQ8KQiJjOb3UZTuPQ24Ot2s9BCo=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
Expand Down Expand Up @@ -553,8 +553,6 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=
golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
5 changes: 5 additions & 0 deletions pkg/helpers/paginate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ type PaginatorOptions struct {
PageSize int
}

const DefaultPageSize = 10

// Automatically fetch all objects from an API endpoint using the pagination
// data received from the server.
func Paginator[Tobj any, Treq any, Tres PaginatorResponse[Tobj]](
req PaginatorRequest[Treq, Tres],
opts PaginatorOptions,
) ([]Tobj, *http.Response, error) {
var bfreq, cfreq any
if opts.PageSize < 1 {
opts.PageSize = DefaultPageSize
}
fetchOffset := func(page int32) (Tres, *http.Response, error) {
bfreq = req.Page(page)
cfreq = bfreq.(PaginatorRequest[Treq, Tres]).PageSize(int32(opts.PageSize))
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_brand.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func dataSourceBrandRead(ctx context.Context, d *schema.ResourceData, m any) dia
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.CoreApi.CoreBrandsList(ctx)
req := c.client.CoreAPI.CoreBrandsList(ctx)
if s, ok := d.GetOk("domain"); ok {
req = req.Domain(s.(string))
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/provider/data_source_certificate_key_pair.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func dataSourceCertificateKeyPairRead(ctx context.Context, d *schema.ResourceDat
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.CryptoApi.CryptoCertificatekeypairsList(ctx)
req := c.client.CryptoAPI.CryptoCertificatekeypairsList(ctx)
if n, ok := d.GetOk("name"); ok {
req = req.Name(n.(string))
}
Expand All @@ -91,15 +91,15 @@ func dataSourceCertificateKeyPairRead(ctx context.Context, d *schema.ResourceDat
helpers.SetWrapper(d, "fingerprint256", f.FingerprintSha256.Get())

if d.Get("fetch_certificate").(bool) {
rc, hr, err := c.client.CryptoApi.CryptoCertificatekeypairsViewCertificateRetrieve(ctx, d.Id()).Execute()
rc, hr, err := c.client.CryptoAPI.CryptoCertificatekeypairsViewCertificateRetrieve(ctx, d.Id()).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
helpers.SetWrapper(d, "certificate_data", rc.Data+"\n")
}

if d.Get("fetch_key").(bool) {
rk, hr, err := c.client.CryptoApi.CryptoCertificatekeypairsViewPrivateKeyRetrieve(ctx, d.Id()).Execute()
rk, hr, err := c.client.CryptoAPI.CryptoCertificatekeypairsViewPrivateKeyRetrieve(ctx, d.Id()).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func dataSourceFlowRead(ctx context.Context, d *schema.ResourceData, m any) diag
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.FlowsApi.FlowsInstancesList(ctx)
req := c.client.FlowsAPI.FlowsInstancesList(ctx)
if s, ok := d.GetOk("slug"); ok {
req = req.Slug(s.(string))
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/data_source_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func setGroup(data *schema.ResourceData, group api.Group) diag.Diagnostics {
}

func dataSourceGroupReadByPk(ctx context.Context, d *schema.ResourceData, c *APIClient, pk string, includeUsers bool) diag.Diagnostics {
req := c.client.CoreApi.CoreGroupsRetrieve(ctx, pk)
req := c.client.CoreAPI.CoreGroupsRetrieve(ctx, pk)
req = req.IncludeUsers(includeUsers)

res, hr, err := req.Execute()
Expand All @@ -219,7 +219,7 @@ func dataSourceGroupReadByPk(ctx context.Context, d *schema.ResourceData, c *API
}

func dataSourceGroupReadByName(ctx context.Context, d *schema.ResourceData, c *APIClient, name string, includeUsers bool) diag.Diagnostics {
req := c.client.CoreApi.CoreGroupsList(ctx)
req := c.client.CoreAPI.CoreGroupsList(ctx)
req = req.IncludeUsers(includeUsers)
req = req.Name(name)

Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func dataSourceGroups() *schema.Resource {
func dataSourceGroupsRead(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
c := m.(*APIClient)

req := c.client.CoreApi.CoreGroupsList(ctx)
req := c.client.CoreAPI.CoreGroupsList(ctx)

for key, _schema := range dataSourceGroups().Schema {
var v any
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/data_source_outpost.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func dataSourceOutpostRead(ctx context.Context, d *schema.ResourceData, m any) d
c := m.(*APIClient)

if id, ok := d.GetOk("id"); ok {
res, hr, err := c.client.OutpostsApi.OutpostsInstancesRetrieve(ctx, id.(string)).Execute()
res, hr, err := c.client.OutpostsAPI.OutpostsInstancesRetrieve(ctx, id.(string)).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -41,7 +41,7 @@ func dataSourceOutpostRead(ctx context.Context, d *schema.ResourceData, m any) d
}

if name, ok := d.GetOk("name"); ok {
res, hr, err := c.client.OutpostsApi.OutpostsInstancesList(ctx).NameIexact(name.(string)).Execute()
res, hr, err := c.client.OutpostsAPI.OutpostsInstancesList(ctx).NameIexact(name.(string)).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_outpost_sc_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func dataOutpostServiceConnectionsKubernetesRead(ctx context.Context, d *schema.
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.OutpostsApi.OutpostsServiceConnectionsKubernetesList(ctx)
req := c.client.OutpostsAPI.OutpostsServiceConnectionsKubernetesList(ctx)
if s, ok := d.GetOk("name"); ok {
req = req.Name(s.(string))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func dataSourcePropertyMappingProviderRACRead(ctx context.Context, d *schema.Res
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.PropertymappingsApi.PropertymappingsProviderRacList(ctx)
req := c.client.PropertymappingsAPI.PropertymappingsProviderRacList(ctx)

if _, ok := d.GetOk("managed_list"); ok {
req = req.Managed(helpers.CastSlice[string](d, "managed_list"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func dataSourcePropertyMappingProviderRadiusRead(ctx context.Context, d *schema.
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.PropertymappingsApi.PropertymappingsProviderRadiusList(ctx)
req := c.client.PropertymappingsAPI.PropertymappingsProviderRadiusList(ctx)

if _, ok := d.GetOk("managed_list"); ok {
req = req.Managed(helpers.CastSlice[string](d, "managed_list"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func dataSourcePropertyMappingProviderSAMLRead(ctx context.Context, d *schema.Re
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.PropertymappingsApi.PropertymappingsProviderSamlList(ctx)
req := c.client.PropertymappingsAPI.PropertymappingsProviderSamlList(ctx)

if _, ok := d.GetOk("managed_list"); ok {
req = req.Managed(helpers.CastSlice[string](d, "managed_list"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func dataSourcePropertyMappingProviderSCIMRead(ctx context.Context, d *schema.Re
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.PropertymappingsApi.PropertymappingsProviderScimList(ctx)
req := c.client.PropertymappingsAPI.PropertymappingsProviderScimList(ctx)

if _, ok := d.GetOk("managed_list"); ok {
req = req.Managed(helpers.CastSlice[string](d, "managed_list"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func dataSourcePropertyMappingProviderScopeRead(ctx context.Context, d *schema.R
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.PropertymappingsApi.PropertymappingsProviderScopeList(ctx)
req := c.client.PropertymappingsAPI.PropertymappingsProviderScopeList(ctx)

if _, ok := d.GetOk("managed_list"); ok {
req = req.Managed(helpers.CastSlice[string](d, "managed_list"))
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_property_mapping_source_ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func dataSourcePropertyMappingSourceLDAPRead(ctx context.Context, d *schema.Reso
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.PropertymappingsApi.PropertymappingsSourceLdapList(ctx)
req := c.client.PropertymappingsAPI.PropertymappingsSourceLdapList(ctx)

if _, ok := d.GetOk("managed_list"); ok {
req = req.Managed(helpers.CastSlice[string](d, "managed_list"))
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/data_source_provider_oauth_config2.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func dataSourceProviderOAuth2ConfigRead(ctx context.Context, d *schema.ResourceD

id, ok := d.GetOk("provider_id")
if !ok {
req := c.client.ProvidersApi.ProvidersOauth2List(ctx)
req := c.client.ProvidersAPI.ProvidersOauth2List(ctx)
if m, ok := d.Get("name").(string); ok {
req = req.Name(m)
}
Expand All @@ -81,7 +81,7 @@ func dataSourceProviderOAuth2ConfigRead(ctx context.Context, d *schema.ResourceD
finalId := int32(id.(int))
d.SetId(strconv.FormatInt(int64(finalId), 10))

meta, hr, err := c.client.ProvidersApi.ProvidersOauth2SetupUrlsRetrieve(ctx, finalId).Execute()
meta, hr, err := c.client.ProvidersAPI.ProvidersOauth2SetupUrlsRetrieve(ctx, finalId).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/data_source_provider_saml_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func dataSourceProviderSAMLMetadataRead(ctx context.Context, d *schema.ResourceD

id, ok := d.GetOk("provider_id")
if !ok {
req := c.client.ProvidersApi.ProvidersSamlList(ctx)
req := c.client.ProvidersAPI.ProvidersSamlList(ctx)
if m, ok := d.Get("name").(string); ok {
req = req.Name(m)
}
Expand All @@ -58,7 +58,7 @@ func dataSourceProviderSAMLMetadataRead(ctx context.Context, d *schema.ResourceD
finalId := int32(id.(int))
d.SetId(strconv.FormatInt(int64(finalId), 10))

meta, hr, err := c.client.ProvidersApi.ProvidersSamlMetadataRetrieve(ctx, finalId).Execute()
meta, hr, err := c.client.ProvidersAPI.ProvidersSamlMetadataRetrieve(ctx, finalId).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_rbac_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func dataSourceRBACPermissionRead(ctx context.Context, d *schema.ResourceData, m
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.RbacApi.RbacPermissionsList(ctx)
req := c.client.RbacAPI.RbacPermissionsList(ctx)
if codename, ok := d.GetOk("codename"); ok {
req = req.Codename(codename.(string))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func dataSourceSourceRead(ctx context.Context, d *schema.ResourceData, m any) di
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.SourcesApi.SourcesAllList(ctx)
req := c.client.SourcesAPI.SourcesAllList(ctx)
if s, ok := d.GetOk("slug"); ok {
req = req.Slug(s.(string))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func dataSourceStageRead(ctx context.Context, d *schema.ResourceData, m any) dia
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.StagesApi.StagesAllList(ctx)
req := c.client.StagesAPI.StagesAllList(ctx)
if s, ok := d.GetOk("name"); ok {
req = req.Name(s.(string))
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func setUser(data *schema.ResourceData, user api.User) diag.Diagnostics {
}

func dataSourceUserReadByPk(ctx context.Context, d *schema.ResourceData, c *APIClient, pk int) diag.Diagnostics {
req := c.client.CoreApi.CoreUsersRetrieve(ctx, int32(pk))
req := c.client.CoreAPI.CoreUsersRetrieve(ctx, int32(pk))

res, hr, err := req.Execute()
if err != nil {
Expand All @@ -158,7 +158,7 @@ func dataSourceUserReadByPk(ctx context.Context, d *schema.ResourceData, c *APIC
}

func dataSourceUserReadByUsername(ctx context.Context, d *schema.ResourceData, c *APIClient, username string) diag.Diagnostics {
req := c.client.CoreApi.CoreUsersList(ctx)
req := c.client.CoreAPI.CoreUsersList(ctx)
req = req.Username(username)

res, hr, err := req.Execute()
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func dataSourceUsers() *schema.Resource {
func dataSourceUsersRead(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
c := m.(*APIClient)

req := c.client.CoreApi.CoreUsersList(ctx)
req := c.client.CoreAPI.CoreUsersList(ctx)

for key := range dataSourceUsers().Schema {
if v, ok := d.GetOk(key); ok {
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/data_source_webauthn_device_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func dataSourceWebAuthnDeviceTypeRead(ctx context.Context, d *schema.ResourceDat
var diags diag.Diagnostics
c := m.(*APIClient)

req := c.client.StagesApi.StagesAuthenticatorWebauthnDeviceTypesList(ctx)
req := c.client.StagesAPI.StagesAuthenticatorWebauthnDeviceTypesList(ctx)
if s, ok := d.GetOk("description"); ok {
req = req.Description(s.(string))
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func Provider(version string, testing bool) *schema.Provider {
"authentik_provider_saml": tr(resourceProviderSAML),
"authentik_provider_scim": tr(resourceProviderSCIM),
"authentik_provider_ssf": tr(resourceProviderSSF),
"authentik_provider_ws_federation": tr(resourceProviderWSFederation),
"authentik_rac_endpoint": tr(resourceRACEndpoint),
"authentik_rbac_initial_permissions": tr(resourceRBACInitialPermissions),
"authentik_rbac_permission_role": tr(resourceRBACRoleObjectPermission),
Expand Down Expand Up @@ -253,7 +254,7 @@ func providerConfigure(version string, testing bool) schema.ConfigureContextFunc
}
apiClient := api.NewAPIClient(config)

rootConfig, _, err := apiClient.RootApi.RootConfigRetrieve(context.Background()).Execute()
rootConfig, _, err := apiClient.RootAPI.RootConfigRetrieve(context.Background()).Execute()
if err == nil && rootConfig.ErrorReporting.Enabled {
dsn := ""
// Customisable Sentry DSN was added in 2022.11, so only use that DSN when its set
Expand Down
8 changes: 4 additions & 4 deletions pkg/provider/resource_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func resourceApplicationCreate(ctx context.Context, d *schema.ResourceData, m an

app := resourceApplicationSchemaToModel(d)

res, hr, err := c.client.CoreApi.CoreApplicationsCreate(ctx).ApplicationRequest(*app).Execute()
res, hr, err := c.client.CoreAPI.CoreApplicationsCreate(ctx).ApplicationRequest(*app).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -120,7 +120,7 @@ func resourceApplicationRead(ctx context.Context, d *schema.ResourceData, m any)
var diags diag.Diagnostics
c := m.(*APIClient)

res, hr, err := c.client.CoreApi.CoreApplicationsRetrieve(ctx, d.Id()).Execute()
res, hr, err := c.client.CoreAPI.CoreApplicationsRetrieve(ctx, d.Id()).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -146,7 +146,7 @@ func resourceApplicationUpdate(ctx context.Context, d *schema.ResourceData, m an

app := resourceApplicationSchemaToModel(d)

res, hr, err := c.client.CoreApi.CoreApplicationsUpdate(ctx, d.Id()).ApplicationRequest(*app).Execute()
res, hr, err := c.client.CoreAPI.CoreApplicationsUpdate(ctx, d.Id()).ApplicationRequest(*app).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -157,7 +157,7 @@ func resourceApplicationUpdate(ctx context.Context, d *schema.ResourceData, m an

func resourceApplicationDelete(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
c := m.(*APIClient)
hr, err := c.client.CoreApi.CoreApplicationsDestroy(ctx, d.Id()).Execute()
hr, err := c.client.CoreAPI.CoreApplicationsDestroy(ctx, d.Id()).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/provider/resource_application_entitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func resourceApplicationEntitlementCreate(ctx context.Context, d *schema.Resourc
return diags
}

res, hr, err := c.client.CoreApi.CoreApplicationEntitlementsCreate(ctx).ApplicationEntitlementRequest(*app).Execute()
res, hr, err := c.client.CoreAPI.CoreApplicationEntitlementsCreate(ctx).ApplicationEntitlementRequest(*app).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -71,7 +71,7 @@ func resourceApplicationEntitlementCreate(ctx context.Context, d *schema.Resourc
func resourceApplicationEntitlementRead(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
c := m.(*APIClient)

res, hr, err := c.client.CoreApi.CoreApplicationEntitlementsRetrieve(ctx, d.Id()).Execute()
res, hr, err := c.client.CoreAPI.CoreApplicationEntitlementsRetrieve(ctx, d.Id()).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -90,7 +90,7 @@ func resourceApplicationEntitlementUpdate(ctx context.Context, d *schema.Resourc
return diags
}

res, hr, err := c.client.CoreApi.CoreApplicationEntitlementsUpdate(ctx, d.Id()).ApplicationEntitlementRequest(*app).Execute()
res, hr, err := c.client.CoreAPI.CoreApplicationEntitlementsUpdate(ctx, d.Id()).ApplicationEntitlementRequest(*app).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand All @@ -101,7 +101,7 @@ func resourceApplicationEntitlementUpdate(ctx context.Context, d *schema.Resourc

func resourceApplicationEntitlementDelete(ctx context.Context, d *schema.ResourceData, m any) diag.Diagnostics {
c := m.(*APIClient)
hr, err := c.client.CoreApi.CoreApplicationEntitlementsDestroy(ctx, d.Id()).Execute()
hr, err := c.client.CoreAPI.CoreApplicationEntitlementsDestroy(ctx, d.Id()).Execute()
if err != nil {
return helpers.HTTPToDiag(d, hr, err)
}
Expand Down
Loading
Loading