File tree 3 files changed +54
-0
lines changed
3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 9
9
1 . [ KVM] ( #kvm )
10
10
1 . [ AutoBackupMySQL] ( /autobackupmysql.sh )
11
11
1 . [ Rsnapshot] ( rsnapshot.conf )
12
+ 1 . [ Terraform] ( #terraform )
12
13
1 . [ Teleconsole] ( #teleconsole )
13
14
14
15
47
48
* [ Stop all running vms] ( /kvm/vms-stop.sh )
48
49
49
50
51
+ #### <a name =' terraform ' >Terraform examples:</a >
52
+
53
+ * [ Terraform test GCP] ( /terraform/googleStart.tf )
54
+ * [ Terraform test AWS] ( /terraform/awsStart.tf )
55
+
56
+
50
57
#### [[ ⬆]] ( #toc ) <a name =' teleconsole ' >Teleconsole - terminal sharing:</a >
51
58
``` bash
52
59
# install:
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ aws = {
4
+ source = " "
5
+ version = " ~> 3.27"
6
+ }
7
+ }
8
+
9
+ required_version = " >= 0.14.9"
10
+ }
11
+
12
+ provider "aws" {
13
+ profile = " default"
14
+ region = " us-west-2"
15
+ }
16
+
17
+ resource "aws_instance" "app_server" {
18
+ ami = " ami-03d5c68bab01f3496"
19
+ instance_type = " t2.micro"
20
+
21
+ tags = {
22
+ Name = " Ubuntu20Test"
23
+ }
24
+ }
Original file line number Diff line number Diff line change
1
+ // Configure the Google Cloud provider
2
+ provider "google" {
3
+ credentials = file (" terraform2-sa.json" )
4
+ project = " terraform2-302514"
5
+ region = " us-west1"
6
+ zone = " us-west1-a"
7
+ }
8
+
9
+ resource "google_compute_instance" "vm_instance" {
10
+ name = " terraform2"
11
+ machine_type = " f1-micro"
12
+
13
+ boot_disk {
14
+ initialize_params {
15
+ image = " debian-cloud/debian-9"
16
+ }
17
+ }
18
+
19
+ network_interface {
20
+ # A default network is created for all GCP projects
21
+ network = " default"
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments