We recommend using Azure Native.
azure.containerservice.FleetUpdateStrategy
Explore with Pulumi AI
Manages a Kubernetes Fleet Update Strategy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "westeurope",
});
const exampleKubernetesFleetManager = new azure.containerservice.KubernetesFleetManager("example", {
location: example.location,
name: "example",
resourceGroupName: example.name,
});
const exampleFleetUpdateStrategy = new azure.containerservice.FleetUpdateStrategy("example", {
name: "example",
kubernetesFleetManagerId: exampleKubernetesFleetManager.id,
stages: [{
name: "example-stage-1",
groups: [{
name: "example-group-1",
}],
afterStageWaitInSeconds: 21,
}],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-rg",
location="westeurope")
example_kubernetes_fleet_manager = azure.containerservice.KubernetesFleetManager("example",
location=example.location,
name="example",
resource_group_name=example.name)
example_fleet_update_strategy = azure.containerservice.FleetUpdateStrategy("example",
name="example",
kubernetes_fleet_manager_id=example_kubernetes_fleet_manager.id,
stages=[{
"name": "example-stage-1",
"groups": [{
"name": "example-group-1",
}],
"after_stage_wait_in_seconds": 21,
}])
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-rg"),
Location: pulumi.String("westeurope"),
})
if err != nil {
return err
}
exampleKubernetesFleetManager, err := containerservice.NewKubernetesFleetManager(ctx, "example", &containerservice.KubernetesFleetManagerArgs{
Location: example.Location,
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
_, err = containerservice.NewFleetUpdateStrategy(ctx, "example", &containerservice.FleetUpdateStrategyArgs{
Name: pulumi.String("example"),
KubernetesFleetManagerId: exampleKubernetesFleetManager.ID(),
Stages: containerservice.FleetUpdateStrategyStageArray{
&containerservice.FleetUpdateStrategyStageArgs{
Name: pulumi.String("example-stage-1"),
Groups: containerservice.FleetUpdateStrategyStageGroupArray{
&containerservice.FleetUpdateStrategyStageGroupArgs{
Name: pulumi.String("example-group-1"),
},
},
AfterStageWaitInSeconds: pulumi.Int(21),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-rg",
Location = "westeurope",
});
var exampleKubernetesFleetManager = new Azure.ContainerService.KubernetesFleetManager("example", new()
{
Location = example.Location,
Name = "example",
ResourceGroupName = example.Name,
});
var exampleFleetUpdateStrategy = new Azure.ContainerService.FleetUpdateStrategy("example", new()
{
Name = "example",
KubernetesFleetManagerId = exampleKubernetesFleetManager.Id,
Stages = new[]
{
new Azure.ContainerService.Inputs.FleetUpdateStrategyStageArgs
{
Name = "example-stage-1",
Groups = new[]
{
new Azure.ContainerService.Inputs.FleetUpdateStrategyStageGroupArgs
{
Name = "example-group-1",
},
},
AfterStageWaitInSeconds = 21,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.KubernetesFleetManager;
import com.pulumi.azure.containerservice.KubernetesFleetManagerArgs;
import com.pulumi.azure.containerservice.FleetUpdateStrategy;
import com.pulumi.azure.containerservice.FleetUpdateStrategyArgs;
import com.pulumi.azure.containerservice.inputs.FleetUpdateStrategyStageArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-rg")
.location("westeurope")
.build());
var exampleKubernetesFleetManager = new KubernetesFleetManager("exampleKubernetesFleetManager", KubernetesFleetManagerArgs.builder()
.location(example.location())
.name("example")
.resourceGroupName(example.name())
.build());
var exampleFleetUpdateStrategy = new FleetUpdateStrategy("exampleFleetUpdateStrategy", FleetUpdateStrategyArgs.builder()
.name("example")
.kubernetesFleetManagerId(exampleKubernetesFleetManager.id())
.stages(FleetUpdateStrategyStageArgs.builder()
.name("example-stage-1")
.groups(FleetUpdateStrategyStageGroupArgs.builder()
.name("example-group-1")
.build())
.afterStageWaitInSeconds(21)
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-rg
location: westeurope
exampleKubernetesFleetManager:
type: azure:containerservice:KubernetesFleetManager
name: example
properties:
location: ${example.location}
name: example
resourceGroupName: ${example.name}
exampleFleetUpdateStrategy:
type: azure:containerservice:FleetUpdateStrategy
name: example
properties:
name: example
kubernetesFleetManagerId: ${exampleKubernetesFleetManager.id}
stages:
- name: example-stage-1
groups:
- name: example-group-1
afterStageWaitInSeconds: 21
Create FleetUpdateStrategy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FleetUpdateStrategy(name: string, args: FleetUpdateStrategyArgs, opts?: CustomResourceOptions);
@overload
def FleetUpdateStrategy(resource_name: str,
args: FleetUpdateStrategyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FleetUpdateStrategy(resource_name: str,
opts: Optional[ResourceOptions] = None,
kubernetes_fleet_manager_id: Optional[str] = None,
stages: Optional[Sequence[FleetUpdateStrategyStageArgs]] = None,
name: Optional[str] = None)
func NewFleetUpdateStrategy(ctx *Context, name string, args FleetUpdateStrategyArgs, opts ...ResourceOption) (*FleetUpdateStrategy, error)
public FleetUpdateStrategy(string name, FleetUpdateStrategyArgs args, CustomResourceOptions? opts = null)
public FleetUpdateStrategy(String name, FleetUpdateStrategyArgs args)
public FleetUpdateStrategy(String name, FleetUpdateStrategyArgs args, CustomResourceOptions options)
type: azure:containerservice:FleetUpdateStrategy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FleetUpdateStrategyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FleetUpdateStrategyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FleetUpdateStrategyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FleetUpdateStrategyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FleetUpdateStrategyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var fleetUpdateStrategyResource = new Azure.ContainerService.FleetUpdateStrategy("fleetUpdateStrategyResource", new()
{
KubernetesFleetManagerId = "string",
Stages = new[]
{
new Azure.ContainerService.Inputs.FleetUpdateStrategyStageArgs
{
Groups = new[]
{
new Azure.ContainerService.Inputs.FleetUpdateStrategyStageGroupArgs
{
Name = "string",
},
},
Name = "string",
AfterStageWaitInSeconds = 0,
},
},
Name = "string",
});
example, err := containerservice.NewFleetUpdateStrategy(ctx, "fleetUpdateStrategyResource", &containerservice.FleetUpdateStrategyArgs{
KubernetesFleetManagerId: pulumi.String("string"),
Stages: containerservice.FleetUpdateStrategyStageArray{
&containerservice.FleetUpdateStrategyStageArgs{
Groups: containerservice.FleetUpdateStrategyStageGroupArray{
&containerservice.FleetUpdateStrategyStageGroupArgs{
Name: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
AfterStageWaitInSeconds: pulumi.Int(0),
},
},
Name: pulumi.String("string"),
})
var fleetUpdateStrategyResource = new FleetUpdateStrategy("fleetUpdateStrategyResource", FleetUpdateStrategyArgs.builder()
.kubernetesFleetManagerId("string")
.stages(FleetUpdateStrategyStageArgs.builder()
.groups(FleetUpdateStrategyStageGroupArgs.builder()
.name("string")
.build())
.name("string")
.afterStageWaitInSeconds(0)
.build())
.name("string")
.build());
fleet_update_strategy_resource = azure.containerservice.FleetUpdateStrategy("fleetUpdateStrategyResource",
kubernetes_fleet_manager_id="string",
stages=[{
"groups": [{
"name": "string",
}],
"name": "string",
"afterStageWaitInSeconds": 0,
}],
name="string")
const fleetUpdateStrategyResource = new azure.containerservice.FleetUpdateStrategy("fleetUpdateStrategyResource", {
kubernetesFleetManagerId: "string",
stages: [{
groups: [{
name: "string",
}],
name: "string",
afterStageWaitInSeconds: 0,
}],
name: "string",
});
type: azure:containerservice:FleetUpdateStrategy
properties:
kubernetesFleetManagerId: string
name: string
stages:
- afterStageWaitInSeconds: 0
groups:
- name: string
name: string
FleetUpdateStrategy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The FleetUpdateStrategy resource accepts the following input properties:
- Kubernetes
Fleet stringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Stages
List<Fleet
Update Strategy Stage> - One or more
stage
blocks as defined below. - Name string
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Kubernetes
Fleet stringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Stages
[]Fleet
Update Strategy Stage Args - One or more
stage
blocks as defined below. - Name string
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- kubernetes
Fleet StringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages
List<Fleet
Update Strategy Stage> - One or more
stage
blocks as defined below. - name String
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- kubernetes
Fleet stringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages
Fleet
Update Strategy Stage[] - One or more
stage
blocks as defined below. - name string
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- kubernetes_
fleet_ strmanager_ id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages
Sequence[Fleet
Update Strategy Stage Args] - One or more
stage
blocks as defined below. - name str
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- kubernetes
Fleet StringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages List<Property Map>
- One or more
stage
blocks as defined below. - name String
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the FleetUpdateStrategy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FleetUpdateStrategy Resource
Get an existing FleetUpdateStrategy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FleetUpdateStrategyState, opts?: CustomResourceOptions): FleetUpdateStrategy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
kubernetes_fleet_manager_id: Optional[str] = None,
name: Optional[str] = None,
stages: Optional[Sequence[FleetUpdateStrategyStageArgs]] = None) -> FleetUpdateStrategy
func GetFleetUpdateStrategy(ctx *Context, name string, id IDInput, state *FleetUpdateStrategyState, opts ...ResourceOption) (*FleetUpdateStrategy, error)
public static FleetUpdateStrategy Get(string name, Input<string> id, FleetUpdateStrategyState? state, CustomResourceOptions? opts = null)
public static FleetUpdateStrategy get(String name, Output<String> id, FleetUpdateStrategyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Kubernetes
Fleet stringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Name string
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Stages
List<Fleet
Update Strategy Stage> - One or more
stage
blocks as defined below.
- Kubernetes
Fleet stringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Name string
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- Stages
[]Fleet
Update Strategy Stage Args - One or more
stage
blocks as defined below.
- kubernetes
Fleet StringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- name String
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages
List<Fleet
Update Strategy Stage> - One or more
stage
blocks as defined below.
- kubernetes
Fleet stringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- name string
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages
Fleet
Update Strategy Stage[] - One or more
stage
blocks as defined below.
- kubernetes_
fleet_ strmanager_ id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- name str
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages
Sequence[Fleet
Update Strategy Stage Args] - One or more
stage
blocks as defined below.
- kubernetes
Fleet StringManager Id - The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- name String
- The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
- stages List<Property Map>
- One or more
stage
blocks as defined below.
Supporting Types
FleetUpdateStrategyStage, FleetUpdateStrategyStageArgs
- Groups
List<Fleet
Update Strategy Stage Group> - One or more
group
blocks as defined below. - Name string
- The name which should be used for this stage.
- After
Stage intWait In Seconds - Specifies the time in seconds to wait at the end of this stage before starting the next one.
- Groups
[]Fleet
Update Strategy Stage Group - One or more
group
blocks as defined below. - Name string
- The name which should be used for this stage.
- After
Stage intWait In Seconds - Specifies the time in seconds to wait at the end of this stage before starting the next one.
- groups
List<Fleet
Update Strategy Stage Group> - One or more
group
blocks as defined below. - name String
- The name which should be used for this stage.
- after
Stage IntegerWait In Seconds - Specifies the time in seconds to wait at the end of this stage before starting the next one.
- groups
Fleet
Update Strategy Stage Group[] - One or more
group
blocks as defined below. - name string
- The name which should be used for this stage.
- after
Stage numberWait In Seconds - Specifies the time in seconds to wait at the end of this stage before starting the next one.
- groups
Sequence[Fleet
Update Strategy Stage Group] - One or more
group
blocks as defined below. - name str
- The name which should be used for this stage.
- after_
stage_ intwait_ in_ seconds - Specifies the time in seconds to wait at the end of this stage before starting the next one.
- groups List<Property Map>
- One or more
group
blocks as defined below. - name String
- The name which should be used for this stage.
- after
Stage NumberWait In Seconds - Specifies the time in seconds to wait at the end of this stage before starting the next one.
FleetUpdateStrategyStageGroup, FleetUpdateStrategyStageGroupArgs
- Name string
- The name which should be used for this group.
- Name string
- The name which should be used for this group.
- name String
- The name which should be used for this group.
- name string
- The name which should be used for this group.
- name str
- The name which should be used for this group.
- name String
- The name which should be used for this group.
Import
Kubernetes Fleet Update Strategies can be imported using the resource id
, e.g.
$ pulumi import azure:containerservice/fleetUpdateStrategy:FleetUpdateStrategy example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.ContainerService/fleets/fleet1/updateStrategies/updateStrategy1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.