1. Packages
  2. Discord Provider
  3. API Docs
  4. RoleEveryone
discord 2.0.0 published on Friday, Mar 7, 2025 by lucky3028

discord.RoleEveryone

Explore with Pulumi AI

Resource to manage permissions for the default @everyone role.

Example Usage

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

const everyone = new discord.RoleEveryone("everyone", {
    serverId: _var.server_id,
    permissions: data.discord_permission.everyone.allow_bits,
});
Copy
import pulumi
import pulumi_discord as discord

everyone = discord.RoleEveryone("everyone",
    server_id=var["server_id"],
    permissions=data["discord_permission"]["everyone"]["allow_bits"])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/discord/v2/discord"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := discord.NewRoleEveryone(ctx, "everyone", &discord.RoleEveryoneArgs{
			ServerId:    pulumi.Any(_var.Server_id),
			Permissions: pulumi.Any(data.Discord_permission.Everyone.Allow_bits),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Discord = Pulumi.Discord;

return await Deployment.RunAsync(() => 
{
    var everyone = new Discord.RoleEveryone("everyone", new()
    {
        ServerId = @var.Server_id,
        Permissions = data.Discord_permission.Everyone.Allow_bits,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.discord.RoleEveryone;
import com.pulumi.discord.RoleEveryoneArgs;
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 everyone = new RoleEveryone("everyone", RoleEveryoneArgs.builder()
            .serverId(var_.server_id())
            .permissions(data.discord_permission().everyone().allow_bits())
            .build());

    }
}
Copy
resources:
  everyone:
    type: discord:RoleEveryone
    properties:
      serverId: ${var.server_id}
      permissions: ${data.discord_permission.everyone.allow_bits}
Copy

Create RoleEveryone Resource

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

Constructor syntax

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

@overload
def RoleEveryone(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 server_id: Optional[str] = None,
                 permissions: Optional[float] = None)
func NewRoleEveryone(ctx *Context, name string, args RoleEveryoneArgs, opts ...ResourceOption) (*RoleEveryone, error)
public RoleEveryone(string name, RoleEveryoneArgs args, CustomResourceOptions? opts = null)
public RoleEveryone(String name, RoleEveryoneArgs args)
public RoleEveryone(String name, RoleEveryoneArgs args, CustomResourceOptions options)
type: discord:RoleEveryone
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 This property is required. RoleEveryoneArgs
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 This property is required. RoleEveryoneArgs
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 This property is required. RoleEveryoneArgs
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 This property is required. RoleEveryoneArgs
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. RoleEveryoneArgs
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 roleEveryoneResource = new Discord.RoleEveryone("roleEveryoneResource", new()
{
    ServerId = "string",
    Permissions = 0,
});
Copy
example, err := discord.NewRoleEveryone(ctx, "roleEveryoneResource", &discord.RoleEveryoneArgs{
	ServerId:    pulumi.String("string"),
	Permissions: pulumi.Float64(0),
})
Copy
var roleEveryoneResource = new RoleEveryone("roleEveryoneResource", RoleEveryoneArgs.builder()
    .serverId("string")
    .permissions(0)
    .build());
Copy
role_everyone_resource = discord.RoleEveryone("roleEveryoneResource",
    server_id="string",
    permissions=0)
Copy
const roleEveryoneResource = new discord.RoleEveryone("roleEveryoneResource", {
    serverId: "string",
    permissions: 0,
});
Copy
type: discord:RoleEveryone
properties:
    permissions: 0
    serverId: string
Copy

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

ServerId This property is required. string
Which server the role will be in.
Permissions double
The permission bits of the role.
ServerId This property is required. string
Which server the role will be in.
Permissions float64
The permission bits of the role.
serverId This property is required. String
Which server the role will be in.
permissions Double
The permission bits of the role.
serverId This property is required. string
Which server the role will be in.
permissions number
The permission bits of the role.
server_id This property is required. str
Which server the role will be in.
permissions float
The permission bits of the role.
serverId This property is required. String
Which server the role will be in.
permissions Number
The permission bits of the role.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing RoleEveryone Resource

Get an existing RoleEveryone 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?: RoleEveryoneState, opts?: CustomResourceOptions): RoleEveryone
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        permissions: Optional[float] = None,
        server_id: Optional[str] = None) -> RoleEveryone
func GetRoleEveryone(ctx *Context, name string, id IDInput, state *RoleEveryoneState, opts ...ResourceOption) (*RoleEveryone, error)
public static RoleEveryone Get(string name, Input<string> id, RoleEveryoneState? state, CustomResourceOptions? opts = null)
public static RoleEveryone get(String name, Output<String> id, RoleEveryoneState state, CustomResourceOptions options)
resources:  _:    type: discord:RoleEveryone    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:
Permissions double
The permission bits of the role.
ServerId string
Which server the role will be in.
Permissions float64
The permission bits of the role.
ServerId string
Which server the role will be in.
permissions Double
The permission bits of the role.
serverId String
Which server the role will be in.
permissions number
The permission bits of the role.
serverId string
Which server the role will be in.
permissions float
The permission bits of the role.
server_id str
Which server the role will be in.
permissions Number
The permission bits of the role.
serverId String
Which server the role will be in.

Import

$ pulumi import discord:index/roleEveryone:RoleEveryone example "<server id>"
Copy

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

Package Details

Repository
discord lucky3028/terraform-provider-discord
License
Notes
This Pulumi package is based on the discord Terraform Provider.