1. Packages
  2. Gitlab Provider
  3. API Docs
  4. Topic
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

gitlab.Topic

Explore with Pulumi AI

gitlab logo
GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi

    The gitlab.Topic resource allows to manage the lifecycle of topics that are then assignable to projects.

    Topics are the successors for project tags. Aside from avoiding terminology collisions with Git tags, they are more descriptive and better searchable.

    Deleting a topic was implemented in GitLab 14.9. For older versions of GitLab set soft_destroy = true to empty out a topic instead of deleting it.

    Upstream API: GitLab REST API docs for topics

    Create Topic Resource

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

    Constructor syntax

    new Topic(name: string, args?: TopicArgs, opts?: CustomResourceOptions);
    @overload
    def Topic(resource_name: str,
              args: Optional[TopicArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Topic(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              avatar: Optional[str] = None,
              avatar_hash: Optional[str] = None,
              description: Optional[str] = None,
              name: Optional[str] = None,
              soft_destroy: Optional[bool] = None,
              title: Optional[str] = None)
    func NewTopic(ctx *Context, name string, args *TopicArgs, opts ...ResourceOption) (*Topic, error)
    public Topic(string name, TopicArgs? args = null, CustomResourceOptions? opts = null)
    public Topic(String name, TopicArgs args)
    public Topic(String name, TopicArgs args, CustomResourceOptions options)
    
    type: gitlab:Topic
    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 TopicArgs
    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 TopicArgs
    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 TopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TopicArgs
    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 topicResource = new GitLab.Topic("topicResource", new()
    {
        Avatar = "string",
        AvatarHash = "string",
        Description = "string",
        Name = "string",
        Title = "string",
    });
    
    example, err := gitlab.NewTopic(ctx, "topicResource", &gitlab.TopicArgs{
    	Avatar:      pulumi.String("string"),
    	AvatarHash:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Title:       pulumi.String("string"),
    })
    
    var topicResource = new Topic("topicResource", TopicArgs.builder()
        .avatar("string")
        .avatarHash("string")
        .description("string")
        .name("string")
        .title("string")
        .build());
    
    topic_resource = gitlab.Topic("topicResource",
        avatar="string",
        avatar_hash="string",
        description="string",
        name="string",
        title="string")
    
    const topicResource = new gitlab.Topic("topicResource", {
        avatar: "string",
        avatarHash: "string",
        description: "string",
        name: "string",
        title: "string",
    });
    
    type: gitlab:Topic
    properties:
        avatar: string
        avatarHash: string
        description: string
        name: string
        title: string
    

    Topic 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 Topic resource accepts the following input properties:

    Avatar string
    A local path to the avatar image to upload. Note: not available for imported resources.
    AvatarHash string
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    Description string
    A text describing the topic.
    Name string
    The topic's name.
    SoftDestroy bool
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    Title string
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    Avatar string
    A local path to the avatar image to upload. Note: not available for imported resources.
    AvatarHash string
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    Description string
    A text describing the topic.
    Name string
    The topic's name.
    SoftDestroy bool
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    Title string
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar String
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatarHash String
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    description String
    A text describing the topic.
    name String
    The topic's name.
    softDestroy Boolean
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title String
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar string
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatarHash string
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    description string
    A text describing the topic.
    name string
    The topic's name.
    softDestroy boolean
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title string
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar str
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatar_hash str
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    description str
    A text describing the topic.
    name str
    The topic's name.
    soft_destroy bool
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title str
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar String
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatarHash String
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    description String
    A text describing the topic.
    name String
    The topic's name.
    softDestroy Boolean
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title String
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.

    Outputs

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

    AvatarUrl string
    The URL of the avatar image.
    Id string
    The provider-assigned unique ID for this managed resource.
    AvatarUrl string
    The URL of the avatar image.
    Id string
    The provider-assigned unique ID for this managed resource.
    avatarUrl String
    The URL of the avatar image.
    id String
    The provider-assigned unique ID for this managed resource.
    avatarUrl string
    The URL of the avatar image.
    id string
    The provider-assigned unique ID for this managed resource.
    avatar_url str
    The URL of the avatar image.
    id str
    The provider-assigned unique ID for this managed resource.
    avatarUrl String
    The URL of the avatar image.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Topic Resource

    Get an existing Topic 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?: TopicState, opts?: CustomResourceOptions): Topic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            avatar: Optional[str] = None,
            avatar_hash: Optional[str] = None,
            avatar_url: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            soft_destroy: Optional[bool] = None,
            title: Optional[str] = None) -> Topic
    func GetTopic(ctx *Context, name string, id IDInput, state *TopicState, opts ...ResourceOption) (*Topic, error)
    public static Topic Get(string name, Input<string> id, TopicState? state, CustomResourceOptions? opts = null)
    public static Topic get(String name, Output<String> id, TopicState 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.
    The following state arguments are supported:
    Avatar string
    A local path to the avatar image to upload. Note: not available for imported resources.
    AvatarHash string
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    AvatarUrl string
    The URL of the avatar image.
    Description string
    A text describing the topic.
    Name string
    The topic's name.
    SoftDestroy bool
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    Title string
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    Avatar string
    A local path to the avatar image to upload. Note: not available for imported resources.
    AvatarHash string
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    AvatarUrl string
    The URL of the avatar image.
    Description string
    A text describing the topic.
    Name string
    The topic's name.
    SoftDestroy bool
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    Title string
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar String
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatarHash String
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    avatarUrl String
    The URL of the avatar image.
    description String
    A text describing the topic.
    name String
    The topic's name.
    softDestroy Boolean
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title String
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar string
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatarHash string
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    avatarUrl string
    The URL of the avatar image.
    description string
    A text describing the topic.
    name string
    The topic's name.
    softDestroy boolean
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title string
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar str
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatar_hash str
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    avatar_url str
    The URL of the avatar image.
    description str
    A text describing the topic.
    name str
    The topic's name.
    soft_destroy bool
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title str
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.
    avatar String
    A local path to the avatar image to upload. Note: not available for imported resources.
    avatarHash String
    The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
    avatarUrl String
    The URL of the avatar image.
    description String
    A text describing the topic.
    name String
    The topic's name.
    softDestroy Boolean
    Empty the topics fields instead of deleting it.

    Deprecated: GitLab 14.9 introduced the proper deletion of topics. This field is no longer needed.

    title String
    The topic's description. Requires at least GitLab 15.0 for which it's a required argument.

    Import

    $ pulumi import gitlab:index/topic:Topic You can import a topic to terraform state using `<resource> <id>`.
    

    The id must be an integer for the id of the topic you want to import,

    for example:

    $ pulumi import gitlab:index/topic:Topic functional_programming 1
    

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

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.5.0 published on Friday, Oct 18, 2024 by Pulumi