You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt.Sprintf("\"%s\" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument \"%s\".", resourceAttribute.originalAttribute, resourceAttribute.writeOnlyAlternative),
Message: `"secret_string" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "secret_string_wo".`,
28
-
Range: hcl.Range{
29
-
Filename: "resource.tf",
30
-
Start: hcl.Pos{Line: 3, Column: 19},
31
-
End: hcl.Pos{Line: 3, Column: 25},
32
-
},
26
+
Message: `"password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "password_wo".`,
Message: `"master_password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "master_password_wo".`,
61
-
Range: hcl.Range{
62
-
Filename: "resource.tf",
63
-
Start: hcl.Pos{Line: 3, Column: 21},
64
-
End: hcl.Pos{Line: 3, Column: 27},
65
-
},
66
55
},
67
56
},
68
57
Fixed: `
69
-
resource "aws_rds_cluster" "test" {
58
+
resource "aws_docdb_cluster" "test" {
70
59
master_password_wo = "test"
71
60
}
72
61
`,
73
62
},
74
63
{
75
-
Name: "everything is fine aws_rds_cluster",
64
+
Name: "everything is fine aws_docdb_cluster",
76
65
Content: `
77
-
resource "aws_rds_cluster" "test" {
66
+
resource "aws_docdb_cluster" "test" {
78
67
master_password_wo = "test"
79
68
}
80
69
`,
81
70
Expected: helper.Issues{},
82
71
},
83
-
84
72
{
85
-
Name: "basic aws_db_instance",
73
+
Name: "basic aws_rds_cluster",
86
74
Content: `
87
-
resource "aws_db_instance" "test" {
88
-
password = "test"
75
+
resource "aws_rds_cluster" "test" {
76
+
master_password = "test"
89
77
}
90
78
`,
91
79
Expected: helper.Issues{
92
80
{
93
81
Rule: NewAwsWriteOnlyArgumentsRule(),
94
-
Message: `"password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "password_wo".`,
95
-
Range: hcl.Range{
96
-
Filename: "resource.tf",
97
-
Start: hcl.Pos{Line: 3, Column: 14},
98
-
End: hcl.Pos{Line: 3, Column: 20},
99
-
},
82
+
Message: `"master_password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "master_password_wo".`,
Message: `"master_password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "master_password_wo".`,
Message: `"master_password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "master_password_wo".`,
161
-
Range: hcl.Range{
162
-
Filename: "resource.tf",
163
-
Start: hcl.Pos{Line: 3, Column: 21},
164
-
End: hcl.Pos{Line: 3, Column: 27},
165
-
},
138
+
Message: `"admin_user_password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "admin_user_password_wo".`,
Message: `"admin_password" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "admin_password_wo".`,
195
-
Range: hcl.Range{
196
-
Filename: "resource.tf",
197
-
Start: hcl.Pos{Line: 3, Column: 20},
198
-
End: hcl.Pos{Line: 3, Column: 26},
199
-
},
166
+
Message: `"secret_string" is a non-ephemeral attribute, which means this secret is stored in state. Please use write-only argument "secret_string_wo".`,
0 commit comments