Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.workloadssap.kotlin
import com.pulumi.azure.workloadssap.kotlin.outputs.DiscoveryVirtualInstanceIdentity
import com.pulumi.azure.workloadssap.kotlin.outputs.DiscoveryVirtualInstanceIdentity.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [DiscoveryVirtualInstance].
*/
@PulumiTagMarker
public class DiscoveryVirtualInstanceResourceBuilder internal constructor() {
public var name: String? = null
public var args: DiscoveryVirtualInstanceArgs = DiscoveryVirtualInstanceArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend DiscoveryVirtualInstanceArgsBuilder.() -> Unit) {
val builder = DiscoveryVirtualInstanceArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): DiscoveryVirtualInstance {
val builtJavaResource =
com.pulumi.azure.workloadssap.DiscoveryVirtualInstance(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DiscoveryVirtualInstance(builtJavaResource)
}
}
/**
* Manages an SAP Discovery Virtual Instance.
* > **Note:** Before using this resource, it's required to submit the request of registering the Resource Provider with Azure CLI `az provider register --namespace "Microsoft.Workloads"`. The Resource Provider can take a while to register, you can check the status by running `az provider show --namespace "Microsoft.Workloads" --query "registrationState"`. Once this outputs "Registered" the Resource Provider is available for use.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-sapvis",
* location: "West Europe",
* });
* const exampleDiscoveryVirtualInstance = new azure.workloadssap.DiscoveryVirtualInstance("example", {
* name: "X01",
* resourceGroupName: example.name,
* location: example.location,
* environment: "NonProd",
* sapProduct: "S4HANA",
* centralServerVirtualMachineId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1",
* managedStorageAccountName: "managedsa",
* identity: {
* type: "UserAssigned",
* identityIds: ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"],
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-sapvis",
* location="West Europe")
* example_discovery_virtual_instance = azure.workloadssap.DiscoveryVirtualInstance("example",
* name="X01",
* resource_group_name=example.name,
* location=example.location,
* environment="NonProd",
* sap_product="S4HANA",
* central_server_virtual_machine_id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1",
* managed_storage_account_name="managedsa",
* identity={
* "type": "UserAssigned",
* "identity_ids": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"],
* })
* ```
* ```csharp
* 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-sapvis",
* Location = "West Europe",
* });
* var exampleDiscoveryVirtualInstance = new Azure.WorkloadsSAP.DiscoveryVirtualInstance("example", new()
* {
* Name = "X01",
* ResourceGroupName = example.Name,
* Location = example.Location,
* Environment = "NonProd",
* SapProduct = "S4HANA",
* CentralServerVirtualMachineId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1",
* ManagedStorageAccountName = "managedsa",
* Identity = new Azure.WorkloadsSAP.Inputs.DiscoveryVirtualInstanceIdentityArgs
* {
* Type = "UserAssigned",
* IdentityIds = new[]
* {
* "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/workloadssap"
* "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-sapvis"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = workloadssap.NewDiscoveryVirtualInstance(ctx, "example", &workloadssap.DiscoveryVirtualInstanceArgs{
* Name: pulumi.String("X01"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* Environment: pulumi.String("NonProd"),
* SapProduct: pulumi.String("S4HANA"),
* CentralServerVirtualMachineId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1"),
* ManagedStorageAccountName: pulumi.String("managedsa"),
* Identity: &workloadssap.DiscoveryVirtualInstanceIdentityArgs{
* Type: pulumi.String("UserAssigned"),
* IdentityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.workloadssap.DiscoveryVirtualInstance;
* import com.pulumi.azure.workloadssap.DiscoveryVirtualInstanceArgs;
* import com.pulumi.azure.workloadssap.inputs.DiscoveryVirtualInstanceIdentityArgs;
* 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-sapvis")
* .location("West Europe")
* .build());
* var exampleDiscoveryVirtualInstance = new DiscoveryVirtualInstance("exampleDiscoveryVirtualInstance", DiscoveryVirtualInstanceArgs.builder()
* .name("X01")
* .resourceGroupName(example.name())
* .location(example.location())
* .environment("NonProd")
* .sapProduct("S4HANA")
* .centralServerVirtualMachineId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1")
* .managedStorageAccountName("managedsa")
* .identity(DiscoveryVirtualInstanceIdentityArgs.builder()
* .type("UserAssigned")
* .identityIds("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-sapvis
* location: West Europe
* exampleDiscoveryVirtualInstance:
* type: azure:workloadssap:DiscoveryVirtualInstance
* name: example
* properties:
* name: X01
* resourceGroupName: ${example.name}
* location: ${example.location}
* environment: NonProd
* sapProduct: S4HANA
* centralServerVirtualMachineId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/csvm1
* managedStorageAccountName: managedsa
* identity:
* type: UserAssigned
* identityIds:
* - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai1
* ```
*
* ## Import
* SAP Discovery Virtual Instances can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:workloadssap/discoveryVirtualInstance:DiscoveryVirtualInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Workloads/sapVirtualInstances/vis1
* ```
*/
public class DiscoveryVirtualInstance internal constructor(
override val javaResource: com.pulumi.azure.workloadssap.DiscoveryVirtualInstance,
) : KotlinCustomResource(javaResource, DiscoveryVirtualInstanceMapper) {
/**
* The ID of the Virtual Machine of the Central Server. Changing this forces a new resource to be created.
*/
public val centralServerVirtualMachineId: Output
get() = javaResource.centralServerVirtualMachineId().applyValue({ args0 -> args0 })
/**
* The environment type for the SAP Discovery Virtual Instance. Possible values are `NonProd` and `Prod`. Changing this forces a new resource to be created.
*/
public val environment: Output
get() = javaResource.environment().applyValue({ args0 -> args0 })
/**
* An `identity` block as defined below.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
}).orElse(null)
})
/**
* The Azure Region where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of the managed Resource Group for the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
*/
public val managedResourceGroupName: Output?
get() = javaResource.managedResourceGroupName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the custom Storage Account created by the service in the managed Resource Group. Changing this forces a new resource to be created.
*/
public val managedStorageAccountName: Output?
get() = javaResource.managedStorageAccountName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the name of the SAP Discovery Virtual Instance. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The name of the Resource Group where the SAP Discovery Virtual Instance should exist. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The SAP Product type for the SAP Discovery Virtual Instance. Possible values are `ECC`, `Other` and `S4HANA`. Changing this forces a new resource to be created.
*/
public val sapProduct: Output
get() = javaResource.sapProduct().applyValue({ args0 -> args0 })
/**
* A mapping of tags which should be assigned to the SAP Discovery Virtual Instance.
*/
public val tags: Output