You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once a IAM-Role/Permission is successfully created via terraform and part of the tf-state, during an update of the role/permission-set there is no longer a check if the submitted role is valid.
# Copy-paste your Terraform configurations here - for large Terraform configs,# please use a service like Dropbox and share a link to the ZIP file. For# security, you can also encrypt the files using our GPG public key.
Hello @uli-max so if I understand correctly the invalid request is sent but server still processes it?
This is an API flaw and a ticket should be opened for OTC QA and support team.
From my point of view trying to fix API flaws on provider side is the wrong way to go. Any API change can result to needed changes on provider side and all the implemented "crutches" that make provider work would break the service.
Besides that IAM policy actions are different for each OTC service. For example gaussdb has 104 custom policies, for which validations have to be implemented manually. They also have to be verified with IAM service regularly from our side because IAM is updated frequently (new services / old service features).
Once a IAM-Role/Permission is successfully created via terraform and part of the tf-state, during an update of the role/permission-set there is no longer a check if the submitted role is valid.
Terraform provider version
yes
Terraform v1.5.4
on darwin_arm64
Affected Resource(s)
opentelekomcloud_identity_role_v3
Terraform Configuration Files
resource "opentelekomcloud_identity_role_v3" "iam_cp_role_custom_dump_role" {
description = local.iam_cp_custom_dump_role_description
display_name = local.iam_cp_custom_dump_role_name
display_layer = local.iam_cp_custom_dump_role_display_layer
statement {
effect = "Allow"
action = [
"DDS::list",
"DDS::get",
# "DDS:bla:bla",
"DDS:instance:resetPasswd",
"DDS:instance:modifyBackupPolicy",
]
resource = ["*"]
}
}
Debug Output/Panic Output
Expected and valid error message:
╷
│ Error: error creating custom role: Bad request with: [POST https://iam.eu-de.otc.t-systems.com/v3.0/OS-ROLE/roles], error message: {"error":{"message":"Role policy format invalid! Action 'DDS:*:get' not registered!","code":400,"title":"Bad Request"}}
│
│ with opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role,
│ on tf_A070_99_IAM_Policies_DumpRole.tf line 26, in resource "opentelekomcloud_identity_role_v3" "iam_cp_role_custom_dump_role":
│ 26: resource "opentelekomcloud_identity_role_v3" "iam_cp_role_custom_dump_role" {
│
╵
Steps to Reproduce
terraform apply
againopentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role: Creating...
opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role: Creation complete after 1s [id=ee0c35d9f7434e7682f01cfd32716e9a]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
terraform apply
againopentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role will be updated in-place
~ resource "opentelekomcloud_identity_role_v3" "iam_cp_role_custom_dump_role" {
id = "ee0c35d9f7434e7682f01cfd32716e9a"
name = "custom_a6997651920947dab24f20a1f8186c00_5"
# (5 unchanged attributes hidden)
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role: Modifying... [id=ee0c35d9f7434e7682f01cfd32716e9a]
opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role: Modifications complete after 1s [id=ee0c35d9f7434e7682f01cfd32716e9a]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role will be updated in-place
~ resource "opentelekomcloud_identity_role_v3" "iam_cp_role_custom_dump_role" {
id = "ee0c35d9f7434e7682f01cfd32716e9a"
name = "custom_a6997651920947dab24f20a1f8186c00_5"
# (5 unchanged attributes hidden)
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role: Modifying... [id=ee0c35d9f7434e7682f01cfd32716e9a]
opentelekomcloud_identity_role_v3.iam_cp_role_custom_dump_role: Modifications complete after 0s [id=ee0c35d9f7434e7682f01cfd32716e9a]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed
No check of the validity of the rule happens.
Expected Behavior
Provider should check the validity of the updated rule, even if a state for the rule exists.
Actual Behavior
Invalid rule/permission-set will deployed to IAM.
Important Factoids
References
The text was updated successfully, but these errors were encountered: