Confluent Cloud

Pulumi Official
Package maintained by Pulumi
v0.1.0 published on Sunday, Jun 5, 2022 by Pulumi

getNetwork

confluentcloud.Network describes a Network data source.

Example Usage

using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleUsingId = Output.Create(ConfluentCloud.GetNetwork.InvokeAsync(new ConfluentCloud.GetNetworkArgs
        {
            Id = "n-abc123",
            Environment = new ConfluentCloud.Inputs.GetNetworkEnvironmentArgs
            {
                Id = "env-xyz456",
            },
        }));
        var test_sa = new ConfluentCloud.ServiceAccount("test-sa", new ConfluentCloud.ServiceAccountArgs
        {
            DisplayName = "test_sa",
            Description = exampleUsingId.Apply(exampleUsingId => $"test_sa for {exampleUsingId.DisplayName}"),
        });
        var exampleUsingNameNetwork = Output.Create(ConfluentCloud.GetNetwork.InvokeAsync(new ConfluentCloud.GetNetworkArgs
        {
            DisplayName = "my_network",
            Environment = new ConfluentCloud.Inputs.GetNetworkEnvironmentArgs
            {
                Id = "env-xyz456",
            },
        }));
        this.ExampleUsingName = exampleUsingNameNetwork;
    }

    [Output("exampleUsingName")]
    public Output<string> ExampleUsingName { get; set; }
}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleUsingId, err := confluentcloud.LookupNetwork(ctx, &GetNetworkArgs{
			Id: pulumi.StringRef("n-abc123"),
			Environment: GetNetworkEnvironment{
				Id: "env-xyz456",
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = confluentcloud.NewServiceAccount(ctx, "test-sa", &confluentcloud.ServiceAccountArgs{
			DisplayName: pulumi.String("test_sa"),
			Description: pulumi.String(fmt.Sprintf("%v%v", "test_sa for ", exampleUsingId.DisplayName)),
		})
		if err != nil {
			return err
		}
		exampleUsingNameNetwork, err := confluentcloud.LookupNetwork(ctx, &GetNetworkArgs{
			DisplayName: pulumi.StringRef("my_network"),
			Environment: GetNetworkEnvironment{
				Id: "env-xyz456",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("exampleUsingName", exampleUsingNameNetwork)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var exampleUsingId = Output.of(ConfluentcloudFunctions.getNetwork(GetNetworkArgs.builder()
            .id("n-abc123")
            .environment(GetNetworkEnvironmentArgs.builder()
                .id("env-xyz456")
                .build())
            .build()));

        var test_sa = new ServiceAccount("test-sa", ServiceAccountArgs.builder()        
            .displayName("test_sa")
            .description(String.format("test_sa for %s", exampleUsingId.apply(getNetworkResult -> getNetworkResult.displayName())))
            .build());

        final var exampleUsingNameNetwork = Output.of(ConfluentcloudFunctions.getNetwork(GetNetworkArgs.builder()
            .displayName("my_network")
            .environment(GetNetworkEnvironmentArgs.builder()
                .id("env-xyz456")
                .build())
            .build()));

        ctx.export("exampleUsingName", exampleUsingNameNetwork.apply(getNetworkResult -> getNetworkResult));
    }
}
import pulumi
import pulumi_confluentcloud as confluentcloud

example_using_id = confluentcloud.get_network(id="n-abc123",
    environment=confluentcloud.GetNetworkEnvironmentArgs(
        id="env-xyz456",
    ))
test_sa = confluentcloud.ServiceAccount("test-sa",
    display_name="test_sa",
    description=f"test_sa for {example_using_id.display_name}")
example_using_name_network = confluentcloud.get_network(display_name="my_network",
    environment=confluentcloud.GetNetworkEnvironmentArgs(
        id="env-xyz456",
    ))
pulumi.export("exampleUsingName", example_using_name_network)
import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";

const exampleUsingId = confluentcloud.getNetwork({
    id: "n-abc123",
    environment: {
        id: "env-xyz456",
    },
});
const test_sa = new confluentcloud.ServiceAccount("test-sa", {
    displayName: "test_sa",
    description: exampleUsingId.then(exampleUsingId => `test_sa for ${exampleUsingId.displayName}`),
});
const exampleUsingNameNetwork = confluentcloud.getNetwork({
    displayName: "my_network",
    environment: {
        id: "env-xyz456",
    },
});
export const exampleUsingName = exampleUsingNameNetwork;
resources:
  test-sa:
    type: confluentcloud:ServiceAccount
    properties:
      displayName: test_sa
      description: test_sa for ${exampleUsingId.displayName}
variables:
  exampleUsingId:
    Fn::Invoke:
      Function: confluentcloud:getNetwork
      Arguments:
        id: n-abc123
        environment:
          id: env-xyz456
  exampleUsingNameNetwork:
    Fn::Invoke:
      Function: confluentcloud:getNetwork
      Arguments:
        displayName: my_network
        environment:
          id: env-xyz456
outputs:
  exampleUsingName: ${exampleUsingNameNetwork}

Using getNetwork

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>
def get_network(aws: Optional[Sequence[GetNetworkAw]] = None,
                azures: Optional[Sequence[GetNetworkAzure]] = None,
                display_name: Optional[str] = None,
                environment: Optional[GetNetworkEnvironment] = None,
                gcps: Optional[Sequence[GetNetworkGcp]] = None,
                id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetNetworkResult
def get_network_output(aws: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkAwArgs]]]] = None,
                azures: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkAzureArgs]]]] = None,
                display_name: Optional[pulumi.Input[str]] = None,
                environment: Optional[pulumi.Input[GetNetworkEnvironmentArgs]] = None,
                gcps: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkGcpArgs]]]] = None,
                id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]
func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput

> Note: This function is named LookupNetwork in the Go SDK.

public static class GetNetwork 
{
    public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: confluentcloud:index/getNetwork:getNetwork
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Environment Pulumi.ConfluentCloud.Inputs.GetNetworkEnvironment
Aws List<Pulumi.ConfluentCloud.Inputs.GetNetworkAw>

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

Azures List<Pulumi.ConfluentCloud.Inputs.GetNetworkAzure>

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

DisplayName string

A human-readable name for the Network.

Gcps List<Pulumi.ConfluentCloud.Inputs.GetNetworkGcp>

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

Id string

The ID of the Environment that the Network belongs to, for example, env-xyz456.

Environment GetNetworkEnvironment
Aws []GetNetworkAw

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

Azures []GetNetworkAzure

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

DisplayName string

A human-readable name for the Network.

Gcps []GetNetworkGcp

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

Id string

The ID of the Environment that the Network belongs to, for example, env-xyz456.

environment GetNetworkEnvironment
aws List<GetNetworkAw>

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures List<GetNetworkAzure>

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

displayName String

A human-readable name for the Network.

gcps List<GetNetworkGcp>

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id String

The ID of the Environment that the Network belongs to, for example, env-xyz456.

environment GetNetworkEnvironment
aws GetNetworkAw[]

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures GetNetworkAzure[]

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

displayName string

A human-readable name for the Network.

gcps GetNetworkGcp[]

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id string

The ID of the Environment that the Network belongs to, for example, env-xyz456.

environment GetNetworkEnvironment
aws Sequence[GetNetworkAw]

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures Sequence[GetNetworkAzure]

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

display_name str

A human-readable name for the Network.

gcps Sequence[GetNetworkGcp]

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id str

The ID of the Environment that the Network belongs to, for example, env-xyz456.

environment Property Map
aws List<Property Map>

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures List<Property Map>

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

displayName String

A human-readable name for the Network.

gcps List<Property Map>

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id String

The ID of the Environment that the Network belongs to, for example, env-xyz456.

getNetwork Result

The following output properties are available:

Aws List<Pulumi.ConfluentCloud.Outputs.GetNetworkAw>

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

Azures List<Pulumi.ConfluentCloud.Outputs.GetNetworkAzure>

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

Cidr string

(Required String) The IPv4 CIDR block to used for the network. Must be /16. Required for VPC peering and AWS TransitGateway.

Cloud string

(Required String) The cloud service provider in which the network exists. Accepted values are: AWS, AZURE, and GCP.

ConnectionTypes List<string>

(Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING, TRANSITGATEWAY, and PRIVATELINK.

DisplayName string

(Required String) The name of the Network.

DnsDomain string
Environment Pulumi.ConfluentCloud.Outputs.GetNetworkEnvironment
Gcps List<Pulumi.ConfluentCloud.Outputs.GetNetworkGcp>

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

Id string

(Required String) The ID of the Network, for example, n-abc123.

Region string

(Required String) The cloud provider region where the network exists.

ResourceName string

(Required String) The Confluent Resource Name of the Network.

ZonalSubdomains Dictionary<string, string>
Zones List<string>

(Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud. On AWS, zones are AWS AZ IDs, for example, use1-az3. On GCP, zones are GCP zones, for example, us-central1-c. On Azure, zones are Confluent-chosen names (for example, 1, 2, 3) since Azure does not have universal zone identifiers.

Aws []GetNetworkAw

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

Azures []GetNetworkAzure

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

Cidr string

(Required String) The IPv4 CIDR block to used for the network. Must be /16. Required for VPC peering and AWS TransitGateway.

Cloud string

(Required String) The cloud service provider in which the network exists. Accepted values are: AWS, AZURE, and GCP.

ConnectionTypes []string

(Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING, TRANSITGATEWAY, and PRIVATELINK.

DisplayName string

(Required String) The name of the Network.

DnsDomain string
Environment GetNetworkEnvironment
Gcps []GetNetworkGcp

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

Id string

(Required String) The ID of the Network, for example, n-abc123.

Region string

(Required String) The cloud provider region where the network exists.

ResourceName string

(Required String) The Confluent Resource Name of the Network.

ZonalSubdomains map[string]string
Zones []string

(Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud. On AWS, zones are AWS AZ IDs, for example, use1-az3. On GCP, zones are GCP zones, for example, us-central1-c. On Azure, zones are Confluent-chosen names (for example, 1, 2, 3) since Azure does not have universal zone identifiers.

aws List<GetNetworkAw>

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures List<GetNetworkAzure>

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

cidr String

(Required String) The IPv4 CIDR block to used for the network. Must be /16. Required for VPC peering and AWS TransitGateway.

cloud String

(Required String) The cloud service provider in which the network exists. Accepted values are: AWS, AZURE, and GCP.

connectionTypes List<String>

(Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING, TRANSITGATEWAY, and PRIVATELINK.

displayName String

(Required String) The name of the Network.

dnsDomain String
environment GetNetworkEnvironment
gcps List<GetNetworkGcp>

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id String

(Required String) The ID of the Network, for example, n-abc123.

region String

(Required String) The cloud provider region where the network exists.

resourceName String

(Required String) The Confluent Resource Name of the Network.

zonalSubdomains Map<String,String>
zones List<String>

(Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud. On AWS, zones are AWS AZ IDs, for example, use1-az3. On GCP, zones are GCP zones, for example, us-central1-c. On Azure, zones are Confluent-chosen names (for example, 1, 2, 3) since Azure does not have universal zone identifiers.

aws GetNetworkAw[]

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures GetNetworkAzure[]

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

cidr string

(Required String) The IPv4 CIDR block to used for the network. Must be /16. Required for VPC peering and AWS TransitGateway.

cloud string

(Required String) The cloud service provider in which the network exists. Accepted values are: AWS, AZURE, and GCP.

connectionTypes string[]

(Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING, TRANSITGATEWAY, and PRIVATELINK.

displayName string

(Required String) The name of the Network.

dnsDomain string
environment GetNetworkEnvironment
gcps GetNetworkGcp[]

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id string

(Required String) The ID of the Network, for example, n-abc123.

region string

(Required String) The cloud provider region where the network exists.

resourceName string

(Required String) The Confluent Resource Name of the Network.

zonalSubdomains {[key: string]: string}
zones string[]

(Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud. On AWS, zones are AWS AZ IDs, for example, use1-az3. On GCP, zones are GCP zones, for example, us-central1-c. On Azure, zones are Confluent-chosen names (for example, 1, 2, 3) since Azure does not have universal zone identifiers.

aws Sequence[GetNetworkAw]

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures Sequence[GetNetworkAzure]

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

cidr str

(Required String) The IPv4 CIDR block to used for the network. Must be /16. Required for VPC peering and AWS TransitGateway.

cloud str

(Required String) The cloud service provider in which the network exists. Accepted values are: AWS, AZURE, and GCP.

connection_types Sequence[str]

(Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING, TRANSITGATEWAY, and PRIVATELINK.

display_name str

(Required String) The name of the Network.

dns_domain str
environment GetNetworkEnvironment
gcps Sequence[GetNetworkGcp]

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id str

(Required String) The ID of the Network, for example, n-abc123.

region str

(Required String) The cloud provider region where the network exists.

resource_name str

(Required String) The Confluent Resource Name of the Network.

zonal_subdomains Mapping[str, str]
zones Sequence[str]

(Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud. On AWS, zones are AWS AZ IDs, for example, use1-az3. On GCP, zones are GCP zones, for example, us-central1-c. On Azure, zones are Confluent-chosen names (for example, 1, 2, 3) since Azure does not have universal zone identifiers.

aws List<Property Map>

(Optional Configuration Block) The AWS-specific network details if available. It supports the following:

azures List<Property Map>

(Optional Configuration Block) The Azure-specific network details if available. It supports the following:

cidr String

(Required String) The IPv4 CIDR block to used for the network. Must be /16. Required for VPC peering and AWS TransitGateway.

cloud String

(Required String) The cloud service provider in which the network exists. Accepted values are: AWS, AZURE, and GCP.

connectionTypes List<String>

(Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING, TRANSITGATEWAY, and PRIVATELINK.

displayName String

(Required String) The name of the Network.

dnsDomain String
environment Property Map
gcps List<Property Map>

(Optional Configuration Block) The GCP-specific network details if available. It supports the following:

id String

(Required String) The ID of the Network, for example, n-abc123.

region String

(Required String) The cloud provider region where the network exists.

resourceName String

(Required String) The Confluent Resource Name of the Network.

zonalSubdomains Map<String>
zones List<String>

(Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks used with Private Link. Otherwise, they are automatically chosen by Confluent Cloud. On AWS, zones are AWS AZ IDs, for example, use1-az3. On GCP, zones are GCP zones, for example, us-central1-c. On Azure, zones are Confluent-chosen names (for example, 1, 2, 3) since Azure does not have universal zone identifiers.

Supporting Types

GetNetworkAw

PrivateLinkEndpointService string

(Optional String) The AWS VPC endpoint service for the network (used for Private Link) if available.

Vpc string

(Required String) The AWS VPC ID for the network.

PrivateLinkEndpointService string

(Optional String) The AWS VPC endpoint service for the network (used for Private Link) if available.

Vpc string

(Required String) The AWS VPC ID for the network.

privateLinkEndpointService String

(Optional String) The AWS VPC endpoint service for the network (used for Private Link) if available.

vpc String

(Required String) The AWS VPC ID for the network.

privateLinkEndpointService string

(Optional String) The AWS VPC endpoint service for the network (used for Private Link) if available.

vpc string

(Required String) The AWS VPC ID for the network.

private_link_endpoint_service str

(Optional String) The AWS VPC endpoint service for the network (used for Private Link) if available.

vpc str

(Required String) The AWS VPC ID for the network.

privateLinkEndpointService String

(Optional String) The AWS VPC endpoint service for the network (used for Private Link) if available.

vpc String

(Required String) The AWS VPC ID for the network.

GetNetworkAzure

PrivateLinkServiceAliases Dictionary<string, string>

(Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.

PrivateLinkServiceAliases map[string]string

(Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.

privateLinkServiceAliases Map<String,String>

(Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.

privateLinkServiceAliases {[key: string]: string}

(Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.

private_link_service_aliases Mapping[str, str]

(Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.

privateLinkServiceAliases Map<String>

(Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.

GetNetworkEnvironment

Id string

The ID of the Environment that the Network belongs to, for example, env-xyz456.

Id string

The ID of the Environment that the Network belongs to, for example, env-xyz456.

id String

The ID of the Environment that the Network belongs to, for example, env-xyz456.

id string

The ID of the Environment that the Network belongs to, for example, env-xyz456.

id str

The ID of the Environment that the Network belongs to, for example, env-xyz456.

id String

The ID of the Environment that the Network belongs to, for example, env-xyz456.

GetNetworkGcp

Project string

(Required String) The GCP project.

VpcNetwork string

(Required String) The GCP VPC network name.

Project string

(Required String) The GCP project.

VpcNetwork string

(Required String) The GCP VPC network name.

project String

(Required String) The GCP project.

vpcNetwork String

(Required String) The GCP VPC network name.

project string

(Required String) The GCP project.

vpcNetwork string

(Required String) The GCP VPC network name.

project str

(Required String) The GCP project.

vpc_network str

(Required String) The GCP VPC network name.

project String

(Required String) The GCP project.

vpcNetwork String

(Required String) The GCP VPC network name.

Package Details

Repository
https://github.com/pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes

This Pulumi package is based on the confluent Terraform Provider.