
com.pulumi.azurenative.kubernetesconfiguration.FluxConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.kubernetesconfiguration;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.kubernetesconfiguration.FluxConfigurationArgs;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.AzureBlobDefinitionResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.BucketDefinitionResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.GitRepositoryDefinitionResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.KustomizationDefinitionResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.ObjectStatusDefinitionResponse;
import com.pulumi.azurenative.kubernetesconfiguration.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The Flux Configuration object returned in Get & Put response.
* Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2021-11-01-preview.
*
* Other available API versions: 2021-11-01-preview, 2022-01-01-preview, 2024-04-01-preview.
*
* ## Example Usage
* ### Create Flux Configuration
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.kubernetesconfiguration.FluxConfiguration;
* import com.pulumi.azurenative.kubernetesconfiguration.FluxConfigurationArgs;
* import com.pulumi.azurenative.kubernetesconfiguration.inputs.GitRepositoryDefinitionArgs;
* import com.pulumi.azurenative.kubernetesconfiguration.inputs.RepositoryRefDefinitionArgs;
* 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 fluxConfiguration = new FluxConfiguration("fluxConfiguration", FluxConfigurationArgs.builder()
* .clusterName("clusterName1")
* .clusterResourceName("connectedClusters")
* .clusterRp("Microsoft.Kubernetes")
* .fluxConfigurationName("srs-fluxconfig")
* .gitRepository(GitRepositoryDefinitionArgs.builder()
* .httpsCACert("ZXhhbXBsZWNlcnRpZmljYXRl")
* .repositoryRef(RepositoryRefDefinitionArgs.builder()
* .branch("master")
* .build())
* .syncIntervalInSeconds(600)
* .timeoutInSeconds(600)
* .url("https://github.com/Azure/arc-k8s-demo")
* .build())
* .kustomizations(Map.ofEntries(
* Map.entry("srs-kustomization1", Map.ofEntries(
* Map.entry("dependsOn", ),
* Map.entry("path", "./test/path"),
* Map.entry("postBuild", Map.ofEntries(
* Map.entry("substitute", Map.ofEntries(
* Map.entry("cluster_env", "prod"),
* Map.entry("replica_count", "2")
* )),
* Map.entry("substituteFrom", Map.ofEntries(
* Map.entry("kind", "ConfigMap"),
* Map.entry("name", "cluster-test"),
* Map.entry("optional", true)
* ))
* )),
* Map.entry("syncIntervalInSeconds", 600),
* Map.entry("timeoutInSeconds", 600),
* Map.entry("wait", true)
* )),
* Map.entry("srs-kustomization2", Map.ofEntries(
* Map.entry("dependsOn", "srs-kustomization1"),
* Map.entry("path", "./other/test/path"),
* Map.entry("postBuild", Map.of("substituteFrom",
* Map.ofEntries(
* Map.entry("kind", "ConfigMap"),
* Map.entry("name", "cluster-values"),
* Map.entry("optional", true)
* ),
* Map.ofEntries(
* Map.entry("kind", "Secret"),
* Map.entry("name", "secret-name"),
* Map.entry("optional", false)
* ))),
* Map.entry("prune", false),
* Map.entry("retryIntervalInSeconds", 600),
* Map.entry("syncIntervalInSeconds", 600),
* Map.entry("timeoutInSeconds", 600),
* Map.entry("wait", false)
* ))
* ))
* .namespace("srs-namespace")
* .reconciliationWaitDuration("PT30M")
* .resourceGroupName("rg1")
* .scope("cluster")
* .sourceKind("GitRepository")
* .suspend(false)
* .waitForReconciliation(true)
* .build());
*
* }
* }
*
* }
*
* ### Create Flux Configuration with Bucket Source Kind
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.kubernetesconfiguration.FluxConfiguration;
* import com.pulumi.azurenative.kubernetesconfiguration.FluxConfigurationArgs;
* import com.pulumi.azurenative.kubernetesconfiguration.inputs.BucketDefinitionArgs;
* 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 fluxConfiguration = new FluxConfiguration("fluxConfiguration", FluxConfigurationArgs.builder()
* .bucket(BucketDefinitionArgs.builder()
* .accessKey("fluxminiotest")
* .bucketName("flux")
* .syncIntervalInSeconds(1000)
* .timeoutInSeconds(1000)
* .url("https://fluxminiotest.az.minio.io")
* .build())
* .clusterName("clusterName1")
* .clusterResourceName("connectedClusters")
* .clusterRp("Microsoft.Kubernetes")
* .fluxConfigurationName("srs-fluxconfig")
* .kustomizations(Map.ofEntries(
* Map.entry("srs-kustomization1", Map.ofEntries(
* Map.entry("dependsOn", ),
* Map.entry("path", "./test/path"),
* Map.entry("syncIntervalInSeconds", 600),
* Map.entry("timeoutInSeconds", 600)
* )),
* Map.entry("srs-kustomization2", Map.ofEntries(
* Map.entry("dependsOn", "srs-kustomization1"),
* Map.entry("path", "./other/test/path"),
* Map.entry("prune", false),
* Map.entry("retryIntervalInSeconds", 600),
* Map.entry("syncIntervalInSeconds", 600),
* Map.entry("timeoutInSeconds", 600)
* ))
* ))
* .namespace("srs-namespace")
* .resourceGroupName("rg1")
* .scope("cluster")
* .sourceKind("Bucket")
* .suspend(false)
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:kubernetesconfiguration:FluxConfiguration srs-fluxconfig /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}
* ```
*
*/
@ResourceType(type="azure-native:kubernetesconfiguration:FluxConfiguration")
public class FluxConfiguration extends com.pulumi.resources.CustomResource {
/**
* Parameters to reconcile to the AzureBlob source kind type.
*
*/
@Export(name="azureBlob", refs={AzureBlobDefinitionResponse.class}, tree="[0]")
private Output* @Nullable */ AzureBlobDefinitionResponse> azureBlob;
/**
* @return Parameters to reconcile to the AzureBlob source kind type.
*
*/
public Output> azureBlob() {
return Codegen.optional(this.azureBlob);
}
/**
* Parameters to reconcile to the Bucket source kind type.
*
*/
@Export(name="bucket", refs={BucketDefinitionResponse.class}, tree="[0]")
private Output* @Nullable */ BucketDefinitionResponse> bucket;
/**
* @return Parameters to reconcile to the Bucket source kind type.
*
*/
public Output> bucket() {
return Codegen.optional(this.bucket);
}
/**
* Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects.
*
*/
@Export(name="complianceState", refs={String.class}, tree="[0]")
private Output complianceState;
/**
* @return Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects.
*
*/
public Output complianceState() {
return this.complianceState;
}
/**
* Key-value pairs of protected configuration settings for the configuration
*
*/
@Export(name="configurationProtectedSettings", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> configurationProtectedSettings;
/**
* @return Key-value pairs of protected configuration settings for the configuration
*
*/
public Output>> configurationProtectedSettings() {
return Codegen.optional(this.configurationProtectedSettings);
}
/**
* Error message returned to the user in the case of provisioning failure.
*
*/
@Export(name="errorMessage", refs={String.class}, tree="[0]")
private Output errorMessage;
/**
* @return Error message returned to the user in the case of provisioning failure.
*
*/
public Output errorMessage() {
return this.errorMessage;
}
/**
* Parameters to reconcile to the GitRepository source kind type.
*
*/
@Export(name="gitRepository", refs={GitRepositoryDefinitionResponse.class}, tree="[0]")
private Output* @Nullable */ GitRepositoryDefinitionResponse> gitRepository;
/**
* @return Parameters to reconcile to the GitRepository source kind type.
*
*/
public Output> gitRepository() {
return Codegen.optional(this.gitRepository);
}
/**
* Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.
*
*/
@Export(name="kustomizations", refs={Map.class,String.class,KustomizationDefinitionResponse.class}, tree="[0,1,2]")
private Output* @Nullable */ Map> kustomizations;
/**
* @return Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.
*
*/
public Output>> kustomizations() {
return Codegen.optional(this.kustomizations);
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.
*
*/
@Export(name="namespace", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> namespace;
/**
* @return The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.
*
*/
public Output> namespace() {
return Codegen.optional(this.namespace);
}
/**
* Status of the creation of the fluxConfiguration.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Status of the creation of the fluxConfiguration.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* Maximum duration to wait for flux configuration reconciliation. E.g PT1H, PT5M, P1D
*
*/
@Export(name="reconciliationWaitDuration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> reconciliationWaitDuration;
/**
* @return Maximum duration to wait for flux configuration reconciliation. E.g PT1H, PT5M, P1D
*
*/
public Output> reconciliationWaitDuration() {
return Codegen.optional(this.reconciliationWaitDuration);
}
/**
* Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).
*
*/
@Export(name="repositoryPublicKey", refs={String.class}, tree="[0]")
private Output repositoryPublicKey;
/**
* @return Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).
*
*/
public Output repositoryPublicKey() {
return this.repositoryPublicKey;
}
/**
* Scope at which the operator will be installed.
*
*/
@Export(name="scope", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> scope;
/**
* @return Scope at which the operator will be installed.
*
*/
public Output> scope() {
return Codegen.optional(this.scope);
}
/**
* Source Kind to pull the configuration data from.
*
*/
@Export(name="sourceKind", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> sourceKind;
/**
* @return Source Kind to pull the configuration data from.
*
*/
public Output> sourceKind() {
return Codegen.optional(this.sourceKind);
}
/**
* Branch and/or SHA of the source commit synced with the cluster.
*
*/
@Export(name="sourceSyncedCommitId", refs={String.class}, tree="[0]")
private Output sourceSyncedCommitId;
/**
* @return Branch and/or SHA of the source commit synced with the cluster.
*
*/
public Output sourceSyncedCommitId() {
return this.sourceSyncedCommitId;
}
/**
* Datetime the fluxConfiguration synced its source on the cluster.
*
*/
@Export(name="sourceUpdatedAt", refs={String.class}, tree="[0]")
private Output sourceUpdatedAt;
/**
* @return Datetime the fluxConfiguration synced its source on the cluster.
*
*/
public Output sourceUpdatedAt() {
return this.sourceUpdatedAt;
}
/**
* Datetime the fluxConfiguration synced its status on the cluster with Azure.
*
*/
@Export(name="statusUpdatedAt", refs={String.class}, tree="[0]")
private Output statusUpdatedAt;
/**
* @return Datetime the fluxConfiguration synced its status on the cluster with Azure.
*
*/
public Output statusUpdatedAt() {
return this.statusUpdatedAt;
}
/**
* Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration.
*
*/
@Export(name="statuses", refs={List.class,ObjectStatusDefinitionResponse.class}, tree="[0,1]")
private Output> statuses;
/**
* @return Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration.
*
*/
public Output> statuses() {
return this.statuses;
}
/**
* Whether this configuration should suspend its reconciliation of its kustomizations and sources.
*
*/
@Export(name="suspend", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> suspend;
/**
* @return Whether this configuration should suspend its reconciliation of its kustomizations and sources.
*
*/
public Output> suspend() {
return Codegen.optional(this.suspend);
}
/**
* 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
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return 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
*
*/
public Output systemData() {
return this.systemData;
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
* Whether flux configuration deployment should wait for cluster to reconcile the kustomizations.
*
*/
@Export(name="waitForReconciliation", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> waitForReconciliation;
/**
* @return Whether flux configuration deployment should wait for cluster to reconcile the kustomizations.
*
*/
public Output> waitForReconciliation() {
return Codegen.optional(this.waitForReconciliation);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public FluxConfiguration(java.lang.String name) {
this(name, FluxConfigurationArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public FluxConfiguration(java.lang.String name, FluxConfigurationArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public FluxConfiguration(java.lang.String name, FluxConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:kubernetesconfiguration:FluxConfiguration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private FluxConfiguration(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:kubernetesconfiguration:FluxConfiguration", name, null, makeResourceOptions(options, id), false);
}
private static FluxConfigurationArgs makeArgs(FluxConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? FluxConfigurationArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20211101preview:FluxConfiguration").build()),
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220101preview:FluxConfiguration").build()),
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220301:FluxConfiguration").build()),
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20220701:FluxConfiguration").build()),
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20221101:FluxConfiguration").build()),
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20230501:FluxConfiguration").build()),
Output.of(Alias.builder().type("azure-native:kubernetesconfiguration/v20240401preview:FluxConfiguration").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static FluxConfiguration get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new FluxConfiguration(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy