Extension
The Extension Instance object. API Version: 2020-07-01-preview.
Example Usage
Create Extension
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var extension = new AzureNative.KubernetesConfiguration.Extension("extension", new()
{
AutoUpgradeMinorVersion = true,
ClusterName = "clusterName1",
ClusterResourceName = "connectedClusters",
ClusterRp = "Microsoft.Kubernetes",
ConfigurationProtectedSettings =
{
{ "omsagent.secret.key", "secretKeyValue01" },
},
ConfigurationSettings =
{
{ "omsagent.env.clusterName", "clusterName1" },
{ "omsagent.secret.wsid", "a38cef99-5a89-52ed-b6db-22095c23664b" },
},
ExtensionInstanceName = "ClusterMonitor",
ExtensionType = "azuremonitor-containers",
ReleaseTrain = "Preview",
ResourceGroupName = "rg1",
Scope = new AzureNative.KubernetesConfiguration.Inputs.ScopeArgs
{
Cluster = new AzureNative.KubernetesConfiguration.Inputs.ScopeClusterArgs
{
ReleaseNamespace = "kube-system",
},
},
});
});
package main
import (
kubernetesconfiguration "github.com/pulumi/pulumi-azure-native-sdk/kubernetesconfiguration"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kubernetesconfiguration.NewExtension(ctx, "extension", &kubernetesconfiguration.ExtensionArgs{
AutoUpgradeMinorVersion: pulumi.Bool(true),
ClusterName: pulumi.String("clusterName1"),
ClusterResourceName: pulumi.String("connectedClusters"),
ClusterRp: pulumi.String("Microsoft.Kubernetes"),
ConfigurationProtectedSettings: pulumi.StringMap{
"omsagent.secret.key": pulumi.String("secretKeyValue01"),
},
ConfigurationSettings: pulumi.StringMap{
"omsagent.env.clusterName": pulumi.String("clusterName1"),
"omsagent.secret.wsid": pulumi.String("a38cef99-5a89-52ed-b6db-22095c23664b"),
},
ExtensionInstanceName: pulumi.String("ClusterMonitor"),
ExtensionType: pulumi.String("azuremonitor-containers"),
ReleaseTrain: pulumi.String("Preview"),
ResourceGroupName: pulumi.String("rg1"),
Scope: kubernetesconfiguration.ScopeResponse{
Cluster: &kubernetesconfiguration.ScopeClusterArgs{
ReleaseNamespace: pulumi.String("kube-system"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.kubernetesconfiguration.Extension;
import com.pulumi.azurenative.kubernetesconfiguration.ExtensionArgs;
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 extension = new Extension("extension", ExtensionArgs.builder()
.autoUpgradeMinorVersion(true)
.clusterName("clusterName1")
.clusterResourceName("connectedClusters")
.clusterRp("Microsoft.Kubernetes")
.configurationProtectedSettings(Map.of("omsagent.secret.key", "secretKeyValue01"))
.configurationSettings(Map.ofEntries(
Map.entry("omsagent.env.clusterName", "clusterName1"),
Map.entry("omsagent.secret.wsid", "a38cef99-5a89-52ed-b6db-22095c23664b")
))
.extensionInstanceName("ClusterMonitor")
.extensionType("azuremonitor-containers")
.releaseTrain("Preview")
.resourceGroupName("rg1")
.scope(Map.of("cluster", Map.of("releaseNamespace", "kube-system")))
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:kubernetesconfiguration:Extension ClusterMonitor /subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor
Properties
Flag to note if this instance participates in auto upgrade of minor version, or not.
Configuration settings that are sensitive, as name-value pairs for configuring this instance of the extension.
Configuration settings, as name-value pairs for configuring this instance of the extension.
DateLiteral (per ISO8601) noting the time the resource was created by the client (user).
Error information from the Agent - e.g. errors during installation.
Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.
The identity of the configuration.
Status of installation of this instance of the extension.
DateLiteral (per ISO8601) noting the time the resource was modified by the client (user).
DateLiteral (per ISO8601) noting the time of last status from the agent.
ReleaseTrain this extension instance participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.
Scope at which the extension instance is installed.
Status from this instance of the extension.
Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources