Skip to content

Commit

Permalink
Update documentation around self references (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Yoriyasu Yano <[email protected]>
  • Loading branch information
yorinasub17 authored Dec 12, 2022
1 parent 20d7da6 commit d05ca80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _custom/main.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
(import './root.libsonnet') + (import './helpers.libsonnet')
(import './root.libsonnet')
+ (import './helpers.libsonnet')
9 changes: 9 additions & 0 deletions _custom/root.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ local withProvider(name, attrs, alias=null) =
//
// $._ref.null_resource.foo.get('id')
//
// NOTE: When chaining and merging multiple calls to withResource, withData, and withModule, you may not be able to use
// super, self, or $ to get the reference to `_ref`. Instead, make an explicit binding to the outer object using local.
//
// Args:
// type (string): The resource type to create (e.g., aws_instance, null_resource, etc).
// label (string): The label to apply to the instance of the resource.
Expand Down Expand Up @@ -77,6 +80,9 @@ local withResource(type, label, attrs) = {
//
// $._ref.data.azurerm_virtual_network.foo.get('id')
//
// NOTE: When chaining and merging multiple calls to withResource, withData, and withModule, you may not be able to use
// super, self, or $ to get the reference to `_ref`. Instead, make an explicit binding to the outer object using local.
//
// Args:
// type (string): The data source type to create (e.g., aws_instance, local_file, etc).
// label (string): The label to apply to the instance of the data source.
Expand Down Expand Up @@ -119,6 +125,9 @@ local withData(type, label, attrs) = {
//
// $._ref.module.foo.get('id')
//
// NOTE: When chaining and merging multiple calls to withResource, withData, and withModule, you may not be able to use
// super, self, or $ to get the reference to `_ref`. Instead, make an explicit binding to the outer object using local.
//
// Args:
// name (string): The name of the module block.
// source (string): The source for the module block.
Expand Down

0 comments on commit d05ca80

Please sign in to comment.