confluentcloud.Tag
Explore with Pulumi AI
confluentcloud.Tag
provides a Tag resource that enables creating, editing, and deleting Tags on Confluent Cloud.
Example Usage
Option #1: Manage multiple Schema Registry clusters in the same Pulumi Stack
import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";
const pii = new confluentcloud.Tag("pii", {
schemaRegistryCluster: {
id: essentials.id,
},
restEndpoint: essentials.restEndpoint,
credentials: {
key: "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
},
name: "PII",
description: "PII tag",
});
import pulumi
import pulumi_confluentcloud as confluentcloud
pii = confluentcloud.Tag("pii",
schema_registry_cluster={
"id": essentials["id"],
},
rest_endpoint=essentials["restEndpoint"],
credentials={
"key": "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
"secret": "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
},
name="PII",
description="PII tag")
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.NewTag(ctx, "pii", &confluentcloud.TagArgs{
SchemaRegistryCluster: &confluentcloud.TagSchemaRegistryClusterArgs{
Id: pulumi.Any(essentials.Id),
},
RestEndpoint: pulumi.Any(essentials.RestEndpoint),
Credentials: &confluentcloud.TagCredentialsArgs{
Key: pulumi.String("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>"),
Secret: pulumi.String("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>"),
},
Name: pulumi.String("PII"),
Description: pulumi.String("PII tag"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() =>
{
var pii = new ConfluentCloud.Tag("pii", new()
{
SchemaRegistryCluster = new ConfluentCloud.Inputs.TagSchemaRegistryClusterArgs
{
Id = essentials.Id,
},
RestEndpoint = essentials.RestEndpoint,
Credentials = new ConfluentCloud.Inputs.TagCredentialsArgs
{
Key = "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
Secret = "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
},
Name = "PII",
Description = "PII tag",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.Tag;
import com.pulumi.confluentcloud.TagArgs;
import com.pulumi.confluentcloud.inputs.TagSchemaRegistryClusterArgs;
import com.pulumi.confluentcloud.inputs.TagCredentialsArgs;
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 pii = new Tag("pii", TagArgs.builder()
.schemaRegistryCluster(TagSchemaRegistryClusterArgs.builder()
.id(essentials.id())
.build())
.restEndpoint(essentials.restEndpoint())
.credentials(TagCredentialsArgs.builder()
.key("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>")
.secret("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>")
.build())
.name("PII")
.description("PII tag")
.build());
}
}
resources:
pii:
type: confluentcloud:Tag
properties:
schemaRegistryCluster:
id: ${essentials.id}
restEndpoint: ${essentials.restEndpoint}
credentials:
key: <Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>
secret: <Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>
name: PII
description: PII tag
Option #2: Manage a single Schema Registry cluster in the same Pulumi Stack
import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";
const pii = new confluentcloud.Tag("pii", {
name: "PII",
description: "PII tag",
});
import pulumi
import pulumi_confluentcloud as confluentcloud
pii = confluentcloud.Tag("pii",
name="PII",
description="PII tag")
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.NewTag(ctx, "pii", &confluentcloud.TagArgs{
Name: pulumi.String("PII"),
Description: pulumi.String("PII tag"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() =>
{
var pii = new ConfluentCloud.Tag("pii", new()
{
Name = "PII",
Description = "PII tag",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.Tag;
import com.pulumi.confluentcloud.TagArgs;
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 pii = new Tag("pii", TagArgs.builder()
.name("PII")
.description("PII tag")
.build());
}
}
resources:
pii:
type: confluentcloud:Tag
properties:
name: PII
description: PII tag
Getting Started
The following end-to-end example might help to get started with Stream Catalog:
- stream-catalog
Create Tag Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Tag(name: string, args?: TagArgs, opts?: CustomResourceOptions);
@overload
def Tag(resource_name: str,
args: Optional[TagArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Tag(resource_name: str,
opts: Optional[ResourceOptions] = None,
credentials: Optional[TagCredentialsArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None,
rest_endpoint: Optional[str] = None,
schema_registry_cluster: Optional[TagSchemaRegistryClusterArgs] = None)
func NewTag(ctx *Context, name string, args *TagArgs, opts ...ResourceOption) (*Tag, error)
public Tag(string name, TagArgs? args = null, CustomResourceOptions? opts = null)
type: confluentcloud:Tag
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TagArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TagArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TagArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagArgs
- 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 tagResource = new ConfluentCloud.Tag("tagResource", new()
{
Credentials = new ConfluentCloud.Inputs.TagCredentialsArgs
{
Key = "string",
Secret = "string",
},
Description = "string",
Name = "string",
RestEndpoint = "string",
SchemaRegistryCluster = new ConfluentCloud.Inputs.TagSchemaRegistryClusterArgs
{
Id = "string",
},
});
example, err := confluentcloud.NewTag(ctx, "tagResource", &confluentcloud.TagArgs{
Credentials: &confluentcloud.TagCredentialsArgs{
Key: pulumi.String("string"),
Secret: pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
RestEndpoint: pulumi.String("string"),
SchemaRegistryCluster: &confluentcloud.TagSchemaRegistryClusterArgs{
Id: pulumi.String("string"),
},
})
var tagResource = new Tag("tagResource", TagArgs.builder()
.credentials(TagCredentialsArgs.builder()
.key("string")
.secret("string")
.build())
.description("string")
.name("string")
.restEndpoint("string")
.schemaRegistryCluster(TagSchemaRegistryClusterArgs.builder()
.id("string")
.build())
.build());
tag_resource = confluentcloud.Tag("tagResource",
credentials={
"key": "string",
"secret": "string",
},
description="string",
name="string",
rest_endpoint="string",
schema_registry_cluster={
"id": "string",
})
const tagResource = new confluentcloud.Tag("tagResource", {
credentials: {
key: "string",
secret: "string",
},
description: "string",
name: "string",
restEndpoint: "string",
schemaRegistryCluster: {
id: "string",
},
});
type: confluentcloud:Tag
properties:
credentials:
key: string
secret: string
description: string
name: string
restEndpoint: string
schemaRegistryCluster:
id: string
Tag 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 Tag resource accepts the following input properties:
- Credentials
Pulumi.
Confluent Cloud. Inputs. Tag Credentials - The Cluster API Credentials.
- Description string
- The description of the tag to be created.
- Name string
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - Rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - Schema
Registry Pulumi.Cluster Confluent Cloud. Inputs. Tag Schema Registry Cluster
- Credentials
Tag
Credentials Args - The Cluster API Credentials.
- Description string
- The description of the tag to be created.
- Name string
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - Rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - Schema
Registry TagCluster Schema Registry Cluster Args
- credentials
Tag
Credentials - The Cluster API Credentials.
- description String
- The description of the tag to be created.
- name String
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest
Endpoint String - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry TagCluster Schema Registry Cluster
- credentials
Tag
Credentials - The Cluster API Credentials.
- description string
- The description of the tag to be created.
- name string
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry TagCluster Schema Registry Cluster
- credentials
Tag
Credentials Args - The Cluster API Credentials.
- description str
- The description of the tag to be created.
- name str
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest_
endpoint str - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema_
registry_ Tagcluster Schema Registry Cluster Args
- credentials Property Map
- The Cluster API Credentials.
- description String
- The description of the tag to be created.
- name String
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest
Endpoint String - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry Property MapCluster
Outputs
All input properties are implicitly available as output properties. Additionally, the Tag resource produces the following output properties:
- Entity
Types List<string> - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - Id string
- The provider-assigned unique ID for this managed resource.
- Version int
- (Optional Integer) The version, for example,
1
.
- Entity
Types []string - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - Id string
- The provider-assigned unique ID for this managed resource.
- Version int
- (Optional Integer) The version, for example,
1
.
- entity
Types List<String> - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - id String
- The provider-assigned unique ID for this managed resource.
- version Integer
- (Optional Integer) The version, for example,
1
.
- entity
Types string[] - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - id string
- The provider-assigned unique ID for this managed resource.
- version number
- (Optional Integer) The version, for example,
1
.
- entity_
types Sequence[str] - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - id str
- The provider-assigned unique ID for this managed resource.
- version int
- (Optional Integer) The version, for example,
1
.
- entity
Types List<String> - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - id String
- The provider-assigned unique ID for this managed resource.
- version Number
- (Optional Integer) The version, for example,
1
.
Look up Existing Tag Resource
Get an existing Tag 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?: TagState, opts?: CustomResourceOptions): Tag
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
credentials: Optional[TagCredentialsArgs] = None,
description: Optional[str] = None,
entity_types: Optional[Sequence[str]] = None,
name: Optional[str] = None,
rest_endpoint: Optional[str] = None,
schema_registry_cluster: Optional[TagSchemaRegistryClusterArgs] = None,
version: Optional[int] = None) -> Tag
func GetTag(ctx *Context, name string, id IDInput, state *TagState, opts ...ResourceOption) (*Tag, error)
public static Tag Get(string name, Input<string> id, TagState? state, CustomResourceOptions? opts = null)
public static Tag get(String name, Output<String> id, TagState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Credentials
Pulumi.
Confluent Cloud. Inputs. Tag Credentials - The Cluster API Credentials.
- Description string
- The description of the tag to be created.
- Entity
Types List<string> - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - Name string
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - Rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - Schema
Registry Pulumi.Cluster Confluent Cloud. Inputs. Tag Schema Registry Cluster - Version int
- (Optional Integer) The version, for example,
1
.
- Credentials
Tag
Credentials Args - The Cluster API Credentials.
- Description string
- The description of the tag to be created.
- Entity
Types []string - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - Name string
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - Rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - Schema
Registry TagCluster Schema Registry Cluster Args - Version int
- (Optional Integer) The version, for example,
1
.
- credentials
Tag
Credentials - The Cluster API Credentials.
- description String
- The description of the tag to be created.
- entity
Types List<String> - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - name String
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest
Endpoint String - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry TagCluster Schema Registry Cluster - version Integer
- (Optional Integer) The version, for example,
1
.
- credentials
Tag
Credentials - The Cluster API Credentials.
- description string
- The description of the tag to be created.
- entity
Types string[] - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - name string
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry TagCluster Schema Registry Cluster - version number
- (Optional Integer) The version, for example,
1
.
- credentials
Tag
Credentials Args - The Cluster API Credentials.
- description str
- The description of the tag to be created.
- entity_
types Sequence[str] - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - name str
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest_
endpoint str - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema_
registry_ Tagcluster Schema Registry Cluster Args - version int
- (Optional Integer) The version, for example,
1
.
- credentials Property Map
- The Cluster API Credentials.
- description String
- The description of the tag to be created.
- entity
Types List<String> - (Optional List of String) The entity types of the tag, this always returns
["cf_entity"]
. Refer to the Entity types to learn more about entity types. - name String
- The name of the tag, for example,
PII
. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters. - rest
Endpoint String - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry Property MapCluster - version Number
- (Optional Integer) The version, for example,
1
.
Supporting Types
TagCredentials, TagCredentialsArgs
TagSchemaRegistryCluster, TagSchemaRegistryClusterArgs
- Id string
- The ID of the Schema Registry cluster, for example,
lsrc-abc123
.
- Id string
- The ID of the Schema Registry cluster, for example,
lsrc-abc123
.
- id String
- The ID of the Schema Registry cluster, for example,
lsrc-abc123
.
- id string
- The ID of the Schema Registry cluster, for example,
lsrc-abc123
.
- id str
- The ID of the Schema Registry cluster, for example,
lsrc-abc123
.
- id String
- The ID of the Schema Registry cluster, for example,
lsrc-abc123
.
Import
You can import a Tag by using the Schema Registry cluster ID, Tag name in the format <Schema Registry cluster ID>/<Tag name>
, for example:
$ export IMPORT_SCHEMA_REGISTRY_API_KEY="<schema_registry_api_key>"
$ export IMPORT_SCHEMA_REGISTRY_API_SECRET="<schema_registry_api_secret>"
$ export IMPORT_SCHEMA_REGISTRY_REST_ENDPOINT="<schema_registry_rest_endpoint>"
$ pulumi import confluentcloud:index/tag:Tag pii lsrc-8wrx70/PII
!> 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.