-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path7.后记.html
1041 lines (408 loc) · 30.1 KB
/
7.后记.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>后记 · GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-tomorrow.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="prev" href="6.4.provisioner与user_data.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Introduction
</a>
</li>
<li class="chapter " data-level="1.2" data-path="1.Terraform初步体验.html">
<a href="1.Terraform初步体验.html">
Terraform初步体验
</a>
</li>
<li class="chapter " data-level="1.3" >
<span>
Terraform基础概念
</span>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="2.1.Terraform基础概念——Provider.html">
<a href="2.1.Terraform基础概念——Provider.html">
Provider
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="2.2.Terraform基础概念——状态管理.html">
<a href="2.2.Terraform基础概念——状态管理.html">
状态管理
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" data-path="3.Terraform代码的书写.html">
<a href="3.Terraform代码的书写.html">
Terraform代码的书写
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="3.1.类型.html">
<a href="3.1.类型.html">
类型
</a>
</li>
<li class="chapter " data-level="1.4.2" data-path="3.2.配置语法.html">
<a href="3.2.配置语法.html">
配置语法
</a>
</li>
<li class="chapter " data-level="1.4.3" data-path="3.3.输入变量.html">
<a href="3.3.输入变量.html">
输入变量
</a>
</li>
<li class="chapter " data-level="1.4.4" data-path="3.4.输出值.html">
<a href="3.4.输出值.html">
输出值
</a>
</li>
<li class="chapter " data-level="1.4.5" data-path="3.5.局部值.html">
<a href="3.5.局部值.html">
局部值
</a>
</li>
<li class="chapter " data-level="1.4.6" data-path="3.6.资源.html">
<a href="3.6.资源.html">
资源
</a>
</li>
<li class="chapter " data-level="1.4.7" data-path="3.7.数据源.html">
<a href="3.7.数据源.html">
数据源
</a>
</li>
<li class="chapter " data-level="1.4.8" data-path="3.8.表达式.html">
<a href="3.8.表达式.html">
表达式
</a>
</li>
<li class="chapter " data-level="1.4.9" data-path="3.9.重载文件.html">
<a href="3.9.重载文件.html">
重载文件
</a>
</li>
<li class="chapter " data-level="1.4.10" data-path="3.10.代码风格规范.html">
<a href="3.10.代码风格规范.html">
代码风格规范
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" data-path="4.Terraform模块.html">
<a href="4.Terraform模块.html">
Terraform模块
</a>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="4.1.创建模块.html">
<a href="4.1.创建模块.html">
创建模块
</a>
</li>
<li class="chapter " data-level="1.5.2" data-path="4.2.使用模块.html">
<a href="4.2.使用模块.html">
使用模块
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="5.Terraform命令行.html">
<a href="5.Terraform命令行.html">
Terraform命令行
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="5.1.命令行配置文件.html">
<a href="5.1.命令行配置文件.html">
命令行配置文件
</a>
</li>
<li class="chapter " data-level="1.6.2" data-path="5.2.环境变量.html">
<a href="5.2.环境变量.html">
环境变量
</a>
</li>
<li class="chapter " data-level="1.6.3" data-path="5.3.资源地址.html">
<a href="5.3.资源地址.html">
资源地址
</a>
</li>
<li class="chapter " data-level="1.6.4" data-path="5.4.apply.html">
<a href="5.4.apply.html">
apply
</a>
</li>
<li class="chapter " data-level="1.6.5" data-path="5.5.console.html">
<a href="5.5.console.html">
console
</a>
</li>
<li class="chapter " data-level="1.6.6" data-path="5.6.destroy.html">
<a href="5.6.destroy.html">
destroy
</a>
</li>
<li class="chapter " data-level="1.6.7" data-path="5.7.fmt.html">
<a href="5.7.fmt.html">
fmt
</a>
</li>
<li class="chapter " data-level="1.6.8" data-path="5.8.force-unlock.html">
<a href="5.8.force-unlock.html">
force-unlock
</a>
</li>
<li class="chapter " data-level="1.6.9" data-path="5.9.get.html">
<a href="5.9.get.html">
get
</a>
</li>
<li class="chapter " data-level="1.6.10" data-path="5.10.graph.html">
<a href="5.10.graph.html">
graph
</a>
</li>
<li class="chapter " data-level="1.6.11" data-path="5.11.import.html">
<a href="5.11.import.html">
import
</a>
</li>
<li class="chapter " data-level="1.6.12" data-path="5.12.init.html">
<a href="5.12.init.html">
init
</a>
</li>
<li class="chapter " data-level="1.6.13" data-path="5.13.output.html">
<a href="5.13.output.html">
output
</a>
</li>
<li class="chapter " data-level="1.6.14" data-path="5.14.plan.html">
<a href="5.14.plan.html">
plan
</a>
</li>
<li class="chapter " data-level="1.6.15" data-path="5.15.providers.html">
<a href="5.15.providers.html">
providers
</a>
</li>
<li class="chapter " data-level="1.6.16" data-path="5.16.refresh.html">
<a href="5.16.refresh.html">
refresh
</a>
</li>
<li class="chapter " data-level="1.6.17" data-path="5.17.show.html">
<a href="5.17.show.html">
show
</a>
</li>
<li class="chapter " data-level="1.6.18" data-path="5.18.state.html">
<a href="5.18.state.html">
state
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.18.1" data-path="5.18.1.list.html">
<a href="5.18.1.list.html">
list
</a>
</li>
<li class="chapter " data-level="1.6.18.2" data-path="5.18.2.mv.html">
<a href="5.18.2.mv.html">
mv
</a>
</li>
<li class="chapter " data-level="1.6.18.3" data-path="5.18.3.pull.html">
<a href="5.18.3.pull.html">
pull
</a>
</li>
<li class="chapter " data-level="1.6.18.4" data-path="5.18.4.push.html">
<a href="5.18.4.push.html">
push
</a>
</li>
<li class="chapter " data-level="1.6.18.5" data-path="5.18.5.replace-provider.html">
<a href="5.18.5.replace-provider.html">
replace-provider
</a>
</li>
<li class="chapter " data-level="1.6.18.6" data-path="5.18.6.rm.html">
<a href="5.18.6.rm.html">
rm
</a>
</li>
<li class="chapter " data-level="1.6.18.7" data-path="5.18.7.show.html">
<a href="5.18.7.show.html">
show
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6.19" data-path="5.19.taint.html">
<a href="5.19.taint.html">
taint
</a>
</li>
<li class="chapter " data-level="1.6.20" data-path="5.20.validate.html">
<a href="5.20.validate.html">
validate
</a>
</li>
<li class="chapter " data-level="1.6.21" data-path="5.21.untaint.html">
<a href="5.21.untaint.html">
untaint
</a>
</li>
<li class="chapter " data-level="1.6.22" data-path="5.22.workspace.html">
<a href="5.22.workspace.html">
workspace
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.22.1" data-path="5.22.1.list.html">
<a href="5.22.1.list.html">
list
</a>
</li>
<li class="chapter " data-level="1.6.22.2" data-path="5.22.2.select.html">
<a href="5.22.2.select.html">
select
</a>
</li>
<li class="chapter " data-level="1.6.22.3" data-path="5.22.3.new.html">
<a href="5.22.3.new.html">
new
</a>
</li>
<li class="chapter " data-level="1.6.22.4" data-path="5.22.4.delete.html">
<a href="5.22.4.delete.html">
delete
</a>
</li>
<li class="chapter " data-level="1.6.22.5" data-path="5.22.5.show.html">
<a href="5.22.5.show.html">
show
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="1.7" data-path=".6.Aha.md">
<span>
Aha
</a>
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="6.1.有条件创建.html">
<a href="6.1.有条件创建.html">
有条件创建
</a>
</li>
<li class="chapter " data-level="1.7.2" data-path="6.2.依赖反转.html">
<a href="6.2.依赖反转.html">
依赖反转
</a>
</li>
<li class="chapter " data-level="1.7.3" data-path="6.3.多可用区分布.html">
<a href="6.3.多可用区分布.html">
多可用区分布
</a>
</li>
<li class="chapter " data-level="1.7.4" data-path="6.4.provisioner与user_data.html">
<a href="6.4.provisioner与user_data.html">
provisioner与user_data
</a>
</li>
</ul>
</li>
<li class="chapter active" data-level="1.8" data-path="7.后记.html">
<a href="7.后记.html">
后记
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >后记</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="后记">后记</h1>
<p>原本只是想简单翻译一下官方文档中比较重要的部分,一是能够使得更多的中国工程师能够有兴趣去试用Terraform这样优秀的工具,二是给志在获得Terraform认证的朋友一个阅读起来容易一些的中文文档,帮助更多的人拿下考试。但是翻着翻着发觉工作量比自己一开始想的大,感到自己无论在英文、中文还是技术方面都比较吃力,并非一开始想的那么轻松。由于能力有限,这本入门教程暂时就写这么些内容了,当然难免会有一些错误疏漏的地方,还请各位方家不吝赐教斧正。</p>
<p>在写这部教程时其实已经在家里闲居半年有余了,这些年经历了一些事,也总算是理解了辛弃疾说的:欲说还休,却道天凉好个秋!</p>
<p>了解Terraform越多,越觉得在基础设施这一块的发展脉络越是明晰:从最早的配置管理工具,到CloudFormation这样的专有工具,再到Terraform这样的IaC工具;从可变基础设施,到不可变基础设施。而未来,Pulumi这样的优秀工具也已经开始展现出耀眼的光芒。我个人认为,后端开发未来会有很大的不同,原先不少开发人员会鄙视运维,觉得自己会写代码,会调JVM参数,会给操作系统内核打补丁就是高人一等,而装机、配置网络和数据库、设置监控和告警是低人一等的运维干的。持有这种错觉的后端开发将来会被残酷淘汰。在我看来,未来的后端研发的方向类似于军事改革中的空地一体化协同,强大的基础设施工具链提供了强有力的支持,而少量精干的研发可以用代码定义自己的业务逻辑以及基础设施逻辑,开发和运维的界限将会逐渐模糊。Terraform目前是这个方向上的领军人物,但没有理由认为IaC会止步于此,未来必然会有更多像Pulumi这样把业务逻辑和基础设施用一套代码定义出来的一整套的编程范式出现,到那时,容器也好,FaaS也好,还是现在的IaaS也好,它们的差异就会跟我们现在在代码里决定是用链表还是哈希表一样。这应该就是未来的Cloud Engineering。</p>
<p>编写这部教程的过程中,一方面得到了一些师长好友的鼓励和建议,另一方面我的太太并没有用世俗的眼光打量我这个闲居在家的“无用男人”,深感得妻如此夫复何求。这是我写的第一部教程,有点像我的一个孩子,在此献给我的朋友们以及我的太太。</p>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="6.4.provisioner与user_data.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: provisioner与user_data">
<i class="fa fa-angle-left"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {