Skip to content

Commit

Permalink
Fix resource type name for vault configuration
Browse files Browse the repository at this point in the history
Tidy up code
  • Loading branch information
alexhung committed Jul 30, 2024
1 parent 60b0d1d commit 25ecb2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type ReleaseBundleV2ResourceModel struct {
ServiceID types.String `tfsdk:"service_id"`
}

func (m ReleaseBundleV2ResourceModel) toAPIModel(ctx context.Context, apiModel *ReleaseBundleV2RequestAPIModel) (diags diag.Diagnostics) {
func (m ReleaseBundleV2ResourceModel) toAPIModel(_ context.Context, apiModel *ReleaseBundleV2RequestAPIModel) (diags diag.Diagnostics) {
sourceType := m.SourceType.ValueString()
source := ReleaseBundleV2SourceAPIModel{
AQL: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const (
var _ resource.Resource = &VaultConfigurationResource{}

func NewVaultConfigurationResource() resource.Resource {
return &VaultConfigurationResource{}
return &VaultConfigurationResource{
TypeName: "artifactory_vault_configuration",
}
}

type VaultConfigurationResource struct {
Expand Down Expand Up @@ -218,8 +220,7 @@ type VaultConfigurationConfigMountAPIModel struct {
}

func (r *VaultConfigurationResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_vault_configuration"
r.TypeName = resp.TypeName
resp.TypeName = r.TypeName
}

func (r *VaultConfigurationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
Expand Down

0 comments on commit 25ecb2b

Please sign in to comment.