Skip to content

Commit b5464c4

Browse files
committed
module: remove deprecated attribute perm; examples: improve the examples
1 parent dbed65c commit b5464c4

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed

examples/complete/main.tf

+7-3
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ module "vpc" {
1616
availability_zones = [data.alicloud_zones.default.zones.0.id]
1717
}
1818

19+
resource "random_integer" "default" {
20+
min = 10000
21+
max = 99999
22+
}
23+
1924
module "example" {
2025
source = "../.."
2126

2227
#alicloud_ons_instance
23-
ons_instance_name = var.ons_instance_name
28+
ons_instance_name = "${var.ons_instance_name}-${random_integer.default.result}"
2429
ons_instance_remark = var.ons_instance_remark
2530

2631
#alicloud_ons_topic
2732
topic = "tf-topic-name"
2833
message_type = 0
2934
ons_topic_remark = "tf-topic-remark"
30-
ons_topic_perm = var.ons_topic_perm
3135

3236
#alicloud_kvstore_instance
3337
redis_instance_name = var.redis_instance_name
@@ -42,4 +46,4 @@ module "example" {
4246
redis_tags_created = var.redis_tags_created
4347
redis_tags_for = var.redis_tags_for
4448

45-
}
49+
}

examples/complete/tfvars/01-update.tfvars

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ ons_instance_name = "update-tf-ons-instance-name"
33
ons_instance_remark = "update-tf-ons-instance-remark"
44

55
#alicloud_ons_topic
6-
ons_topic_perm = 6
76

87
#alicloud_kvstore_instance
98
redis_instance_name = "update-tf-redis-instance-name"

examples/complete/variables.tf

-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ variable "ons_instance_remark" {
1212
}
1313

1414
#alicloud_ons_topic
15-
variable "ons_topic_perm" {
16-
description = "This attribute is used to set the read-write mode for the topic."
17-
type = number
18-
default = "2"
19-
}
2015

2116
#alicloud_kvstore_instance
2217
variable "redis_instance_name" {

main.tf

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ resource "alicloud_ons_topic" "default" {
88
instance_id = alicloud_ons_instance.default.id
99
message_type = var.message_type
1010
remark = var.ons_topic_remark
11-
perm = var.ons_topic_perm
1211
}
1312

1413
resource "alicloud_kvstore_instance" "default" {

variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ variable "ons_topic_remark" {
3030
default = ""
3131
}
3232

33-
variable "ons_topic_perm" {
34-
description = "This attribute is used to set the read-write mode for the topic."
35-
type = number
36-
default = "2"
37-
}
38-
3933
#alicloud_kvstore_instance
4034
variable "redis_instance_name" {
4135
description = "The specification of the redis instance name."

0 commit comments

Comments
 (0)