Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 6a70b45

Browse files
committed
更新 .gitignore,添加 Terraform 相关文件的忽略规则;新增 terraform.tf 文件,配置 Open Telekom Cloud 的相关资源
1 parent ecddc26 commit 6a70b45

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ yarn-error.log*
3434
# typescript
3535
*.tsbuildinfo
3636
next-env.d.ts
37+
38+
.terraform
39+
*.hcl
40+
provider.tf

terraform.tf

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
terraform {
2+
required_providers {
3+
opentelekomcloud = {
4+
source = "opentelekomcloud/opentelekomcloud"
5+
version = ">= 1.36.28"
6+
}
7+
}
8+
}
9+
10+
variable "swr_org_name" {
11+
default = "testtesttest"
12+
}
13+
14+
resource "opentelekomcloud_swr_organization_v2" "swr_org" {
15+
name = var.swr_org_name
16+
}
17+
18+
variable "vpc_id" {
19+
default = "0bd45fdf-bf78-41e5-bd08-99f1c65e0147"
20+
}
21+
22+
variable "subnet_id" {
23+
default = "f66e3dc1-ed82-4832-8175-7c1d2e78fcea"
24+
}
25+
26+
variable "eip" {
27+
default = "80.158.91.249"
28+
}
29+
30+
resource "opentelekomcloud_cce_cluster_v3" "cluster" {
31+
name = "test-cluster"
32+
description = "test-cluster"
33+
34+
cluster_type = "VirtualMachine"
35+
flavor_id = "cce.s1.small"
36+
vpc_id = var.vpc_id
37+
subnet_id = var.subnet_id
38+
container_network_type = "overlay_l2"
39+
authentication_mode = "rbac"
40+
kube_proxy_mode = "ipvs"
41+
eip = var.eip
42+
43+
delete_all_storage = "true"
44+
}

0 commit comments

Comments
 (0)