Skip to content

Commit 95c77a8

Browse files
authored
Merge branch 'vmware:main' into zxp/increasReadyWait30s
2 parents 4266314 + 589598f commit 95c77a8

File tree

97 files changed

+1211
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1211
-395
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ifeq ($(TEST_FLAGS),)
2222
endif
2323

2424
ifeq ($(BUILD_TAGS),)
25-
BUILD_TAGS := 'akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy helmfeature helmrelease backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate'
25+
BUILD_TAGS := 'akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy helmfeature helmrelease helmcharts helmrepository backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate'
2626
endif
2727

2828
.PHONY: build clean-up test gofmt vet lint acc-test website-lint website-lint-fix

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Example:
111111

112112
```shell
113113
$ export TMC_ENDPOINT = my-org.tmc.cloud.vmware.com
114-
$ export VMW_CLOUD_ENDPOINT = console.cloud.vmware.com
114+
$ export VMW_CLOUD_ENDPOINT = console.tanzu.broadcom.com
115115
```
116116

117117
Environment variables specific to particular resources:

docs/data-sources/kubernetes_secret.md

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ Read-Only:
116116
Read-Only:
117117

118118
- `docker_config_json` (List of Object) (see [below for nested schema](#nestedobjatt--spec--docker_config_json))
119+
- `opaque` (Map of String)
119120

120121
<a id="nestedobjatt--spec--docker_config_json"></a>
121122
### Nested Schema for `spec.docker_config_json`
@@ -217,6 +218,7 @@ Read-Only:
217218
Read-Only:
218219

219220
- `docker_config_json` (List of Object) (see [below for nested schema](#nestedobjatt--spec--docker_config_json))
221+
- `opaque` (Map of String)
220222

221223
<a id="nestedobjatt--spec--docker_config_json"></a>
222224
### Nested Schema for `spec.docker_config_json`

docs/data-sources/package_install.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ Read-Only:
9797

9898
Read-Only:
9999

100-
- `inline_values` (Map of String)
100+
- `inline_values` (Map of String) Deprecated, use `path_to_inline_values` instead. Inline values to configure the Package Install.
101101
- `package_ref` (List of Object) (see [below for nested schema](#nestedobjatt--spec--package_ref))
102+
- `path_to_inline_values` (String) File to read inline values from (in yaml format). User needs to specify the file path for inline values
102103
- `role_binding_scope` (String)
103104

104105
<a id="nestedobjatt--spec--package_ref"></a>

docs/guides/provider_behind_proxy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ provider "tanzu-mission-control" {
2121
vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var
2222
2323
# if you are using dev or different csp endpoint, change the default value below
24-
# for production environments the vmw_cloud_endpoint is console.cloud.vmware.com
25-
# vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var
24+
# for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com
25+
# vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var
2626
2727
# the following values shall be only populated when the provider needs to be used behind a proxy.
2828
# these values will only work if the user provides HTTP_PROXY or HTTPS_PROXY env var

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ provider "tanzu-mission-control" {
7474
vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var
7575
7676
# if you are using dev or different csp endpoint, change the default value below
77-
# for production environments the vmw_cloud_endpoint is console.cloud.vmware.com
78-
# vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var
77+
# for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com
78+
# vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var
7979
}
8080
8181
# Provider configuration for TMC Self-Managed

docs/resources/kubernetes_secret.md

+64-6
Original file line numberDiff line numberDiff line change
@@ -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`

docs/resources/package_install.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,22 @@ resource "tanzu-mission-control_package_install" "create_package_install" {
4545
}
4646
}
4747
48-
inline_values = { "test" : "test" }
48+
path_to_inline_values = "<inline-values-file-path>"
49+
50+
inline_values = { "test" : "test" } # Deprecated
4951
}
5052
}
5153
```
54+
55+
#### Inline values file
56+
57+
```yaml
58+
test: test
59+
test_nested_key:
60+
test_nested_key1: test_nested_value1
61+
test_nested_key2: test_nested_value2
62+
```
63+
5264
<!-- schema generated by tfplugindocs -->
5365
## Schema
5466
@@ -98,7 +110,8 @@ Required:
98110

99111
Optional:
100112

101-
- `inline_values` (Map of String, Sensitive) Inline values to configure the Package Install.
113+
- `inline_values` (Map of String, Sensitive, Deprecated) Deprecated, use `path_to_inline_values` instead. Inline values to configure the Package Install.
114+
- `path_to_inline_values` (String) File to read inline values from (in yaml format). User needs to specify the file path for inline values.
102115

103116
Read-Only:
104117

examples/provider/provider.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ provider "tanzu-mission-control" {
44
vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var
55

66
# if you are using dev or different csp endpoint, change the default value below
7-
# for production environments the vmw_cloud_endpoint is console.cloud.vmware.com
8-
# vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var
7+
# for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com
8+
# vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var
99
}
1010

1111
# Provider configuration for TMC Self-Managed

examples/provider/variables.tf

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ variable "endpoint" {
22
}
33

44
variable "vmw_cloud_api_token" {
5+
default = "https://console.tanzu.broadcom.com"
56
}
67

78
variable "vmw_cloud_endpoint" {
8-
default = "console.cloud.vmware.com"
9+
default = "console.tanzu.broadcom.com"
910
}
1011

1112
variable "oidc_issuer" {

examples/proxy/provider.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ provider "tanzu-mission-control" {
33
vmw_cloud_api_token = var.vmw_cloud_api_token # optionally use VMW_CLOUD_API_TOKEN env var
44

55
# if you are using dev or different csp endpoint, change the default value below
6-
# for production environments the vmw_cloud_endpoint is console.cloud.vmware.com
7-
# vmw_cloud_endpoint = "console.cloud.vmware.com" or optionally use VMW_CLOUD_ENDPOINT env var
6+
# for production environments the vmw_cloud_endpoint is console.tanzu.broadcom.com
7+
# vmw_cloud_endpoint = "console.tanzu.broadcom.com" or optionally use VMW_CLOUD_ENDPOINT env var
88

99
# the following values shall be only populated when the provider needs to be used behind a proxy.
1010
# these values will only work if the user provides HTTP_PROXY or HTTPS_PROXY env var

examples/proxy/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variable "client_auth_key" {}
88
variable "ca_cert" {}
99

1010
variable "vmw_cloud_endpoint" {
11-
default = "console.cloud.vmware.com"
11+
default = "console.tanzu.broadcom.com"
1212
}
1313

1414
variable "insecure_allow_unverified_ssl" {

examples/resources/kubernetes_secret/cg_resource.tf

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Create Tanzu Mission Control kubernetes secret with attached set as default value.
2-
resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
2+
# Example for creating the dockerconfigjson secret
3+
resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" {
34
name = "tf-secret" # Required
45
namespace_name = "tf-secret-namespace-name" # Required
56

@@ -23,4 +24,30 @@ resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
2324
image_registry_url = "testimageregistryurl" # Required
2425
}
2526
}
26-
}
27+
}
28+
29+
# Example for creating the opaque secret
30+
resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" {
31+
name = "tf-secret" # Required
32+
namespace_name = "tf-secret-namespace-name" # Required
33+
34+
scope {
35+
cluster_group {
36+
name = "default" # Required
37+
}
38+
}
39+
40+
export = false # Default: false
41+
42+
meta {
43+
description = "Create namespace through terraform"
44+
labels = { "key" : "value" }
45+
}
46+
47+
spec {
48+
opaque = {
49+
"key1" : "value1"
50+
"key2" : "value2"
51+
}
52+
}
53+
}

examples/resources/kubernetes_secret/resource.tf

+31-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Create Tanzu Mission Control kubernetes secret with attached set as default value.
2-
resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
2+
# Example for creating the dockerconfigjson secret
3+
resource "tanzu-mission-control_kubernetes_secret" "create_dockerconfigjson_secret" {
34
name = "tf-secret" # Required
45
namespace_name = "tf-secret-namespace-name" # Required
56

@@ -25,4 +26,32 @@ resource "tanzu-mission-control_kubernetes_secret" "create_secret" {
2526
image_registry_url = "testimageregistryurl" # Required
2627
}
2728
}
28-
}
29+
}
30+
31+
# Example for creating the opaque secret
32+
resource "tanzu-mission-control_kubernetes_secret" "create_opaque_secret" {
33+
name = "tf-secret" # Required
34+
namespace_name = "tf-secret-namespace-name" # Required
35+
36+
scope {
37+
cluster {
38+
name = "testcluster" # Required
39+
provisioner_name = "attached" # Default: attached
40+
management_cluster_name = "attached" # Default: attached
41+
}
42+
}
43+
44+
export = false # Default: false
45+
46+
meta {
47+
description = "Create namespace through terraform"
48+
labels = { "key" : "value" }
49+
}
50+
51+
spec {
52+
opaque = {
53+
"key1" : "value1"
54+
"key2" : "value2"
55+
}
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
test: test
2+
test_nested_key:
3+
test_nested_key1: test_nested_value1
4+
test_nested_key2: test_nested_value2

examples/resources/packageinstall/resource.tf

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "tanzu-mission-control_package_install" "create_package_install" {
2121
}
2222
}
2323

24-
inline_values = { "test" : "test" }
24+
path_to_inline_values = "./inline_values.yaml" #<inline-values-file-path>
25+
26+
inline_values = { "test" : "test" } # Deprecated
2527
}
2628
}

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ require (
9090
google.golang.org/appengine v1.6.7 // indirect
9191
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
9292
google.golang.org/grpc v1.56.3
93-
google.golang.org/protobuf v1.30.0 // indirect
93+
google.golang.org/protobuf v1.33.0 // indirect
9494
gopkg.in/inf.v0 v0.9.1 // indirect
9595
gopkg.in/yaml.v2 v2.4.0
9696
gopkg.in/yaml.v3 v3.0.1 // indirect
@@ -100,5 +100,5 @@ require (
100100
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
101101
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
102102
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
103-
sigs.k8s.io/yaml v1.3.0 // indirect
103+
sigs.k8s.io/yaml v1.3.0
104104
)

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,8 @@ google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
697697
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
698698
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
699699
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
700-
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
701-
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
700+
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
701+
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
702702
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
703703
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
704704
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

0 commit comments

Comments
 (0)