Skip to content

Commit 05ae26b

Browse files
docs
1 parent d8474f8 commit 05ae26b

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

docs/resources/context.md

+77
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ YAML
8888
```hcl
8989
resource "codefresh_context" "test-secret-yaml" {
9090
name = "my-shared-secret-yaml"
91+
decrypt_spec = false
9192
spec {
9293
# NOTE: The `-` from secret-yaml is stripped because the character is not allowed in Field name
9394
# File passed MUST be a valid YAML
@@ -96,6 +97,82 @@ resource "codefresh_context" "test-secret-yaml" {
9697
}
9798
```
9899

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+
99176
<!-- schema generated by tfplugindocs -->
100177
## Schema
101178

0 commit comments

Comments
 (0)