Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dcl to 1.70 #7899

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changelog/11285.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:enhancement
gkehub: added `config_management.management` and `config_management.config_sync.enabled` fields to `google_gkehub_feature_membership`
```
```release-note:enhancement
clouddeploy: added `gke.proxy_url` field to `google_clouddeploy_target`
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
cloud.google.com/go/bigtable v1.27.2-0.20240730134218-123c88616251
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.68.0
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.70.0
github.com/apparentlymart/go-cidr v1.1.0
github.com/davecgh/go-spew v1.1.1
github.com/dnaeon/go-vcr v1.0.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.68.0 h1:LIPIYi4hy7ttUSrziY/TYwMDuEvvV593n80kRmz6nZ4=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.68.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.70.0 h1:dqqxHZYK0tlzViFqAbKzMIkfboQVWYN1CTEM2sjBtmQ=
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.70.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ func ClouddeployTargetGkeSchema() *schema.Resource {
Optional: true,
Description: "Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).",
},

"proxy_url": {
Type: schema.TypeString,
Optional: true,
Description: "Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) to the Kubernetes server.",
},
},
}
}
Expand Down Expand Up @@ -766,6 +772,7 @@ func expandClouddeployTargetGke(o interface{}) *clouddeploy.TargetGke {
return &clouddeploy.TargetGke{
Cluster: dcl.String(obj["cluster"].(string)),
InternalIP: dcl.Bool(obj["internal_ip"].(bool)),
ProxyUrl: dcl.String(obj["proxy_url"].(string)),
}
}

Expand All @@ -776,6 +783,7 @@ func flattenClouddeployTargetGke(obj *clouddeploy.TargetGke) interface{} {
transformed := map[string]interface{}{
"cluster": obj.Cluster,
"internal_ip": obj.InternalIP,
"proxy_url": obj.ProxyUrl,
}

return []interface{}{transformed}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ resource "google_clouddeploy_target" "primary" {
gke {
cluster = "projects/%{project_name}/locations/%{region}/clusters/different-example-cluster-name"
internal_ip = true
proxy_url = "http://10.0.0.1"
}

project = "%{project_name}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,17 @@ func GkeHubFeatureMembershipConfigmanagementSchema() *schema.Resource {
Elem: GkeHubFeatureMembershipConfigmanagementHierarchyControllerSchema(),
},

"management": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Description: "Set this field to MANAGEMENT_AUTOMATIC to enable Config Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED to disable Config Sync auto-upgrades.",
},

"policy_controller": {
Type: schema.TypeList,
Optional: true,
Description: "Policy Controller configuration for the cluster.",
Description: "**DEPRECATED** Configuring Policy Controller through the configmanagement feature is no longer recommended. Use the policycontroller feature instead.",
MaxItems: 1,
Elem: GkeHubFeatureMembershipConfigmanagementPolicyControllerSchema(),
},
Expand Down Expand Up @@ -183,6 +190,12 @@ func GkeHubFeatureMembershipConfigmanagementBinauthzSchema() *schema.Resource {
func GkeHubFeatureMembershipConfigmanagementConfigSyncSchema() *schema.Resource {
return &schema.Resource{
Schema: map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Optional: true,
Description: "Enables the installation of ConfigSync. If set to true, ConfigSync resources will be created and the other ConfigSync fields will be applied if exist. If set to false, all other ConfigSync fields will be ignored, ConfigSync resources will be deleted. If omitted, ConfigSync resources will be managed depends on the presence of the git or oci field.",
},

"git": {
Type: schema.TypeList,
Optional: true,
Expand Down Expand Up @@ -989,6 +1002,7 @@ func expandGkeHubFeatureMembershipConfigmanagement(o interface{}) *gkehub.Featur
Binauthz: expandGkeHubFeatureMembershipConfigmanagementBinauthz(obj["binauthz"]),
ConfigSync: expandGkeHubFeatureMembershipConfigmanagementConfigSync(obj["config_sync"]),
HierarchyController: expandGkeHubFeatureMembershipConfigmanagementHierarchyController(obj["hierarchy_controller"]),
Management: gkehub.FeatureMembershipConfigmanagementManagementEnumRef(obj["management"].(string)),
PolicyController: expandGkeHubFeatureMembershipConfigmanagementPolicyController(obj["policy_controller"]),
Version: dcl.StringOrNil(obj["version"].(string)),
}
Expand All @@ -1002,6 +1016,7 @@ func flattenGkeHubFeatureMembershipConfigmanagement(obj *gkehub.FeatureMembershi
"binauthz": flattenGkeHubFeatureMembershipConfigmanagementBinauthz(obj.Binauthz),
"config_sync": flattenGkeHubFeatureMembershipConfigmanagementConfigSync(obj.ConfigSync),
"hierarchy_controller": flattenGkeHubFeatureMembershipConfigmanagementHierarchyController(obj.HierarchyController),
"management": obj.Management,
"policy_controller": flattenGkeHubFeatureMembershipConfigmanagementPolicyController(obj.PolicyController),
"version": obj.Version,
}
Expand Down Expand Up @@ -1046,6 +1061,7 @@ func expandGkeHubFeatureMembershipConfigmanagementConfigSync(o interface{}) *gke
}
obj := objArr[0].(map[string]interface{})
return &gkehub.FeatureMembershipConfigmanagementConfigSync{
Enabled: dcl.Bool(obj["enabled"].(bool)),
Git: expandGkeHubFeatureMembershipConfigmanagementConfigSyncGit(obj["git"]),
MetricsGcpServiceAccountEmail: dcl.String(obj["metrics_gcp_service_account_email"].(string)),
Oci: expandGkeHubFeatureMembershipConfigmanagementConfigSyncOci(obj["oci"]),
Expand All @@ -1059,6 +1075,7 @@ func flattenGkeHubFeatureMembershipConfigmanagementConfigSync(obj *gkehub.Featur
return nil
}
transformed := map[string]interface{}{
"enabled": obj.Enabled,
"git": flattenGkeHubFeatureMembershipConfigmanagementConfigSyncGit(obj.Git),
"metrics_gcp_service_account_email": obj.MetricsGcpServiceAccountEmail,
"oci": flattenGkeHubFeatureMembershipConfigmanagementConfigSyncOci(obj.Oci),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,13 @@ resource "google_gke_hub_feature_membership" "feature_member_1" {
version = "1.18.2"
config_sync {
source_format = "hierarchy"
enabled = true
git {
sync_repo = "https://github.com/GoogleCloudPlatform/magic-modules"
secret_type = "none"
}
}
management = "MANAGEMENT_AUTOMATIC"
}
}

Expand Down
4 changes: 4 additions & 0 deletions website/docs/r/clouddeploy_target.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ The `gke` block supports:
(Optional)
Optional. If true, `cluster` is accessed using the private IP address of the control plane endpoint. Otherwise, the default IP address of the control plane endpoint is used. The default IP address is the private IP address for clusters with private control-plane endpoints and the public IP address otherwise. Only specify this option when `cluster` is a [private GKE cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).

* `proxy_url` -
(Optional)
Optional. If set, used to configure a [proxy](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#proxy) to the Kubernetes server.

The `multi_target` block supports:

* `target_ids` -
Expand Down