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

Add forcenew field markings for instance #19

Closed
wants to merge 4 commits into from
Closed
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
40 changes: 23 additions & 17 deletions ibm/service/power/resource_ibm_pi_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,19 @@ func ResourceIBMPIInstance() *schema.Resource {
Description: "Maximum memory size",
},
helpers.PIInstanceVolumeIds: {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
DiffSuppressFunc: flex.ApplyOnce,
Description: "List of PI volumes",
Type: schema.TypeSet,
ForceNew: true,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Description: "List of PI volumes",
},

helpers.PIInstanceUserData: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Description: "Base64 encoded data to be passed in for invoking a cloud init script",
},

helpers.PIInstanceStorageType: {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -154,10 +153,10 @@ func ResourceIBMPIInstance() *schema.Resource {
Description: "Indicates if all volumes attached to the server must reside in the same storage pool",
},
PIInstanceNetwork: {
Type: schema.TypeList,
Required: true,
DiffSuppressFunc: flex.ApplyOnce,
Description: "List of one or more networks to attach to the instance",
Type: schema.TypeList,
ForceNew: true,
Required: true,
Description: "List of one or more networks to attach to the instance",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"ip_address": {
Expand Down Expand Up @@ -190,13 +189,14 @@ func ResourceIBMPIInstance() *schema.Resource {
},
helpers.PIPlacementGroupID: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Description: "Placement group ID",
},
Arg_PIInstanceSharedProcessorPool: {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Optional: true,
ConflictsWith: []string{PISAPInstanceProfileID},
Description: "Shared Processor Pool the instance is deployed on",
},
Expand Down Expand Up @@ -247,10 +247,10 @@ func ResourceIBMPIInstance() *schema.Resource {
Description: "Instance processor type",
},
helpers.PIInstanceSSHKeyName: {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: flex.ApplyOnce,
Description: "SSH key name",
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Description: "SSH key name",
},
helpers.PIInstanceMemory: {
Type: schema.TypeFloat,
Expand All @@ -261,6 +261,7 @@ func ResourceIBMPIInstance() *schema.Resource {
},
PIInstanceDeploymentType: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Description: "Custom Deployment Type Information",
},
Expand All @@ -272,30 +273,35 @@ func ResourceIBMPIInstance() *schema.Resource {
},
PISAPInstanceDeploymentType: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Description: "Custom SAP Deployment Type Information",
},
helpers.PIInstanceSystemType: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
Computed: true,
Description: "PI Instance system type",
},
helpers.PIInstanceReplicants: {
Type: schema.TypeInt,
ForceNew: true,
Optional: true,
Default: 1,
Description: "PI Instance replicas count",
},
helpers.PIInstanceReplicationPolicy: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
ValidateFunc: validate.ValidateAllowedStringValues([]string{"affinity", "anti-affinity", "none"}),
Default: "none",
Description: "Replication policy for the PI Instance",
},
helpers.PIInstanceReplicationScheme: {
Type: schema.TypeString,
ForceNew: true,
Optional: true,
ValidateFunc: validate.ValidateAllowedStringValues([]string{"prefix", "suffix"}),
Default: "suffix",
Expand Down
Loading