Skip to content

Commit

Permalink
Merge pull request #529 from ovh/fix-0.36
Browse files Browse the repository at this point in the history
fix: multi-provider doesn't allow Required/Optional to have different value
  • Loading branch information
amstuta authored Jan 9, 2024
2 parents 3d80736 + c45118e commit 4d75568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ require (
)

go 1.20

retract v0.36.0 // OVH_ENDPOINT environment variable prevent a correct usage of the terraform provider
3 changes: 2 additions & 1 deletion ovh/provider_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ func (p *OvhProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"endpoint": schema.StringAttribute{
Optional: true,
Required: os.Getenv("OVH_ENDPOINT") == "",
Optional: os.Getenv("OVH_ENDPOINT") != "",
Description: descriptions["endpoint"],
},
"application_key": schema.StringAttribute{
Expand Down

0 comments on commit 4d75568

Please sign in to comment.