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{} {
2525 contextAuth := contextData ["auth" ].([]interface {})[0 ].(map [string ]interface {})
2626 auth := make (map [string ]interface {})
2727 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" ]
3030 return convertStorageContext (context , auth )
3131}
3232
@@ -61,8 +61,8 @@ func FlattenJsonConfigStorageContextConfig(spec cfClient.ContextSpec) []interfac
6161func FlattenAzureStorageContextConfig (spec cfClient.ContextSpec ) []interface {} {
6262 auth := make (map [string ]interface {})
6363 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 " ]
6666 auth ["type" ] = spec .Data ["type" ]
6767 return flattenStorageContextConfig (spec , auth )
6868}
Original file line number Diff line number Diff line change 1- resource "codefresh_context" "storage_integration " {
1+ resource "codefresh_context" "gcs " {
22 for_each = toset ([" create" ])
3- name = " pasha-test-t2 "
3+ name = " gcs "
44 spec {
55 storagegc {
66 data {
77 auth {
88 type = " basic"
99 json_config = tomap ({
10- " fd " : " fd "
10+ " config " : " cf "
1111 })
1212 }
1313 }
1414 }
1515 }
1616}
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