Skip to content

Commit 0de74e5

Browse files
committed
fix(kube): Set customization as deprecated
1 parent 435c845 commit 0de74e5

File tree

2 files changed

+99
-2
lines changed

2 files changed

+99
-2
lines changed

ovh/data_cloud_project_kube.go

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,55 @@ func dataSourceCloudProjectKube() *schema.Resource {
7676
},
7777
},
7878
},
79-
79+
kubeClusterCustomization: {
80+
Type: schema.TypeSet,
81+
Computed: true,
82+
Optional: true,
83+
ForceNew: false,
84+
Set: CustomSchemaSetFunc(),
85+
Deprecated: fmt.Sprintf("Use %s instead", kubeClusterCustomizationApiServerKey),
86+
Elem: &schema.Resource{
87+
Schema: map[string]*schema.Schema{
88+
"apiserver": {
89+
Type: schema.TypeSet,
90+
Computed: true,
91+
Optional: true,
92+
ForceNew: false,
93+
Set: CustomSchemaSetFunc(),
94+
Deprecated: fmt.Sprintf("Use %s instead", kubeClusterCustomizationApiServerKey),
95+
Elem: &schema.Resource{
96+
Schema: map[string]*schema.Schema{
97+
"admissionplugins": {
98+
Type: schema.TypeSet,
99+
Computed: true,
100+
Optional: true,
101+
ForceNew: false,
102+
Set: CustomSchemaSetFunc(),
103+
Elem: &schema.Resource{
104+
Schema: map[string]*schema.Schema{
105+
"enabled": {
106+
Type: schema.TypeList,
107+
Computed: true,
108+
Optional: true,
109+
ForceNew: false,
110+
Elem: &schema.Schema{Type: schema.TypeString},
111+
},
112+
"disabled": {
113+
Type: schema.TypeList,
114+
Computed: true,
115+
Optional: true,
116+
ForceNew: false,
117+
Elem: &schema.Schema{Type: schema.TypeString},
118+
},
119+
},
120+
},
121+
},
122+
},
123+
},
124+
},
125+
},
126+
},
127+
},
80128
kubeClusterCustomizationKubeProxyKey: {
81129
Type: schema.TypeSet,
82130
Computed: false,

ovh/resource_cloud_project_kube.go

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const (
2222

2323
kubeClusterProxyModeKey = "kube_proxy_mode"
2424

25+
kubeClusterCustomization = "customization" // Deprecated
2526
kubeClusterCustomizationApiServerKey = "customization_apiserver"
2627
kubeClusterCustomizationKubeProxyKey = "customization_kube_proxy"
2728
)
@@ -99,7 +100,55 @@ func resourceCloudProjectKube() *schema.Resource {
99100
},
100101
},
101102
},
102-
103+
kubeClusterCustomization: {
104+
Type: schema.TypeSet,
105+
Computed: true,
106+
Optional: true,
107+
ForceNew: false,
108+
Set: CustomSchemaSetFunc(),
109+
Deprecated: fmt.Sprintf("Use %s instead", kubeClusterCustomizationApiServerKey),
110+
Elem: &schema.Resource{
111+
Schema: map[string]*schema.Schema{
112+
"apiserver": {
113+
Type: schema.TypeSet,
114+
Computed: true,
115+
Optional: true,
116+
ForceNew: false,
117+
Set: CustomSchemaSetFunc(),
118+
Deprecated: fmt.Sprintf("Use %s instead", kubeClusterCustomizationApiServerKey),
119+
Elem: &schema.Resource{
120+
Schema: map[string]*schema.Schema{
121+
"admissionplugins": {
122+
Type: schema.TypeSet,
123+
Computed: true,
124+
Optional: true,
125+
ForceNew: false,
126+
Set: CustomSchemaSetFunc(),
127+
Elem: &schema.Resource{
128+
Schema: map[string]*schema.Schema{
129+
"enabled": {
130+
Type: schema.TypeList,
131+
Computed: true,
132+
Optional: true,
133+
ForceNew: false,
134+
Elem: &schema.Schema{Type: schema.TypeString},
135+
},
136+
"disabled": {
137+
Type: schema.TypeList,
138+
Computed: true,
139+
Optional: true,
140+
ForceNew: false,
141+
Elem: &schema.Schema{Type: schema.TypeString},
142+
},
143+
},
144+
},
145+
},
146+
},
147+
},
148+
},
149+
},
150+
},
151+
},
103152
kubeClusterCustomizationKubeProxyKey: {
104153
Type: schema.TypeSet,
105154
Computed: false,

0 commit comments

Comments
 (0)