File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,20 @@ terraform {
12
12
}
13
13
}
14
14
15
+ provider "iterative" {}
16
+ resource "iterative_runner" "runner-aws" {
17
+ name = " holy-moly57"
18
+ token = " arszDpb3xtNdKaXmQ6vN"
19
+ repo = " https://gitlab.com/DavidGOrtega/3_tensorboard"
20
+ driver = " gitlab"
21
+ labels = " tf"
22
+
23
+ cloud = " aws"
24
+ region = " us-west"
25
+ instance_type = " t2.micro"
26
+ }
27
+
28
+ /*
15
29
provider "iterative" {}
16
30
resource "iterative_runner" "runner-az" {
17
31
name = "holy-moly56"
@@ -24,6 +38,7 @@ resource "iterative_runner" "runner-az" {
24
38
region = "us-west"
25
39
instance_type = "m"
26
40
}
41
+ */
27
42
28
43
29
44
/*
Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ func MachinePrefix(d *schema.ResourceData) string {
16
16
}
17
17
18
18
func SetId (d * schema.ResourceData ) {
19
- sid , _ := shortid .New (1 , shortid .DefaultABC , 2342 )
20
- id , _ := sid .Generate ()
21
- name := "iterative-" + id
22
- d .SetId (name )
19
+ if len (d .Id ()) == 0 {
20
+ sid , _ := shortid .New (1 , shortid .DefaultABC , 2342 )
21
+ id , _ := sid .Generate ()
22
+ name := "iterative-" + id
23
+ d .SetId (name )
23
24
24
- if len (d .Get ("name" ).(string )) == 0 {
25
- d .Set ("name" , name )
25
+ if len (d .Get ("name" ).(string )) == 0 {
26
+ d .Set ("name" , name )
27
+ }
26
28
}
27
29
}
You can’t perform that action at this time.
0 commit comments