Open surajsbharadwaj opened 7 months ago
Logs.zip Trace Logs
@BrunoHenriques @william8siew Is it something you can help with?
I believe it is as you said, Resource Controller is incorrectly calling our policies API. The error
Allowed Network parameter must be set
is from KMS teams api.
This terraform resource code
resource "ibm_resource_instance" "kms" {
is managed by a different team from the KMS team https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance You will need to reach out to the Resource Controller team
As per internal debug:
this difference is because of different services have their own implementation of service_endpoints. Some services requires us to send it as part of parameters with key params[service_endpoints] some other services requires to send it as params[allowed_network] (mainly hpcs and keyprotect I think) since resource_instance is a generic resource it did n't supported corner case of KMS and HPCS.
Can we update service_endpoints as part of parameters instead of service_endpoints something like
parameters = { allowed_network: "public-and-private", }
I'm trying this out now, however if this is the solution, I think a new Key Protect provision example needs to be added into the docs that shows passing service endpoint as a parameter. Similar to this example.
Also, if logic was added to provider code to fail if someone tries to pass the endpoint value directly in ibm_resource_instance
when provisioning Key Protect - that would also be nice too, otherwise consumers don't know they have a misconfiguration at all.
@hkantare FYI, using parameters block worked fine - do you want to keep this issue open to track doc update and logic to catch the misconfiguration?
Issue seems to have been resolved by core terraform team @surajsbharadwaj can you resolve this?
Hello Team,
I am getting this error with the ibm_resource_instance for kms resource:
"MISSING_FIELD_ERR: The field
allowed_networkis required: Allowed Network parameter must be set",
on reapply again, it passes.Its trying to update Key Protect with
{"parameters":{"service-endpoints":"public-and-private"}}
since in version v5.10.0 of landing zone it was added . @Key Protect team why this patch is causing the error:"MISSING_FIELD_ERR: The field
allowed_networkis required: Allowed Network parameter must be set"
The api is saying thatallowed_network
is required, so I bet they are incorrectly calling the api ?Message terraform-ibmcloud-users