Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
8ef4ba4d
Commit
8ef4ba4d
authored
9 months ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
Better volume explanations
parent
0dfe1594
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/Sdi/CloudProvider/gettingStarted.xml
+22
-9
22 additions, 9 deletions
Doc/Sdi/CloudProvider/gettingStarted.xml
with
22 additions
and
9 deletions
Doc/Sdi/CloudProvider/gettingStarted.xml
+
22
−
9
View file @
8ef4ba4d
...
...
@@ -1215,21 +1215,34 @@ resource "hcloud_volume" "volume01" {
<figure
xml:id=
"sdi_cloudProvider_volumeServerIndependent"
>
<title>
Solution: Independent resource creation
</title>
<programlisting
language=
"tf"
>
resource "hcloud_volume" "
<emphasis
role=
"red"
>
volume01
</emphasis>
" {
size = 10
....
<informaltable
border=
"1"
>
<tr>
<th><filename>
main.tf
</filename></th>
<th><filename>
userData.yml.tpl
</filename></th>
</tr>
<tr>
<td
valign=
"top"
><programlisting
language=
"tf"
>
resource "hcloud_volume" "
<emphasis
role=
"red"
>
vol01
</emphasis>
" {
size = 10 ....
}
resource "hcloud_server" "helloServer" {
user_data = templatefile("
tpl/
userData.yml", {
volume01Id = hcloud_volume.
<emphasis
role=
"
red
"
>
volume01
</emphasis>
.id # No cycle any more
...
user_data = templatefile("userData.yml
.tpl
", {
<emphasis
role=
"
blue
"
>
volume01
Id
</emphasis>
= hcloud_volume.
<emphasis
role=
"red"
>
vol01
</emphasis>
.id # No cycle
}) ...
}
resource "hcloud_volume_attachment" "main" {
volume_id = hcloud_volume.
<emphasis
role=
"red"
>
vol
ume
01
</emphasis>
.id
volume_id = hcloud_volume.
<emphasis
role=
"red"
>
vol01
</emphasis>
.id
server_id = hcloud_server.helloServer.id
}
</programlisting>
}
</programlisting></td>
<td
valign=
"top"
><programlisting
language=
"bash"
>
echo `/bin/ls /dev/disk/by-id/*${
<emphasis
role=
"blue"
>
volume01Id
</emphasis>
}`
/
<emphasis
role=
"red"
>
vol01
</emphasis>
xfs discard,nofail,defaults 0 0
>>
/etc/fstab
</programlisting></td>
</tr>
</informaltable>
</figure>
<qandaset
defaultlabel=
"qanda"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment