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
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+43-6Lines changed: 43 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Please note we have a code of conduct, please follow it in all your interactions
18
18
-[Base project name](#base-project-name)
19
19
-[Unique prefix of resource names](#unique-prefix-of-resource-names)
20
20
-[Separators](#separators)
21
-
-[Depends_on](#depends_on)
21
+
-[Resource and Data Source Conventions](#resource-and-data-source-conventions)
22
22
-[Resource names](#resource-names)
23
23
-[Variable names](#variable-names)
24
24
-[Output names](#output-names)
@@ -167,16 +167,50 @@ The `local.name` value is then used as a prefix for all `name` and `name_prefix`
167
167
168
168
> Use `name_prefix` where possible
169
169
170
-
#### Depends_on
170
+
#### Resource and Data Source Conventions
171
+
- Include `count` an argument inside resource blocks as the first argument at the top and separate by newline after it:
171
172
172
-
When you need to add `depends_on` to a resource or a module you should put it at the end of the block with empty line in front of it.
173
+
```
174
+
resource "aws_instance" "app" {
175
+
count = "3"
176
+
177
+
...
178
+
}
179
+
```
180
+
181
+
- Include `tags` the argument, if supported by resource as the last real argument, following by `depends_on` and `lifecycle`, if necessary. All of these should be separated by a single empty line:
182
+
183
+
```
184
+
resource "aws_instance" "app" {
185
+
count = "1"
186
+
187
+
...
188
+
189
+
tags = {
190
+
Name = "..."
191
+
}
192
+
193
+
depends_on = []
194
+
195
+
lifecycle {}
196
+
}
197
+
```
198
+
199
+
- When using condition in `count` argument use boolean value if it makes sense, otherwise use `length` or other interpolation:
0 commit comments