@@ -36,7 +36,8 @@ Only one scope per resource is allowed.
3636
3737``` terraform
3838# Create Tanzu Mission Control kubernetes secret with attached set as default value.
39- resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
39+ # Example for creating the dockerconfigjson secret
40+ resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" {
4041 name = "tf-secret" # Required
4142 namespace_name = "tf-secret-namespace-name" # Required
4243
@@ -63,6 +64,34 @@ resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
6364 }
6465 }
6566}
67+
68+ # Example for creating the opaque secret
69+ resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" {
70+ name = "tf-secret" # Required
71+ namespace_name = "tf-secret-namespace-name" # Required
72+
73+ scope {
74+ cluster {
75+ name = "testcluster" # Required
76+ provisioner_name = "attached" # Default: attached
77+ management_cluster_name = "attached" # Default: attached
78+ }
79+ }
80+
81+ export = false # Default: false
82+
83+ meta {
84+ description = "Create namespace through terraform"
85+ labels = { "key" : "value" }
86+ }
87+
88+ spec {
89+ opaque = {
90+ "key1" : "value1"
91+ "key2" : "value2"
92+ }
93+ }
94+ }
6695```
6796
6897<!-- schema generated by tfplugindocs -->
@@ -119,9 +148,10 @@ Required:
119148<a id =" nestedblock--spec " ></a >
120149### Nested Schema for ` spec `
121150
122- Required :
151+ Optional :
123152
124- - ` docker_config_json ` (Block List, Min: 1) SecretType definition - SECRET_TYPE_DOCKERCONFIGJSON, Kubernetes secrets type. (see [ below for nested schema] ( #nestedblock--spec--docker_config_json ) )
153+ - ` docker_config_json ` (Block List) SecretType definition - SECRET_TYPE_DOCKERCONFIGJSON, Kubernetes secrets type. (see [ below for nested schema] ( #nestedblock--spec--docker_config_json ) )
154+ - ` opaque ` (Map of String, Sensitive) SecretType definition - SECRET_TYPE_OPAQUE, Kubernetes secrets type.
125155
126156<a id =" nestedblock--spec--docker_config_json " ></a >
127157### Nested Schema for ` spec.docker_config_json `
@@ -155,7 +185,8 @@ Read-Only:
155185
156186``` terraform
157187# Create Tanzu Mission Control kubernetes secret with attached set as default value.
158- resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
188+ # Example for creating the dockerconfigjson secret
189+ resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" {
159190 name = "tf-secret" # Required
160191 namespace_name = "tf-secret-namespace-name" # Required
161192
@@ -180,6 +211,32 @@ resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
180211 }
181212 }
182213}
214+
215+ # Example for creating the opaque secret
216+ resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" {
217+ name = "tf-secret" # Required
218+ namespace_name = "tf-secret-namespace-name" # Required
219+
220+ scope {
221+ cluster_group {
222+ name = "default" # Required
223+ }
224+ }
225+
226+ export = false # Default: false
227+
228+ meta {
229+ description = "Create namespace through terraform"
230+ labels = { "key" : "value" }
231+ }
232+
233+ spec {
234+ opaque = {
235+ "key1" : "value1"
236+ "key2" : "value2"
237+ }
238+ }
239+ }
183240```
184241
185242<!-- schema generated by tfplugindocs -->
@@ -236,9 +293,10 @@ Required:
236293<a id =" nestedblock--spec " ></a >
237294### Nested Schema for ` spec `
238295
239- Required :
296+ Optional :
240297
241- - ` docker_config_json ` (Block List, Min: 1) SecretType definition - SECRET_TYPE_DOCKERCONFIGJSON, Kubernetes secrets type. (see [ below for nested schema] ( #nestedblock--spec--docker_config_json ) )
298+ - ` docker_config_json ` (Block List) SecretType definition - SECRET_TYPE_DOCKERCONFIGJSON, Kubernetes secrets type. (see [ below for nested schema] ( #nestedblock--spec--docker_config_json ) )
299+ - ` opaque ` (Map of String, Sensitive) SecretType definition - SECRET_TYPE_OPAQUE, Kubernetes secrets type.
242300
243301<a id =" nestedblock--spec--docker_config_json " ></a >
244302### Nested Schema for ` spec.docker_config_json `
0 commit comments