Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump github.com/hewlettpackard/hpegl-metal-client from 1.5.10 to 1.5.11 #190

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 17 additions & 1 deletion internal/resources/resource_project.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// (C) Copyright 2020-2023 Hewlett Packard Enterprise Development LP
// (C) Copyright 2020-2024 Hewlett Packard Enterprise Development LP

package resources

Expand Down Expand Up @@ -32,6 +32,8 @@ const (
pPrivateNetworks = "private_networks"
pInstanceTypes = "instance_types"
pPermittedImages = "permitted_images"

pVolumeReplicationEnabled = "volume_replication_enabled"
)

func limitsSchema() map[string]*schema.Schema {
Expand Down Expand Up @@ -163,6 +165,14 @@ func projectSchema() map[string]*schema.Schema {
Type: schema.TypeString,
},
},

pVolumeReplicationEnabled: {
Type: schema.TypeBool,
Optional: true,
Default: false,
ForceNew: true,
Description: "Volume replication is enabled for the project if set.",
patricia-dibenedetto marked this conversation as resolved.
Show resolved Hide resolved
},
}
}

Expand Down Expand Up @@ -190,6 +200,8 @@ func resourceMetalProjectCreate(d *schema.ResourceData, meta interface{}) (err e

np := rest.NewProject{
Name: d.Get(pName).(string),

VolumeReplicationEnabled: d.Get(pVolumeReplicationEnabled).(bool),
}
patricia-dibenedetto marked this conversation as resolved.
Show resolved Hide resolved

if list, ok := d.Get(pProfile).([]interface{}); ok && len(list) == 1 {
Expand Down Expand Up @@ -372,6 +384,10 @@ func resourceMetalProjectRead(d *schema.ResourceData, meta interface{}) (err err
}
}

if err = d.Set(pVolumeReplicationEnabled, project.VolumeReplicationEnabled); err != nil {
return err //nolint:wrapcheck // defer func is wrapping the error.
}

return nil
}

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.52
1.3.53
Loading