com.pulumi.aws.memorydb.kotlin.SubnetGroupArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.memorydb.kotlin
import com.pulumi.aws.memorydb.SubnetGroupArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a MemoryDB Subnet Group.
* More information about subnet groups can be found in the [MemoryDB User Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/subnetgroups.html).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2.Vpc("example", {cidrBlock: "10.0.0.0/16"});
* const exampleSubnet = new aws.ec2.Subnet("example", {
* vpcId: example.id,
* cidrBlock: "10.0.0.0/24",
* availabilityZone: "us-west-2a",
* });
* const exampleSubnetGroup = new aws.memorydb.SubnetGroup("example", {
* name: "my-subnet-group",
* subnetIds: [exampleSubnet.id],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2.Vpc("example", cidr_block="10.0.0.0/16")
* example_subnet = aws.ec2.Subnet("example",
* vpc_id=example.id,
* cidr_block="10.0.0.0/24",
* availability_zone="us-west-2a")
* example_subnet_group = aws.memorydb.SubnetGroup("example",
* name="my-subnet-group",
* subnet_ids=[example_subnet.id])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2.Vpc("example", new()
* {
* CidrBlock = "10.0.0.0/16",
* });
* var exampleSubnet = new Aws.Ec2.Subnet("example", new()
* {
* VpcId = example.Id,
* CidrBlock = "10.0.0.0/24",
* AvailabilityZone = "us-west-2a",
* });
* var exampleSubnetGroup = new Aws.MemoryDb.SubnetGroup("example", new()
* {
* Name = "my-subnet-group",
* SubnetIds = new[]
* {
* exampleSubnet.Id,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/memorydb"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
* CidrBlock: pulumi.String("10.0.0.0/16"),
* })
* if err != nil {
* return err
* }
* exampleSubnet, err := ec2.NewSubnet(ctx, "example", &ec2.SubnetArgs{
* VpcId: example.ID(),
* CidrBlock: pulumi.String("10.0.0.0/24"),
* AvailabilityZone: pulumi.String("us-west-2a"),
* })
* if err != nil {
* return err
* }
* _, err = memorydb.NewSubnetGroup(ctx, "example", &memorydb.SubnetGroupArgs{
* Name: pulumi.String("my-subnet-group"),
* SubnetIds: pulumi.StringArray{
* exampleSubnet.ID(),
* },
* })
* 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.aws.ec2.Vpc;
* import com.pulumi.aws.ec2.VpcArgs;
* import com.pulumi.aws.ec2.Subnet;
* import com.pulumi.aws.ec2.SubnetArgs;
* import com.pulumi.aws.memorydb.SubnetGroup;
* import com.pulumi.aws.memorydb.SubnetGroupArgs;
* 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 Vpc("example", VpcArgs.builder()
* .cidrBlock("10.0.0.0/16")
* .build());
* var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
* .vpcId(example.id())
* .cidrBlock("10.0.0.0/24")
* .availabilityZone("us-west-2a")
* .build());
* var exampleSubnetGroup = new SubnetGroup("exampleSubnetGroup", SubnetGroupArgs.builder()
* .name("my-subnet-group")
* .subnetIds(exampleSubnet.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2:Vpc
* properties:
* cidrBlock: 10.0.0.0/16
* exampleSubnet:
* type: aws:ec2:Subnet
* name: example
* properties:
* vpcId: ${example.id}
* cidrBlock: 10.0.0.0/24
* availabilityZone: us-west-2a
* exampleSubnetGroup:
* type: aws:memorydb:SubnetGroup
* name: example
* properties:
* name: my-subnet-group
* subnetIds:
* - ${exampleSubnet.id}
* ```
*
* ## Import
* Using `pulumi import`, import a subnet group using its `name`. For example:
* ```sh
* $ pulumi import aws:memorydb/subnetGroup:SubnetGroup example my-subnet-group
* ```
* @property description Description for the subnet group. Defaults to `"Managed by Pulumi"`.
* @property name Name of the subnet group. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
* @property namePrefix Creates a unique name beginning with the specified prefix. Conflicts with `name`.
* @property subnetIds Set of VPC Subnet ID-s for the subnet group. At least one subnet must be provided.
* The following arguments are optional:
* @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public data class SubnetGroupArgs(
public val description: Output? = null,
public val name: Output? = null,
public val namePrefix: Output? = null,
public val subnetIds: Output>? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy