All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
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.
com.pulumi.azure.network.kotlin.IPGroupCIDRArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.IPGroupCIDRArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages IP Group CIDR records.
* > Warning Do not use this resource at the same time as the `cidrs` property of the
* `azure.network.IPGroup` resource for the same IP Group. Doing so will cause a conflict and
* CIDRS will be removed.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "test-rg",
* location: "West Europe",
* });
* const exampleIPGroup = new azure.network.IPGroup("example", {
* name: "test-ipgroup",
* location: example.location,
* resourceGroupName: example.name,
* });
* const exampleIPGroupCIDR = new azure.network.IPGroupCIDR("example", {
* ipGroupId: exampleIPGroup.id,
* cidr: "10.10.10.0/24",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="test-rg",
* location="West Europe")
* example_ip_group = azure.network.IPGroup("example",
* name="test-ipgroup",
* location=example.location,
* resource_group_name=example.name)
* example_ip_group_cidr = azure.network.IPGroupCIDR("example",
* ip_group_id=example_ip_group.id,
* cidr="10.10.10.0/24")
* ```
* ```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 = "test-rg",
* Location = "West Europe",
* });
* var exampleIPGroup = new Azure.Network.IPGroup("example", new()
* {
* Name = "test-ipgroup",
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var exampleIPGroupCIDR = new Azure.Network.IPGroupCIDR("example", new()
* {
* IpGroupId = exampleIPGroup.Id,
* Cidr = "10.10.10.0/24",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "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("test-rg"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleIPGroup, err := network.NewIPGroup(ctx, "example", &network.IPGroupArgs{
* Name: pulumi.String("test-ipgroup"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* _, err = network.NewIPGroupCIDR(ctx, "example", &network.IPGroupCIDRArgs{
* IpGroupId: exampleIPGroup.ID(),
* Cidr: pulumi.String("10.10.10.0/24"),
* })
* 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.network.IPGroup;
* import com.pulumi.azure.network.IPGroupArgs;
* import com.pulumi.azure.network.IPGroupCIDR;
* import com.pulumi.azure.network.IPGroupCIDRArgs;
* 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("test-rg")
* .location("West Europe")
* .build());
* var exampleIPGroup = new IPGroup("exampleIPGroup", IPGroupArgs.builder()
* .name("test-ipgroup")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var exampleIPGroupCIDR = new IPGroupCIDR("exampleIPGroupCIDR", IPGroupCIDRArgs.builder()
* .ipGroupId(exampleIPGroup.id())
* .cidr("10.10.10.0/24")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: test-rg
* location: West Europe
* exampleIPGroup:
* type: azure:network:IPGroup
* name: example
* properties:
* name: test-ipgroup
* location: ${example.location}
* resourceGroupName: ${example.name}
* exampleIPGroupCIDR:
* type: azure:network:IPGroupCIDR
* name: example
* properties:
* ipGroupId: ${exampleIPGroup.id}
* cidr: 10.10.10.0/24
* ```
*
* ## Import
* IP Group CIDRs can be imported using the `resource id` of the IP Group and
* the CIDR value (`/` characters have to be replaced by `_`), e.g.
* ```sh
* $ pulumi import azure:network/iPGroupCIDR:IPGroupCIDR example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/ipGroups/test-ipgroup/cidrs/10.1.0.0_24
* ```
* @property cidr
* @property ipGroupId The ID of the destination IP Group.
* Changing this forces a new IP Group CIDR to be created.
*/
public data class IPGroupCIDRArgs(
public val cidr: Output? = null,
public val ipGroupId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.IPGroupCIDRArgs =
com.pulumi.azure.network.IPGroupCIDRArgs.builder()
.cidr(cidr?.applyValue({ args0 -> args0 }))
.ipGroupId(ipGroupId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [IPGroupCIDRArgs].
*/
@PulumiTagMarker
public class IPGroupCIDRArgsBuilder internal constructor() {
private var cidr: Output? = null
private var ipGroupId: Output? = null
/**
* @param value
*/
@JvmName("mexuisrlqgbkxnno")
public suspend fun cidr(`value`: Output) {
this.cidr = value
}
/**
* @param value The ID of the destination IP Group.
* Changing this forces a new IP Group CIDR to be created.
*/
@JvmName("ubsmnqbxhhxdldit")
public suspend fun ipGroupId(`value`: Output) {
this.ipGroupId = value
}
/**
* @param value
*/
@JvmName("wqgikdmepsxhjqxv")
public suspend fun cidr(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cidr = mapped
}
/**
* @param value The ID of the destination IP Group.
* Changing this forces a new IP Group CIDR to be created.
*/
@JvmName("wmdnpmkdcedponwl")
public suspend fun ipGroupId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipGroupId = mapped
}
internal fun build(): IPGroupCIDRArgs = IPGroupCIDRArgs(
cidr = cidr,
ipGroupId = ipGroupId,
)
}