initial commit

This commit is contained in:
2026-03-14 20:56:04 +01:00
commit 9b1aa393b3
38 changed files with 1517 additions and 0 deletions

17
discord/.terraform.lock.hcl generated Normal file
View File

@@ -0,0 +1,17 @@
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.opentofu.org/lucky3028/discord" {
version = "2.2.1"
hashes = [
"h1:3sFFJ1JISV02djpBKOy4PMVOUIewQlIyNy+iiWHRj7Q=",
"zh:032f762350f41a971fa63270e3ec35cb33a504906cf568f4f191f9df56757263",
"zh:0aad54fbc548643e55c821ff1776a398ee2286fbfcf1da76c41cba4f02bd2ae9",
"zh:0c28ffa47c8c3f0b758a7e73db5a7d96db8d8d19e9b02fcb73bb9563330a013d",
"zh:1265a65935ca971aa4f0db030a85264108c964824de9001382b38922095c2ce1",
"zh:1396368f624e6d431da4f29b92ad4d7e9ec475f0b96e7a19541d4cbd2e343127",
"zh:3f40089f3c8ca5ff53ca8df0f05fd09f4c97e29b4337901faed3c7a9861e22ee",
"zh:77d30ee7203bd644d7f450b565821ee73c68c6f44fe31c3b2e8ca2fb8a8e4345",
"zh:db12227cacbbd1c7f974bc15cd5a36e35d9eb16d9f3fba2c647c37fc98958234",
]
}

11
discord/provider.tf Normal file
View File

@@ -0,0 +1,11 @@
terraform {
required_providers {
discord = {
source = "Lucky3028/discord"
}
}
}
provider "discord" {
token = var.discord_token
}

47
discord/server.tf Normal file
View File

@@ -0,0 +1,47 @@
data "discord_local_image" "logo" {
file = "terraform-icon.png"
}
resource "discord_server" "terraform_playground" {
name = "Terraform Playground"
region = "rotterdam"
default_message_notifications = 0
icon_data_uri = data.discord_local_image.logo.data_uri
}
resource "discord_category_channel" "chatting" {
name = "Chatting"
server_id = discord_server.terraform_playground.id
position = 0
}
resource "discord_text_channel" "general" {
name = "general"
category = discord_category_channel.chatting.id
server_id = discord_server.terraform_playground.id
position = 0
}
resource "discord_message" "hello_world" {
channel_id = discord_text_channel.general.id
embed {
title = "Hello World"
footer {
text = "Bye World"
}
fields {
name = "foo"
value = "bar"
inline = true
}
fields {
name = "bar"
value = "baz"
inline = false
}
}
}

BIN
discord/terraform-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

4
discord/variables.tf Normal file
View File

@@ -0,0 +1,4 @@
variable discord_token {
type = string
sensitive = true
}