Skip to content

Commit

Permalink
Set img url abs
Browse files Browse the repository at this point in the history
  • Loading branch information
ApexCaptain committed Mar 6, 2022
1 parent 47e9297 commit 3734a1d
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ output "instance-ip" {
As you can see, there are 4 [terraform] resources declared up above and their relationships are as follow.
<img src="assets/hcl-dep.png" width="50%">
<img src="https://github.com/ApexCaptain/cdktf-injector/blob/main/assets/hcl-dep.png?raw=true" width="50%">
- `instance-ip` depends on `my-ec2-instance`
- `my-ec2-instance` depends on `my-subnet`
Expand Down Expand Up @@ -163,7 +163,7 @@ In [cdktf], every resource is a class instance. Thoese are pretty straight forwa
However unlike `hcl`, it is a sequencial language. You cannot create instance refering to another one that is not defined yet.
<img src="assets/cdktf-err.png" width="50%">
<img src="https://github.com/ApexCaptain/cdktf-injector/blob/main/assets/cdktf-err.png?raw=true" width="50%">
When you attempt to declare `subnet` before `vpc`, it'll say "Hey, you cannot use `vpc` before it's been initialized!"

Expand Down
6 changes: 3 additions & 3 deletions docs/classes/TerraformInjectorStack.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/classes/TerraformInjectorStackAsync.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>Using <a href="https://www.terraform.io/">terraform</a> only (<a href="https
<pre><code class="language-hcl"><span class="hl-2">resource</span><span class="hl-4"> &quot;aws_vpc&quot; &quot;my-vpc&quot;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">cidr_block</span><span class="hl-0"> = </span><span class="hl-4">&quot;10.1.0.0/16&quot;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">resource</span><span class="hl-4"> &quot;aws_subnet&quot; &quot;my-subnet&quot;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">vpc_id</span><span class="hl-0"> = aws_vpc</span><span class="hl-6">.</span><span class="hl-0">my-vpc</span><span class="hl-6">.</span><span class="hl-0">id</span><br/><span class="hl-0"> </span><span class="hl-5">cidr_block</span><span class="hl-0"> = </span><span class="hl-4">&quot;10.1.1.0/24&quot;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">resource</span><span class="hl-4"> &quot;aws_instance&quot; &quot;my-ec2-instance&quot;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">subnet_id</span><span class="hl-0"> = aws_subnet</span><span class="hl-6">.</span><span class="hl-0">my-subnet</span><span class="hl-6">.</span><span class="hl-0">id</span><br/><span class="hl-0"> </span><span class="hl-5">ami</span><span class="hl-0"> = </span><span class="hl-4">&quot;ami-2757f631&quot;</span><br/><span class="hl-0"> </span><span class="hl-5">instance_type</span><span class="hl-0"> = </span><span class="hl-4">&quot;t2.micro&quot;</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">output</span><span class="hl-4"> &quot;instance-ip&quot;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = aws_instance</span><span class="hl-6">.</span><span class="hl-0">my-ec2-instance</span><span class="hl-6">.</span><span class="hl-0">public_ip</span><br/><span class="hl-0">}</span>
</code></pre>
<p>As you can see, there are 4 <a href="https://www.terraform.io/">terraform</a> resources declared up above and their relationships are as follow.</p>
<img src="assets/hcl-dep.png" width="50%">
<img src="https://github.com/ApexCaptain/cdktf-injector/blob/main/assets/hcl-dep.png?raw=true" width="50%">

<ul>
<li><code>instance-ip</code> depends on <code>my-ec2-instance</code></li>
Expand All @@ -105,7 +105,7 @@ <h3>Using <a href="https://www.terraform.io/cdktf">cdktf</a> in TypeScript</h3>
</code></pre>
<p>In <a href="https://www.terraform.io/cdktf">cdktf</a>, every resource is a class instance. Thoese are pretty straight forward. Constructing resources using <code>new</code> keyword, passing id string and its config, you can build real world infrastructure.</p>
<p>However unlike <code>hcl</code>, it is a sequencial language. You cannot create instance refering to another one that is not defined yet.</p>
<img src="assets/cdktf-err.png" width="50%">
<img src="https://github.com/ApexCaptain/cdktf-injector/blob/main/assets/cdktf-err.png?raw=true" width="50%">

<p>When you attempt to declare <code>subnet</code> before <code>vpc</code>, it&#39;ll say &quot;Hey, you cannot use <code>vpc</code> before it&#39;s been initialized!&quot;</p>
<p>And that&#39;s where the <code>cdktf-injector</code> comes in.</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/Reference.TerraformInjectorCommon.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/interfaces/TerraformInjector.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/interfaces/TerraformInjectorAsync.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/interfaces/TerraformInjectorElementContainer.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/interfaces/TerraformInjectorElementContainerAsync.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>cdktf-injector</title><meta name="description" content="Documentation for cdktf-injector"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">cdktf-injector</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>cdktf-injector</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Namespaces</h3><ul class="tsd-index-list"><li class="tsd-kind-namespace"><a href="modules/Reference.html" class="tsd-kind-icon">Reference</a></li></ul></section><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/TerraformInjectorStack.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Stack</a></li><li class="tsd-kind-class"><a href="classes/TerraformInjectorStackAsync.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Stack<wbr/>Async</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/TerraformInjector.html" class="tsd-kind-icon">Terraform<wbr/>Injector</a></li><li class="tsd-kind-interface"><a href="interfaces/TerraformInjectorAsync.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Async</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/TerraformInjectorElementContainer.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Element<wbr/>Container</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/TerraformInjectorElementContainerAsync.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Element<wbr/>Container<wbr/>Async</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#TerraformInjectorFactory" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Factory</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="TerraformInjectorFactory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> Terraform<wbr/>Injector<wbr/>Factory<a href="#TerraformInjectorFactory" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Factory<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>scopesOn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Construct</span>, description<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="interfaces/TerraformInjector.html" class="tsd-signature-type" data-tsd-kind="Interface">TerraformInjector</a><span class="tsd-signature-symbol">; </span>scopesOnAsync<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Construct</span>, description<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="interfaces/TerraformInjectorAsync.html" class="tsd-signature-type" data-tsd-kind="Interface">TerraformInjectorAsync</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ApexCaptain/cdktf-injector/blob/96f2c14/src/components/core/constants/terraform-injector.factory.constant.ts#L41">components/core/constants/terraform-injector.factory.constant.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>cdktf-injector</title><meta name="description" content="Documentation for cdktf-injector"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">cdktf-injector</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>cdktf-injector</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Namespaces</h3><ul class="tsd-index-list"><li class="tsd-kind-namespace"><a href="modules/Reference.html" class="tsd-kind-icon">Reference</a></li></ul></section><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/TerraformInjectorStack.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Stack</a></li><li class="tsd-kind-class"><a href="classes/TerraformInjectorStackAsync.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Stack<wbr/>Async</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/TerraformInjector.html" class="tsd-kind-icon">Terraform<wbr/>Injector</a></li><li class="tsd-kind-interface"><a href="interfaces/TerraformInjectorAsync.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Async</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/TerraformInjectorElementContainer.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Element<wbr/>Container</a></li><li class="tsd-kind-interface tsd-has-type-parameter"><a href="interfaces/TerraformInjectorElementContainerAsync.html" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Element<wbr/>Container<wbr/>Async</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#TerraformInjectorFactory" class="tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Factory</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="TerraformInjectorFactory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> Terraform<wbr/>Injector<wbr/>Factory<a href="#TerraformInjectorFactory" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Terraform<wbr/>Injector<wbr/>Factory<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>scopesOn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Construct</span>, description<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="interfaces/TerraformInjector.html" class="tsd-signature-type" data-tsd-kind="Interface">TerraformInjector</a><span class="tsd-signature-symbol">; </span>scopesOnAsync<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Construct</span>, description<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="interfaces/TerraformInjectorAsync.html" class="tsd-signature-type" data-tsd-kind="Interface">TerraformInjectorAsync</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ApexCaptain/cdktf-injector/blob/47e9297/src/components/core/constants/terraform-injector.factory.constant.ts#L41">components/core/constants/terraform-injector.factory.constant.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Constant object for creating <a href="interfaces/TerraformInjector.html">TerraformInjector</a> or <a href="interfaces/TerraformInjectorAsync.html">TerraformInjectorAsync</a> instance.
You can use only one of <code>scopesOn</code> or <code>scopesOnAsync</code> function for one <a href="https://www.npmjs.com/package/constructs" class="external">Construct</a> instance, not both.</p>
</div><dl class="tsd-comment-tags"><dt>see</dt><dd><p><a href="https://www.terraform.io/cdktf/concepts/constructs">https://www.terraform.io/cdktf/concepts/constructs</a></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/Reference.html

Large diffs are not rendered by default.

0 comments on commit 3734a1d

Please sign in to comment.