88
88
``` hcl
89
89
resource "codefresh_context" "test-secret-yaml" {
90
90
name = "my-shared-secret-yaml"
91
+ decrypt_spec = false
91
92
spec {
92
93
# NOTE: The `-` from secret-yaml is stripped because the character is not allowed in Field name
93
94
# File passed MUST be a valid YAML
@@ -96,6 +97,82 @@ resource "codefresh_context" "test-secret-yaml" {
96
97
}
97
98
```
98
99
100
+ #### AWS S3 storage context
101
+
102
+ ``` hcl
103
+ resource "codefresh_context" "test-s3" {
104
+ name = "my-s3-context"
105
+
106
+ decrypt_spec = false
107
+
108
+ spec {
109
+ storages3 {
110
+ data {
111
+ auth {
112
+ type = "basic"
113
+ json_config = {accessKeyId = "key", secretAccessKey = "secret"}
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ #### Azure file storage context
122
+
123
+ ``` hcl
124
+ resource "codefresh_context" "test-azure" {
125
+ name = "my-azure-file-context"
126
+
127
+ decrypt_spec = false
128
+
129
+ spec {
130
+ storageazuref {
131
+ data {
132
+ auth {
133
+ type = "basic"
134
+ account_name = "account"
135
+ account_key = "key"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ #### Google cloud storage context
144
+
145
+ ``` hcl
146
+ resource "codefresh_context" "test-google-cloud-storage" {
147
+ name = "my-gcs-context"
148
+
149
+ spec {
150
+ storagegc {
151
+ data {
152
+ auth {
153
+ type = "basic"
154
+ json_config = jsondecode(<<EOF
155
+ {
156
+ "type": "service_account",
157
+ "project_id": "PROJECT_ID",
158
+ "private_key_id": "KEY_ID",
159
+ "private_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY\n-----END PRIVATE KEY-----\n",
160
+ "client_email": "SERVICE_ACCOUNT_EMAIL",
161
+ "client_id": "CLIENT_ID",
162
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
163
+ "token_uri": "https://accounts.google.com/o/oauth2/token",
164
+ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
165
+ "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/SERVICE_ACCOUNT_EMAIL"
166
+ }
167
+ EOF
168
+ )
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ ```
175
+
99
176
<!-- schema generated by tfplugindocs -->
100
177
## Schema
101
178
0 commit comments