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

Feat/add new privileges #761

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions docs/data-sources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,17 @@ The following attributes are returned by the datasource:
* `create_flow_log` - The group will be allowed to create flow log.
* `access_and_manage_monitoring` The group will be allowed to access and manage monitoring.
* `access_and_manage_certificates` - The group will be allowed to access and manage certificates.
* `access_and_manage_dns` - The group will be allowed to access and manage dns records.
* `manage_registry` - The group will be allowed to access container registry related functionality.
* `manage_dataplatform` - The group will be allowed to access and manage the Data Platform.
* `access_and_manage_logging` - The group will be allowed to access and manage logging.
* `access_and_manage_cdn` - The group will be allowed to access and manage cdn.
* `access_and_manage_vpn` - The group will be allowed to access and manage vpn.
* `access_and_manage_api_gateway` - The group will be allowed to access and manage api gateway.
* `access_and_manage_kaas` - The group will be allowed to access and manage kaas.
* `access_and_manage_network_file_storage` - The group will be allowed to access and manage network file storage.
* `access_and_manage_ai_model_hub` - The group will be allowed to access and manage ai model hub.
* `access_and_manage_iam_resources` - The group will be allowed to access and manage iam resources.
* `create_network_security_groups` - The group will be allowed to create network security groups.
* `manage_dbaas` - Privilege for a group to manage DBaaS related functionality.
* `users` - List of users in group.
51 changes: 36 additions & 15 deletions docs/resources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,30 @@ resource "ionoscloud_user" "example2" {
}

resource "ionoscloud_group" "example" {
name = "Group Example"
create_datacenter = true
create_snapshot = true
reserve_ip = true
access_activity_log = true
create_pcc = true
s3_privilege = true
create_backup_unit = true
create_internet_access = true
create_k8s_cluster = true
create_flow_log = true
access_and_manage_monitoring = true
access_and_manage_certificates = true
manage_dbaas = true
user_ids = [ ionoscloud_user.example1.id, ionoscloud_user.example2.id ]
name = "Group Example"
create_datacenter = true
create_snapshot = true
reserve_ip = true
access_activity_log = true
create_pcc = true
s3_privilege = true
create_backup_unit = true
create_internet_access = true
create_k8s_cluster = true
create_flow_log = true
access_and_manage_monitoring = true
access_and_manage_certificates = true
access_and_manage_logging = true
access_and_manage_cdn = true
access_and_manage_vpn = true
access_and_manage_api_gateway = true
access_and_manage_kaas = true
access_and_manage_network_file_storage = true
access_and_manage_ai_model_hub = true
access_and_manage_iam_resources = true
create_network_security_groups = true
manage_dbaas = true
user_ids = [ ionoscloud_user.example1.id, ionoscloud_user.example2.id ]
}

resource "random_password" "user1_password" {
Expand Down Expand Up @@ -78,6 +87,18 @@ resource "random_password" "user2_password" {
* `create_flow_log` - (Optional) [Boolean] The group will be allowed to create flow log.
* `access_and_manage_monitoring` - (Optional) [Boolean] The group will be allowed to access and manage monitoring.
* `access_and_manage_certificates` - (Optional) [Boolean] The group will be allowed to access and manage certificates.
* `access_and_manage_dns` - (Optional) [Boolean] The group will be allowed to access and manage dns records.
* `manage_registry` - (Optional) [Boolean] The group will be allowed to access container registry related functionality.
* `manage_dataplatform` - (Optional) [Boolean] The group will be allowed to access and manage the Data Platform.
* `access_and_manage_logging` - (Optional) [Boolean] The group will be allowed to access and manage logging.
* `access_and_manage_cdn` - (Optional) [Boolean] The group will be allowed to access and manage cdn.
* `access_and_manage_vpn` - (Optional) [Boolean] The group will be allowed to access and manage vpn.
* `access_and_manage_api_gateway` - (Optional) [Boolean] The group will be allowed to access and manage api gateway.
* `access_and_manage_kaas` - (Optional) [Boolean] The group will be allowed to access and manage kaas.
* `access_and_manage_network_file_storage` - (Optional) [Boolean] The group will be allowed to access and manage network file storage.
* `access_and_manage_ai_model_hub` - (Optional) [Boolean] The group will be allowed to access and manage ai model hub.
* `access_and_manage_iam_resources` - (Optional) [Boolean] The group will be allowed to access and manage iam resources.
* `create_network_security_groups` - (Optional) [Boolean] The group will be allowed to create network security groups.
* `manage_dbaas` - (Optional) [Boolean] Privilege for a group to manage DBaaS related functionality.
* `user_ids` - (Optional) [list] A list of users to add to the group.
* `user_id` - (Optional) [string] The ID of the specific user to add to the group. Please use user_ids argument since this is **DEPRECATED**
Expand Down
60 changes: 60 additions & 0 deletions ionoscloud/data_source_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,66 @@ func dataSourceGroup() *schema.Resource {
Description: "Privilege for a group to manage DBaaS related functionality",
Computed: true,
},
"access_and_manage_dns": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage dns records.",
Computed: true,
},
"manage_registry": {
Type: schema.TypeBool,
Description: "Privilege for group accessing container registry related functionality.",
Computed: true,
},
"manage_dataplatform": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage the Data Platform.",
Computed: true,
},
"access_and_manage_logging": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage Logging.",
Computed: true,
},
"access_and_manage_cdn": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage Cdn.",
Computed: true,
},
"access_and_manage_vpn": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage Vpn.",
Computed: true,
},
"access_and_manage_api_gateway": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage ApiGateway.",
Computed: true,
},
"access_and_manage_kaas": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage Kaas.",
Computed: true,
},
"access_and_manage_network_file_storage": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage NetworkFileStorage.",
Computed: true,
},
"access_and_manage_ai_model_hub": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage AiModelHub.",
Computed: true,
},
"access_and_manage_iam_resources": {
Type: schema.TypeBool,
Description: "Privilege for a group to access and manage IamResources.",
Computed: true,
},
"create_network_security_groups": {
Type: schema.TypeBool,
Description: "Privilege for a group to create NetworkSecurityGroups.",
Computed: true,
},
"users": {
Type: schema.TypeSet,
Computed: true,
Expand Down
Loading
Loading