SecretSyncArgs

data class SecretSyncArgs(val extendedLocation: Output<AzureResourceManagerCommonTypesExtendedLocationArgs>? = null, val forceSynchronization: Output<String>? = null, val kubernetesSecretType: Output<Either<String, KubernetesSecretType>>? = null, val location: Output<String>? = null, val objectSecretMapping: Output<List<KubernetesSecretObjectMappingArgs>>? = null, val resourceGroupName: Output<String>? = null, val secretProviderClassName: Output<String>? = null, val secretSyncName: Output<String>? = null, val serviceAccountName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SecretSyncArgs>

The SecretSync resource. Uses Azure REST API version 2024-08-21-preview. In version 2.x of the Azure Native provider, it used API version 2024-08-21-preview.

Example Usage

SecretSyncs_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var secretSync = new AzureNative.SecretSyncController.SecretSync("secretSync", new()
{
ExtendedLocation = new AzureNative.SecretSyncController.Inputs.AzureResourceManagerCommonTypesExtendedLocationArgs
{
Name = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-ssc-example/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location",
Type = AzureNative.SecretSyncController.ExtendedLocationType.CustomLocation,
},
KubernetesSecretType = AzureNative.SecretSyncController.KubernetesSecretType.Opaque,
Location = "eastus",
ObjectSecretMapping = new[]
{
new AzureNative.SecretSyncController.Inputs.KubernetesSecretObjectMappingArgs
{
SourcePath = "kv-secret-name/0",
TargetKey = "kv-secret-name/0",
},
},
ResourceGroupName = "rg-ssc-example",
SecretProviderClassName = "akvspc-ssc-example",
SecretSyncName = "secretsync-ssc-example",
ServiceAccountName = "example-k8s-sa-name",
Tags =
{
{ "example-tag", "example-tag-value" },
},
});
});
package main
import (
secretsynccontroller "github.com/pulumi/pulumi-azure-native-sdk/secretsynccontroller/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := secretsynccontroller.NewSecretSync(ctx, "secretSync", &secretsynccontroller.SecretSyncArgs{
ExtendedLocation: &secretsynccontroller.AzureResourceManagerCommonTypesExtendedLocationArgs{
Name: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-ssc-example/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location"),
Type: pulumi.String(secretsynccontroller.ExtendedLocationTypeCustomLocation),
},
KubernetesSecretType: pulumi.String(secretsynccontroller.KubernetesSecretTypeOpaque),
Location: pulumi.String("eastus"),
ObjectSecretMapping: secretsynccontroller.KubernetesSecretObjectMappingArray{
&secretsynccontroller.KubernetesSecretObjectMappingArgs{
SourcePath: pulumi.String("kv-secret-name/0"),
TargetKey: pulumi.String("kv-secret-name/0"),
},
},
ResourceGroupName: pulumi.String("rg-ssc-example"),
SecretProviderClassName: pulumi.String("akvspc-ssc-example"),
SecretSyncName: pulumi.String("secretsync-ssc-example"),
ServiceAccountName: pulumi.String("example-k8s-sa-name"),
Tags: pulumi.StringMap{
"example-tag": pulumi.String("example-tag-value"),
},
})
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.secretsynccontroller.SecretSync;
import com.pulumi.azurenative.secretsynccontroller.SecretSyncArgs;
import com.pulumi.azurenative.secretsynccontroller.inputs.AzureResourceManagerCommonTypesExtendedLocationArgs;
import com.pulumi.azurenative.secretsynccontroller.inputs.KubernetesSecretObjectMappingArgs;
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 secretSync = new SecretSync("secretSync", SecretSyncArgs.builder()
.extendedLocation(AzureResourceManagerCommonTypesExtendedLocationArgs.builder()
.name("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-ssc-example/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location")
.type("CustomLocation")
.build())
.kubernetesSecretType("Opaque")
.location("eastus")
.objectSecretMapping(KubernetesSecretObjectMappingArgs.builder()
.sourcePath("kv-secret-name/0")
.targetKey("kv-secret-name/0")
.build())
.resourceGroupName("rg-ssc-example")
.secretProviderClassName("akvspc-ssc-example")
.secretSyncName("secretsync-ssc-example")
.serviceAccountName("example-k8s-sa-name")
.tags(Map.of("example-tag", "example-tag-value"))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:secretsynccontroller:SecretSync secretsync-ssc-example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName}

Constructors

Link copied to clipboard
constructor(extendedLocation: Output<AzureResourceManagerCommonTypesExtendedLocationArgs>? = null, forceSynchronization: Output<String>? = null, kubernetesSecretType: Output<Either<String, KubernetesSecretType>>? = null, location: Output<String>? = null, objectSecretMapping: Output<List<KubernetesSecretObjectMappingArgs>>? = null, resourceGroupName: Output<String>? = null, secretProviderClassName: Output<String>? = null, secretSyncName: Output<String>? = null, serviceAccountName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard

The complex type of the extended location.

Link copied to clipboard
val forceSynchronization: Output<String>? = null

ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts.

Link copied to clipboard
val kubernetesSecretType: Output<Either<String, KubernetesSecretType>>? = null

Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard

An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val secretProviderClassName: Output<String>? = null

SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store.

Link copied to clipboard
val secretSyncName: Output<String>? = null

The name of the SecretSync

Link copied to clipboard
val serviceAccountName: Output<String>? = null

ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Functions

Link copied to clipboard
open override fun toJava(): SecretSyncArgs