-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(component): validate good component
- Loading branch information
1 parent
501e624
commit 31bc683
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Module: Component | ||
|
||
## Define component | ||
|
||
Component **MUST** use turo component provider to define the component, and the resource name **MUST** suffixed with `_component`. | ||
|
||
```tf | ||
module "component_good_foo_bar" { | ||
source = "app.terraform.io/turo/component-metadata/null" | ||
version = "3.1.2" | ||
name = "good-foo-bar" | ||
system_metadata = var.metadata_module.parent_system_metadata | ||
} | ||
``` | ||
|
||
## Locate the component | ||
|
||
### Simple Component | ||
|
||
Component **MUST** sit in a terraform file named `<component-name>.tf` | ||
|
||
For the above good-foo-bar example, the file name **SHOULD** be `good-foo-bar.tf` | ||
|
||
### Component module | ||
|
||
Component **MUST** sit in the `main.tf` of the component module/folder. | ||
|
||
For the above good-foo-bar example, the file **SHOULD** be `<component-name>-component/main.tf`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters