Skip to content

Commit

Permalink
fix: Project persistence settings basepath should be set with a defau…
Browse files Browse the repository at this point in the history
…lt(".octopus") if not provided
  • Loading branch information
mik-ky committed Dec 23, 2024
1 parent 1dbb5c7 commit 8781a2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions octopusdeploy_framework/schemas/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (p ProjectSchema) GetResourceSchema() resourceSchema.Schema {
NestedObject: resourceSchema.NestedBlockObject{
Attributes: map[string]resourceSchema.Attribute{
"url": util.ResourceString().Required().Description("The URL associated with these version control settings.").Build(),
"base_path": util.ResourceString().Optional().Description("The base path associated with these version control settings.").Build(),
"base_path": util.ResourceString().Optional().Computed().Default(".octopus").Description("The base path associated with these version control settings.").Build(),
"default_branch": util.ResourceString().Optional().Description("The default branch associated with these version control settings.").Build(),
"protected_branches": util.ResourceSet(types.StringType).Optional().Computed().PlanModifiers(setplanmodifier.UseStateForUnknown()).Description("A list of protected branch patterns.").Build(),
},
Expand All @@ -90,7 +90,7 @@ func (p ProjectSchema) GetResourceSchema() resourceSchema.Schema {
Attributes: map[string]resourceSchema.Attribute{
"git_credential_id": util.ResourceString().Required().Build(),
"url": util.ResourceString().Required().Description("The URL associated with these version control settings.").Build(),
"base_path": util.ResourceString().Optional().Description("The base path associated with these version control settings.").Build(),
"base_path": util.ResourceString().Optional().Computed().Default(".octopus").Description("The base path associated with these version control settings.").Build(),
"default_branch": util.ResourceString().Optional().Description("The default branch associated with these version control settings.").Build(),
"protected_branches": util.ResourceSet(types.StringType).Optional().Computed().PlanModifiers(setplanmodifier.UseStateForUnknown()).Description("A list of protected branch patterns.").Build(),
},
Expand All @@ -103,7 +103,7 @@ func (p ProjectSchema) GetResourceSchema() resourceSchema.Schema {
"url": util.ResourceString().Required().Description("The URL associated with these version control settings.").Build(),
"username": util.ResourceString().Required().Description("The username for the Git credential.").Build(),
"password": util.ResourceString().Sensitive().Required().Description("The password for the Git credential").Build(), //util.GetPasswordResourceSchema(false),
"base_path": util.ResourceString().Optional().Description("The base path associated with these version control settings.").Build(),
"base_path": util.ResourceString().Optional().Computed().Default(".octopus").Description("The base path associated with these version control settings.").Build(),
"default_branch": util.ResourceString().Optional().Description("The default branch associated with these version control settings.").Build(),
"protected_branches": util.ResourceSet(types.StringType).Optional().Computed().PlanModifiers(setplanmodifier.UseStateForUnknown()).Description("A list of protected branch patterns.").Build(),
},
Expand Down

0 comments on commit 8781a2f

Please sign in to comment.