File tree Expand file tree Collapse file tree 2 files changed +40
-7
lines changed
examples/storate_integration Expand file tree Collapse file tree 2 files changed +40
-7
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ func ConvertAzureStorageContext(context []interface{}) map[string]interface{} {
25
25
contextAuth := contextData ["auth" ].([]interface {})[0 ].(map [string ]interface {})
26
26
auth := make (map [string ]interface {})
27
27
auth ["type" ] = contextAuth ["type" ]
28
- auth ["account_name " ] = contextAuth ["account_name" ]
29
- auth ["account_key " ] = contextAuth ["account_key" ]
28
+ auth ["accountName " ] = contextAuth ["account_name" ]
29
+ auth ["accountKey " ] = contextAuth ["account_key" ]
30
30
return convertStorageContext (context , auth )
31
31
}
32
32
@@ -61,8 +61,8 @@ func FlattenJsonConfigStorageContextConfig(spec cfClient.ContextSpec) []interfac
61
61
func FlattenAzureStorageContextConfig (spec cfClient.ContextSpec ) []interface {} {
62
62
auth := make (map [string ]interface {})
63
63
authParams := spec .Data ["auth" ].(map [string ]interface {})
64
- auth ["account_name" ] = authParams ["account_name " ]
65
- auth ["account_key" ] = authParams ["account_key " ]
64
+ auth ["account_name" ] = authParams ["accountName " ]
65
+ auth ["account_key" ] = authParams ["accountKey " ]
66
66
auth ["type" ] = spec .Data ["type" ]
67
67
return flattenStorageContextConfig (spec , auth )
68
68
}
Original file line number Diff line number Diff line change 1
- resource "codefresh_context" "storage_integration " {
1
+ resource "codefresh_context" "gcs " {
2
2
for_each = toset ([" create" ])
3
- name = " pasha-test-t2 "
3
+ name = " gcs "
4
4
spec {
5
5
storagegc {
6
6
data {
7
7
auth {
8
8
type = " basic"
9
9
json_config = tomap ({
10
- " fd " : " fd "
10
+ " config " : " cf "
11
11
})
12
12
}
13
13
}
14
14
}
15
15
}
16
16
}
17
+
18
+ resource "codefresh_context" "s3" {
19
+ for_each = toset ([" create" ])
20
+ name = " s3"
21
+ spec {
22
+ storages3 {
23
+ data {
24
+ auth {
25
+ type = " basic"
26
+ json_config = tomap ({
27
+ " config" : " cf"
28
+ })
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ resource "codefresh_context" "azure" {
36
+ for_each = toset ([" create" ])
37
+ name = " azure"
38
+ spec {
39
+ storageazuref {
40
+ data {
41
+ auth {
42
+ type = " basic"
43
+ account_name = " accName"
44
+ account_key = " accKey"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
You can’t perform that action at this time.
0 commit comments