1. Packages
  2. Confluent Provider
  3. API Docs
  4. Environment
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

confluentcloud.Environment

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";

const prod = new confluentcloud.Environment("prod", {
    displayName: "Production",
    streamGovernance: {
        "package": "ESSENTIALS",
    },
});
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

prod = confluentcloud.Environment("prod",
    display_name="Production",
    stream_governance={
        "package": "ESSENTIALS",
    })
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := confluentcloud.NewEnvironment(ctx, "prod", &confluentcloud.EnvironmentArgs{
			DisplayName: pulumi.String("Production"),
			StreamGovernance: &confluentcloud.EnvironmentStreamGovernanceArgs{
				Package: pulumi.String("ESSENTIALS"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var prod = new ConfluentCloud.Environment("prod", new()
    {
        DisplayName = "Production",
        StreamGovernance = new ConfluentCloud.Inputs.EnvironmentStreamGovernanceArgs
        {
            Package = "ESSENTIALS",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.Environment;
import com.pulumi.confluentcloud.EnvironmentArgs;
import com.pulumi.confluentcloud.inputs.EnvironmentStreamGovernanceArgs;
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 prod = new Environment("prod", EnvironmentArgs.builder()
            .displayName("Production")
            .streamGovernance(EnvironmentStreamGovernanceArgs.builder()
                .package_("ESSENTIALS")
                .build())
            .build());

    }
}
Copy
resources:
  prod:
    type: confluentcloud:Environment
    properties:
      displayName: Production
      streamGovernance:
        package: ESSENTIALS
Copy

Getting Started

The following end-to-end examples might help to get started with confluentcloud.Environment resource:

  • basic-kafka-acls: Basic Kafka cluster with authorization using ACLs
  • basic-kafka-acls-with-alias: Basic Kafka cluster with authorization using ACLs
  • standard-kafka-acls: Standard Kafka cluster with authorization using ACLs
  • standard-kafka-rbac: Standard Kafka cluster with authorization using RBAC
  • dedicated-public-kafka-acls: Dedicated Kafka cluster that is accessible over the public internet with authorization using ACLs
  • dedicated-public-kafka-rbac: Dedicated Kafka cluster that is accessible over the public internet with authorization using RBAC
  • dedicated-privatelink-aws-kafka-acls: Dedicated Kafka cluster on AWS that is accessible via PrivateLink connections with authorization using ACLs
  • dedicated-privatelink-aws-kafka-rbac: Dedicated Kafka cluster on AWS that is accessible via PrivateLink connections with authorization using RBAC
  • dedicated-privatelink-azure-kafka-rbac: Dedicated Kafka cluster on Azure that is accessible via PrivateLink connections with authorization using RBAC
  • dedicated-privatelink-azure-kafka-acls: Dedicated Kafka cluster on Azure that is accessible via PrivateLink connections with authorization using ACLs
  • dedicated-private-service-connect-gcp-kafka-acls: Dedicated Kafka cluster on GCP that is accessible via Private Service Connect connections with authorization using ACLs
  • dedicated-private-service-connect-gcp-kafka-rbac: Dedicated Kafka cluster on GCP that is accessible via Private Service Connect connections with authorization using RBAC
  • dedicated-vnet-peering-azure-kafka-acls: Dedicated Kafka cluster on Azure that is accessible via VPC Peering connections with authorization using ACLs
  • dedicated-vnet-peering-azure-kafka-rbac: Dedicated Kafka cluster on Azure that is accessible via VPC Peering connections with authorization using RBAC
  • dedicated-vpc-peering-aws-kafka-acls: Dedicated Kafka cluster on AWS that is accessible via VPC Peering connections with authorization using ACLs
  • dedicated-vpc-peering-aws-kafka-rbac: Dedicated Kafka cluster on AWS that is accessible via VPC Peering connections with authorization using RBAC
  • dedicated-vpc-peering-gcp-kafka-acls: Dedicated Kafka cluster on GCP that is accessible via VPC Peering connections with authorization using ACLs
  • dedicated-vpc-peering-gcp-kafka-rbac: Dedicated Kafka cluster on GCP that is accessible via VPC Peering connections with authorization using RBAC
  • dedicated-transit-gateway-attachment-aws-kafka-acls: Dedicated Kafka cluster on AWS that is accessible via Transit Gateway Endpoint with authorization using ACLs
  • dedicated-transit-gateway-attachment-aws-kafka-rbac: Dedicated Kafka cluster on AWS that is accessible via Transit Gateway Endpoint with authorization using RBAC
  • enterprise-privatelinkattachment-aws-kafka-acls: Enterprise Kafka cluster on AWS that is accessible via PrivateLink connections with authorization using ACLs

Create Environment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Environment(name: string, args?: EnvironmentArgs, opts?: CustomResourceOptions);
@overload
def Environment(resource_name: str,
                args: Optional[EnvironmentArgs] = None,
                opts: Optional[ResourceOptions] = None)

@overload
def Environment(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                display_name: Optional[str] = None,
                stream_governance: Optional[EnvironmentStreamGovernanceArgs] = None)
func NewEnvironment(ctx *Context, name string, args *EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
public Environment(string name, EnvironmentArgs? args = null, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: confluentcloud:Environment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args EnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EnvironmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var environmentResource = new ConfluentCloud.Environment("environmentResource", new()
{
    DisplayName = "string",
    StreamGovernance = new ConfluentCloud.Inputs.EnvironmentStreamGovernanceArgs
    {
        Package = "string",
    },
});
Copy
example, err := confluentcloud.NewEnvironment(ctx, "environmentResource", &confluentcloud.EnvironmentArgs{
	DisplayName: pulumi.String("string"),
	StreamGovernance: &confluentcloud.EnvironmentStreamGovernanceArgs{
		Package: pulumi.String("string"),
	},
})
Copy
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
    .displayName("string")
    .streamGovernance(EnvironmentStreamGovernanceArgs.builder()
        .package_("string")
        .build())
    .build());
Copy
environment_resource = confluentcloud.Environment("environmentResource",
    display_name="string",
    stream_governance={
        "package": "string",
    })
Copy
const environmentResource = new confluentcloud.Environment("environmentResource", {
    displayName: "string",
    streamGovernance: {
        "package": "string",
    },
});
Copy
type: confluentcloud:Environment
properties:
    displayName: string
    streamGovernance:
        package: string
Copy

Environment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Environment resource accepts the following input properties:

DisplayName string
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
StreamGovernance Pulumi.ConfluentCloud.Inputs.EnvironmentStreamGovernance
The stream governance configuration for the Environment. The block supports the following arguments:
DisplayName string
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
StreamGovernance EnvironmentStreamGovernanceArgs
The stream governance configuration for the Environment. The block supports the following arguments:
displayName String
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
streamGovernance EnvironmentStreamGovernance
The stream governance configuration for the Environment. The block supports the following arguments:
displayName string
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
streamGovernance EnvironmentStreamGovernance
The stream governance configuration for the Environment. The block supports the following arguments:
display_name str
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
stream_governance EnvironmentStreamGovernanceArgs
The stream governance configuration for the Environment. The block supports the following arguments:
displayName String
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
streamGovernance Property Map
The stream governance configuration for the Environment. The block supports the following arguments:

Outputs

All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ResourceName string
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
Id string
The provider-assigned unique ID for this managed resource.
ResourceName string
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
id String
The provider-assigned unique ID for this managed resource.
resourceName String
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
id string
The provider-assigned unique ID for this managed resource.
resourceName string
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
id str
The provider-assigned unique ID for this managed resource.
resource_name str
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
id String
The provider-assigned unique ID for this managed resource.
resourceName String
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.

Look up Existing Environment Resource

Get an existing Environment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EnvironmentState, opts?: CustomResourceOptions): Environment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        display_name: Optional[str] = None,
        resource_name: Optional[str] = None,
        stream_governance: Optional[EnvironmentStreamGovernanceArgs] = None) -> Environment
func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
public static Environment get(String name, Output<String> id, EnvironmentState state, CustomResourceOptions options)
resources:  _:    type: confluentcloud:Environment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DisplayName string
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
ResourceName string
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
StreamGovernance Pulumi.ConfluentCloud.Inputs.EnvironmentStreamGovernance
The stream governance configuration for the Environment. The block supports the following arguments:
DisplayName string
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
ResourceName string
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
StreamGovernance EnvironmentStreamGovernanceArgs
The stream governance configuration for the Environment. The block supports the following arguments:
displayName String
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
resourceName String
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
streamGovernance EnvironmentStreamGovernance
The stream governance configuration for the Environment. The block supports the following arguments:
displayName string
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
resourceName string
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
streamGovernance EnvironmentStreamGovernance
The stream governance configuration for the Environment. The block supports the following arguments:
display_name str
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
resource_name str
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
stream_governance EnvironmentStreamGovernanceArgs
The stream governance configuration for the Environment. The block supports the following arguments:
displayName String
A human-readable name for the Environment. Start and end the name with alphanumeric characters, for example, "Development". The name can contain hyphens and underscores.
resourceName String
(Required String) The Confluent Resource Name of the Environment, for example, crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123.
streamGovernance Property Map
The stream governance configuration for the Environment. The block supports the following arguments:

Supporting Types

EnvironmentStreamGovernance
, EnvironmentStreamGovernanceArgs

Package This property is required. string
The stream governance package for the Environment. Accepted values are: ESSENTIALS and ADVANCED.
Package This property is required. string
The stream governance package for the Environment. Accepted values are: ESSENTIALS and ADVANCED.
package_ This property is required. String
The stream governance package for the Environment. Accepted values are: ESSENTIALS and ADVANCED.
package This property is required. string
The stream governance package for the Environment. Accepted values are: ESSENTIALS and ADVANCED.
package This property is required. str
The stream governance package for the Environment. Accepted values are: ESSENTIALS and ADVANCED.
package This property is required. String
The stream governance package for the Environment. Accepted values are: ESSENTIALS and ADVANCED.

Import

You can import an Environment by using Environment ID, for example:

$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"

$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"

$ pulumi import confluentcloud:index/environment:Environment my_env env-abc123
Copy

!> Warning: Do not forget to delete terminal command history afterwards for security purposes.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Confluent Cloud pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes
This Pulumi package is based on the confluent Terraform Provider.