Target Args
data class TargetArgs(val location: Output<String>? = null, val targetResourceId: Output<String>? = null, val targetType: Output<String>? = null) : ConvertibleToJava<TargetArgs>
Manages a Chaos Studio Target.
Example Usage
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.KubernetesCluster;
import com.pulumi.azure.containerservice.KubernetesClusterArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterIdentityArgs;
import com.pulumi.azure.chaosstudio.Target;
import com.pulumi.azure.chaosstudio.TargetArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
.name("example")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.dnsPrefix("acctestaksexample")
.defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
.name("example-value")
.nodeCount("example-value")
.vmSize("example-value")
.build())
.identity(KubernetesClusterIdentityArgs.builder()
.type("example-value")
.build())
.build());
var exampleTarget = new Target("exampleTarget", TargetArgs.builder()
.location(exampleResourceGroup.location())
.targetResourceId(example.id())
.targetType("example-value")
.build());
}
}
Content copied to clipboard
Import
An existing Chaos Studio Target can be imported into Terraform using the resource id
, e.g.
$ pulumi import azure:chaosstudio/target:Target example /{scope}/providers/Microsoft.Chaos/targets/{targetName}
Content copied to clipboard
Where
{scope}
is the ID of the Azure Resource under which the Chaos Studio Target exists. For example/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group
.Where
{targetName}
is the name of the Target. For exampletargetValue
.
Constructors
Link copied to clipboard
fun TargetArgs(location: Output<String>? = null, targetResourceId: Output<String>? = null, targetType: Output<String>? = null)
Functions
Properties
Link copied to clipboard
The name of the Chaos Studio Target. This has the format of publisher-targetType e.g. Microsoft-StorageAccount
. For supported values please see this Target Type column in this table. Changing this forces a new Chaos Studio Target to be created.