-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[upstream:d275e40a18ef73fe7bee8419da55711f337d1e7b] Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
20885c6
commit 77533b2
Showing
15 changed files
with
801 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
```release-note:enhancement | ||
assuredworkloads: added `enable_sovereign_controls`, `partner`, `partner_permissions`, `violation_notifications_enabled`, and several other output-only fields to `google_assured_workloads_workloads` | ||
``` | ||
```release-note:enhancement | ||
containeraws: added `admin_groups` to `google_container_aws_cluster` | ||
``` | ||
```release-note:enhancement | ||
containerazure: added `admin_groups` to `google_container_azure_cluster` | ||
``` | ||
```release-note:enhancement | ||
gkehub: added `metrics_gcp_service_account_email` to `google_gke_hub_feature_membership` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
421 changes: 357 additions & 64 deletions
421
google-beta/services/assuredworkloads/resource_assured_workloads_workload.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,6 +218,13 @@ func ContainerAwsClusterAuthorizationSchema() *schema.Resource { | |
Description: "Users to perform operations as a cluster admin. A managed ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole to the users. Up to ten admin users can be provided. For more info on RBAC, see https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles", | ||
Elem: ContainerAwsClusterAuthorizationAdminUsersSchema(), | ||
}, | ||
|
||
"admin_groups": { | ||
Type: schema.TypeList, | ||
Optional: true, | ||
Description: "Groups of users that can perform operations as a cluster admin. A managed ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole to the groups. Up to ten admin groups can be provided. For more info on RBAC, see https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles", | ||
Elem: ContainerAwsClusterAuthorizationAdminGroupsSchema(), | ||
}, | ||
}, | ||
} | ||
} | ||
|
@@ -234,6 +241,18 @@ func ContainerAwsClusterAuthorizationAdminUsersSchema() *schema.Resource { | |
} | ||
} | ||
|
||
func ContainerAwsClusterAuthorizationAdminGroupsSchema() *schema.Resource { | ||
return &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"group": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
Description: "The name of the group, e.g. `[email protected]`.", | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func ContainerAwsClusterControlPlaneSchema() *schema.Resource { | ||
return &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
|
@@ -441,7 +460,7 @@ func ContainerAwsClusterControlPlaneMainVolumeSchema() *schema.Resource { | |
Computed: true, | ||
Optional: true, | ||
ForceNew: true, | ||
Description: "Optional. The throughput to provision for the volume, in MiB/s. Only valid if the volume type is GP3.", | ||
Description: "Optional. The throughput to provision for the volume, in MiB/s. Only valid if the volume type is GP3. If volume type is gp3 and throughput is not specified, the throughput will defaults to 125.", | ||
}, | ||
|
||
"volume_type": { | ||
|
@@ -501,7 +520,7 @@ func ContainerAwsClusterControlPlaneRootVolumeSchema() *schema.Resource { | |
Type: schema.TypeInt, | ||
Computed: true, | ||
Optional: true, | ||
Description: "Optional. The throughput to provision for the volume, in MiB/s. Only valid if the volume type is GP3.", | ||
Description: "Optional. The throughput to provision for the volume, in MiB/s. Only valid if the volume type is GP3. If volume type is gp3 and throughput is not specified, the throughput will defaults to 125.", | ||
}, | ||
|
||
"volume_type": { | ||
|
@@ -951,7 +970,8 @@ func expandContainerAwsClusterAuthorization(o interface{}) *containeraws.Cluster | |
} | ||
obj := objArr[0].(map[string]interface{}) | ||
return &containeraws.ClusterAuthorization{ | ||
AdminUsers: expandContainerAwsClusterAuthorizationAdminUsersArray(obj["admin_users"]), | ||
AdminUsers: expandContainerAwsClusterAuthorizationAdminUsersArray(obj["admin_users"]), | ||
AdminGroups: expandContainerAwsClusterAuthorizationAdminGroupsArray(obj["admin_groups"]), | ||
} | ||
} | ||
|
||
|
@@ -960,7 +980,8 @@ func flattenContainerAwsClusterAuthorization(obj *containeraws.ClusterAuthorizat | |
return nil | ||
} | ||
transformed := map[string]interface{}{ | ||
"admin_users": flattenContainerAwsClusterAuthorizationAdminUsersArray(obj.AdminUsers), | ||
"admin_users": flattenContainerAwsClusterAuthorizationAdminUsersArray(obj.AdminUsers), | ||
"admin_groups": flattenContainerAwsClusterAuthorizationAdminGroupsArray(obj.AdminGroups), | ||
} | ||
|
||
return []interface{}{transformed} | ||
|
@@ -1020,6 +1041,61 @@ func flattenContainerAwsClusterAuthorizationAdminUsers(obj *containeraws.Cluster | |
|
||
return transformed | ||
|
||
} | ||
func expandContainerAwsClusterAuthorizationAdminGroupsArray(o interface{}) []containeraws.ClusterAuthorizationAdminGroups { | ||
if o == nil { | ||
return make([]containeraws.ClusterAuthorizationAdminGroups, 0) | ||
} | ||
|
||
objs := o.([]interface{}) | ||
if len(objs) == 0 || objs[0] == nil { | ||
return make([]containeraws.ClusterAuthorizationAdminGroups, 0) | ||
} | ||
|
||
items := make([]containeraws.ClusterAuthorizationAdminGroups, 0, len(objs)) | ||
for _, item := range objs { | ||
i := expandContainerAwsClusterAuthorizationAdminGroups(item) | ||
items = append(items, *i) | ||
} | ||
|
||
return items | ||
} | ||
|
||
func expandContainerAwsClusterAuthorizationAdminGroups(o interface{}) *containeraws.ClusterAuthorizationAdminGroups { | ||
if o == nil { | ||
return containeraws.EmptyClusterAuthorizationAdminGroups | ||
} | ||
|
||
obj := o.(map[string]interface{}) | ||
return &containeraws.ClusterAuthorizationAdminGroups{ | ||
Group: dcl.String(obj["group"].(string)), | ||
} | ||
} | ||
|
||
func flattenContainerAwsClusterAuthorizationAdminGroupsArray(objs []containeraws.ClusterAuthorizationAdminGroups) []interface{} { | ||
if objs == nil { | ||
return nil | ||
} | ||
|
||
items := []interface{}{} | ||
for _, item := range objs { | ||
i := flattenContainerAwsClusterAuthorizationAdminGroups(&item) | ||
items = append(items, i) | ||
} | ||
|
||
return items | ||
} | ||
|
||
func flattenContainerAwsClusterAuthorizationAdminGroups(obj *containeraws.ClusterAuthorizationAdminGroups) interface{} { | ||
if obj == nil || obj.Empty() { | ||
return nil | ||
} | ||
transformed := map[string]interface{}{ | ||
"group": obj.Group, | ||
} | ||
|
||
return transformed | ||
|
||
} | ||
|
||
func expandContainerAwsClusterControlPlane(o interface{}) *containeraws.ClusterControlPlane { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,6 +224,9 @@ resource "google_container_aws_cluster" "primary" { | |
admin_users { | ||
username = "%{service_acct}" | ||
} | ||
admin_groups { | ||
group = "[email protected]" | ||
} | ||
} | ||
aws_region = "%{aws_region}" | ||
|
@@ -314,6 +317,9 @@ resource "google_container_aws_cluster" "primary" { | |
admin_users { | ||
username = "%{service_acct}" | ||
} | ||
admin_groups { | ||
group = "[email protected]" | ||
} | ||
} | ||
aws_region = "%{aws_region}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.