From e37332a4f8cf3cf43ea937ae83ab276787d95901 Mon Sep 17 00:00:00 2001 From: stack72 Date: Wed, 13 Jul 2022 13:38:10 +0100 Subject: [PATCH] Upgrade to v1.79.0 of the SpotInst Terraform Provider --- .../cmd/pulumi-resource-spotinst/schema.json | 9 +++++++++ provider/go.mod | 4 ++-- provider/go.sum | 8 ++++---- .../Inputs/OceanUpdatePolicyRollConfigArgs.cs | 6 ++++++ .../OceanUpdatePolicyRollConfigGetArgs.cs | 6 ++++++ .../Outputs/OceanUpdatePolicyRollConfig.cs | 9 ++++++++- sdk/go/spotinst/aws/pulumiTypes.go | 19 +++++++++++++++++++ sdk/nodejs/types/input.ts | 4 ++++ sdk/nodejs/types/output.ts | 4 ++++ sdk/python/pulumi_spotinst/aws/_inputs.py | 18 +++++++++++++++++- sdk/python/pulumi_spotinst/aws/outputs.py | 16 +++++++++++++++- 11 files changed, 94 insertions(+), 9 deletions(-) diff --git a/provider/cmd/pulumi-resource-spotinst/schema.json b/provider/cmd/pulumi-resource-spotinst/schema.json index 1f56b1386..f3913a638 100644 --- a/provider/cmd/pulumi-resource-spotinst/schema.json +++ b/provider/cmd/pulumi-resource-spotinst/schema.json @@ -6342,6 +6342,15 @@ "mapCase": false } } + }, + "respectPdb": { + "type": "boolean", + "description": "During the roll, if the parameter is set to True we honor PDB during the instance replacement.", + "language": { + "python": { + "mapCase": false + } + } } }, "type": "object", diff --git a/provider/go.mod b/provider/go.mod index f43e58168..fec1d6028 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -13,7 +13,7 @@ replace ( github.com/hashicorp/terraform-exec => github.com/hashicorp/terraform-exec v0.15.0 github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220505215311-795430389fa7 github.com/hashicorp/vault => github.com/hashicorp/vault v1.2.0 - github.com/spotinst/terraform-provider-spotinst => github.com/pulumi/terraform-provider-spotinst v1.33.1-0.20220630132753-b477e3d735ce + github.com/spotinst/terraform-provider-spotinst => github.com/pulumi/terraform-provider-spotinst v1.33.1-0.20220713123322-00cce54c28eb ) require ( @@ -168,7 +168,7 @@ require ( github.com/spf13/cast v1.4.1 // indirect github.com/spf13/cobra v1.4.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spotinst/spotinst-sdk-go v1.122.0 // indirect + github.com/spotinst/spotinst-sdk-go v1.123.0 // indirect github.com/src-d/gcfg v1.4.0 // indirect github.com/stretchr/testify v1.7.2 // indirect github.com/terraform-providers/terraform-provider-archive v1.3.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index 55c65bedb..5d1723b2b 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -813,8 +813,8 @@ github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e h1:Di github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e/go.mod h1:sZ9FUzGO+yM41hsQHs/yIcj/Y993qMdBxBU5mpDmAfQ= github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220505215311-795430389fa7 h1:RAiGj0GniixD+G+HuUzFWZh2VKdQ50nv5+EmkKG1u3E= github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220505215311-795430389fa7/go.mod h1:TPjMXvpPNWagHzYOmVPzzRRIBTuaLVukR+esL08tgzg= -github.com/pulumi/terraform-provider-spotinst v1.33.1-0.20220630132753-b477e3d735ce h1:/wGwlMPQJqG6NMUkcSp6fD5WHKrUbPsO8RcIu0c1D0w= -github.com/pulumi/terraform-provider-spotinst v1.33.1-0.20220630132753-b477e3d735ce/go.mod h1:ym5VECfYnrcNSrV/k1Xzsnsmp04Qk0scURjWtPZoTcU= +github.com/pulumi/terraform-provider-spotinst v1.33.1-0.20220713123322-00cce54c28eb h1:vgQ00Nq5OvZeiZjN2SZmSwQHV/aWVUmjjzXOwurVGck= +github.com/pulumi/terraform-provider-spotinst v1.33.1-0.20220713123322-00cce54c28eb/go.mod h1:FDYtH9fBqqv8u5JD/rgetNHCSn3rZPKfblZcaVBXV0U= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= @@ -858,8 +858,8 @@ github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spotinst/spotinst-sdk-go v1.122.0 h1:AZhfF3MC6GgpmhhJkviYGrgpeLFphudtFkdNrCs+sVw= -github.com/spotinst/spotinst-sdk-go v1.122.0/go.mod h1:C6mrT7+mqOgPyabacjyYTvilu8Xm96mvTvrZQhj99WI= +github.com/spotinst/spotinst-sdk-go v1.123.0 h1:jgqbHhfUgKd8lyk5I2uKeYwbHglZfLQ4S+kPtxyt2Q0= +github.com/spotinst/spotinst-sdk-go v1.123.0/go.mod h1:C6mrT7+mqOgPyabacjyYTvilu8Xm96mvTvrZQhj99WI= github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigArgs.cs b/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigArgs.cs index 6c058b557..77f73d2e9 100644 --- a/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigArgs.cs +++ b/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigArgs.cs @@ -36,6 +36,12 @@ public InputList LaunchSpecIds set => _launchSpecIds = value; } + /// + /// During the roll, if the parameter is set to True we honor PDB during the instance replacement. + /// + [Input("respectPdb")] + public Input? RespectPdb { get; set; } + public OceanUpdatePolicyRollConfigArgs() { } diff --git a/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigGetArgs.cs b/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigGetArgs.cs index c3224dfe6..2d8ccee17 100644 --- a/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigGetArgs.cs +++ b/sdk/dotnet/Aws/Inputs/OceanUpdatePolicyRollConfigGetArgs.cs @@ -36,6 +36,12 @@ public InputList LaunchSpecIds set => _launchSpecIds = value; } + /// + /// During the roll, if the parameter is set to True we honor PDB during the instance replacement. + /// + [Input("respectPdb")] + public Input? RespectPdb { get; set; } + public OceanUpdatePolicyRollConfigGetArgs() { } diff --git a/sdk/dotnet/Aws/Outputs/OceanUpdatePolicyRollConfig.cs b/sdk/dotnet/Aws/Outputs/OceanUpdatePolicyRollConfig.cs index ce892aa06..4b720ad36 100644 --- a/sdk/dotnet/Aws/Outputs/OceanUpdatePolicyRollConfig.cs +++ b/sdk/dotnet/Aws/Outputs/OceanUpdatePolicyRollConfig.cs @@ -25,6 +25,10 @@ public sealed class OceanUpdatePolicyRollConfig /// List of virtual node group identifiers to be rolled. /// public readonly ImmutableArray LaunchSpecIds; + /// + /// During the roll, if the parameter is set to True we honor PDB during the instance replacement. + /// + public readonly bool? RespectPdb; [OutputConstructor] private OceanUpdatePolicyRollConfig( @@ -32,11 +36,14 @@ public sealed class OceanUpdatePolicyRollConfig int batchSizePercentage, - ImmutableArray launchSpecIds) + ImmutableArray launchSpecIds, + + bool? respectPdb) { BatchMinHealthyPercentage = batchMinHealthyPercentage; BatchSizePercentage = batchSizePercentage; LaunchSpecIds = launchSpecIds; + RespectPdb = respectPdb; } } } diff --git a/sdk/go/spotinst/aws/pulumiTypes.go b/sdk/go/spotinst/aws/pulumiTypes.go index b75ece58c..cccdcc875 100644 --- a/sdk/go/spotinst/aws/pulumiTypes.go +++ b/sdk/go/spotinst/aws/pulumiTypes.go @@ -20718,6 +20718,8 @@ type OceanUpdatePolicyRollConfig struct { BatchSizePercentage int `pulumi:"batchSizePercentage"` // List of virtual node group identifiers to be rolled. LaunchSpecIds []string `pulumi:"launchSpecIds"` + // During the roll, if the parameter is set to True we honor PDB during the instance replacement. + RespectPdb *bool `pulumi:"respectPdb"` } // OceanUpdatePolicyRollConfigInput is an input type that accepts OceanUpdatePolicyRollConfigArgs and OceanUpdatePolicyRollConfigOutput values. @@ -20738,6 +20740,8 @@ type OceanUpdatePolicyRollConfigArgs struct { BatchSizePercentage pulumi.IntInput `pulumi:"batchSizePercentage"` // List of virtual node group identifiers to be rolled. LaunchSpecIds pulumi.StringArrayInput `pulumi:"launchSpecIds"` + // During the roll, if the parameter is set to True we honor PDB during the instance replacement. + RespectPdb pulumi.BoolPtrInput `pulumi:"respectPdb"` } func (OceanUpdatePolicyRollConfigArgs) ElementType() reflect.Type { @@ -20832,6 +20836,11 @@ func (o OceanUpdatePolicyRollConfigOutput) LaunchSpecIds() pulumi.StringArrayOut return o.ApplyT(func(v OceanUpdatePolicyRollConfig) []string { return v.LaunchSpecIds }).(pulumi.StringArrayOutput) } +// During the roll, if the parameter is set to True we honor PDB during the instance replacement. +func (o OceanUpdatePolicyRollConfigOutput) RespectPdb() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OceanUpdatePolicyRollConfig) *bool { return v.RespectPdb }).(pulumi.BoolPtrOutput) +} + type OceanUpdatePolicyRollConfigPtrOutput struct{ *pulumi.OutputState } func (OceanUpdatePolicyRollConfigPtrOutput) ElementType() reflect.Type { @@ -20886,6 +20895,16 @@ func (o OceanUpdatePolicyRollConfigPtrOutput) LaunchSpecIds() pulumi.StringArray }).(pulumi.StringArrayOutput) } +// During the roll, if the parameter is set to True we honor PDB during the instance replacement. +func (o OceanUpdatePolicyRollConfigPtrOutput) RespectPdb() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OceanUpdatePolicyRollConfig) *bool { + if v == nil { + return nil + } + return v.RespectPdb + }).(pulumi.BoolPtrOutput) +} + type SuspensionSuspension struct { // The name of process to suspend. Valid values: `"AUTO_HEALING" , "OUT_OF_STRATEGY", "PREVENTIVE_REPLACEMENT", "REVERT_PREFERRED", or "SCHEDULING"`. Name string `pulumi:"name"` diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 486d3120e..0b71b7da0 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -2921,6 +2921,10 @@ export namespace aws { * List of virtual node group identifiers to be rolled. */ launchSpecIds?: pulumi.Input[]>; + /** + * During the roll, if the parameter is set to True we honor PDB during the instance replacement. + */ + respectPdb?: pulumi.Input; } export interface SuspensionSuspension { diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index c5c79128d..16ebb1aab 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -2921,6 +2921,10 @@ export namespace aws { * List of virtual node group identifiers to be rolled. */ launchSpecIds?: string[]; + /** + * During the roll, if the parameter is set to True we honor PDB during the instance replacement. + */ + respectPdb?: boolean; } export interface SuspensionSuspension { diff --git a/sdk/python/pulumi_spotinst/aws/_inputs.py b/sdk/python/pulumi_spotinst/aws/_inputs.py index 834d24c2b..c8eef1f71 100644 --- a/sdk/python/pulumi_spotinst/aws/_inputs.py +++ b/sdk/python/pulumi_spotinst/aws/_inputs.py @@ -9700,17 +9700,21 @@ class OceanUpdatePolicyRollConfigArgs: def __init__(__self__, *, batch_size_percentage: pulumi.Input[int], batch_min_healthy_percentage: Optional[pulumi.Input[int]] = None, - launch_spec_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + launch_spec_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + respect_pdb: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[int] batch_size_percentage: Sets the percentage of the instances to deploy in each batch. :param pulumi.Input[int] batch_min_healthy_percentage: Default: 50. Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch. :param pulumi.Input[Sequence[pulumi.Input[str]]] launch_spec_ids: List of virtual node group identifiers to be rolled. + :param pulumi.Input[bool] respect_pdb: During the roll, if the parameter is set to True we honor PDB during the instance replacement. """ pulumi.set(__self__, "batch_size_percentage", batch_size_percentage) if batch_min_healthy_percentage is not None: pulumi.set(__self__, "batch_min_healthy_percentage", batch_min_healthy_percentage) if launch_spec_ids is not None: pulumi.set(__self__, "launch_spec_ids", launch_spec_ids) + if respect_pdb is not None: + pulumi.set(__self__, "respect_pdb", respect_pdb) @property @pulumi.getter(name="batchSizePercentage") @@ -9748,6 +9752,18 @@ def launch_spec_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] def launch_spec_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "launch_spec_ids", value) + @property + @pulumi.getter(name="respectPdb") + def respect_pdb(self) -> Optional[pulumi.Input[bool]]: + """ + During the roll, if the parameter is set to True we honor PDB during the instance replacement. + """ + return pulumi.get(self, "respect_pdb") + + @respect_pdb.setter + def respect_pdb(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "respect_pdb", value) + @pulumi.input_type class SuspensionSuspensionArgs: diff --git a/sdk/python/pulumi_spotinst/aws/outputs.py b/sdk/python/pulumi_spotinst/aws/outputs.py index 7f73e9e43..56cf96d93 100644 --- a/sdk/python/pulumi_spotinst/aws/outputs.py +++ b/sdk/python/pulumi_spotinst/aws/outputs.py @@ -9748,6 +9748,8 @@ def __key_warning(key: str): suggest = "batch_min_healthy_percentage" elif key == "launchSpecIds": suggest = "launch_spec_ids" + elif key == "respectPdb": + suggest = "respect_pdb" if suggest: pulumi.log.warn(f"Key '{key}' not found in OceanUpdatePolicyRollConfig. Access the value via the '{suggest}' property getter instead.") @@ -9763,17 +9765,21 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, batch_size_percentage: int, batch_min_healthy_percentage: Optional[int] = None, - launch_spec_ids: Optional[Sequence[str]] = None): + launch_spec_ids: Optional[Sequence[str]] = None, + respect_pdb: Optional[bool] = None): """ :param int batch_size_percentage: Sets the percentage of the instances to deploy in each batch. :param int batch_min_healthy_percentage: Default: 50. Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch. :param Sequence[str] launch_spec_ids: List of virtual node group identifiers to be rolled. + :param bool respect_pdb: During the roll, if the parameter is set to True we honor PDB during the instance replacement. """ pulumi.set(__self__, "batch_size_percentage", batch_size_percentage) if batch_min_healthy_percentage is not None: pulumi.set(__self__, "batch_min_healthy_percentage", batch_min_healthy_percentage) if launch_spec_ids is not None: pulumi.set(__self__, "launch_spec_ids", launch_spec_ids) + if respect_pdb is not None: + pulumi.set(__self__, "respect_pdb", respect_pdb) @property @pulumi.getter(name="batchSizePercentage") @@ -9799,6 +9805,14 @@ def launch_spec_ids(self) -> Optional[Sequence[str]]: """ return pulumi.get(self, "launch_spec_ids") + @property + @pulumi.getter(name="respectPdb") + def respect_pdb(self) -> Optional[bool]: + """ + During the roll, if the parameter is set to True we honor PDB during the instance replacement. + """ + return pulumi.get(self, "respect_pdb") + @pulumi.output_type class SuspensionSuspension(dict):