-
Notifications
You must be signed in to change notification settings - Fork 675
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
On second apply ibm_code_engine_secret
tries to change secret Role
#5232
Comments
ibm_code_engine_secret
tries to change secret Role
I wonder, and this is speculation, if name should be both |
Are there any plans to fix this bug? Initially when trying to use a After creating a resource key explicitly, then trying to create a service binding(to mongodb in my case), I get the same exact issues as described here. In the meantime, I've gotten around this by just creating normal secrets based directly on the resource key. |
Hi @saevarb, because Code Engine automatically assigns the Role of "Writer" to Service Access Secrets when unspecified, terraform will see this as a discrepancy when the Role is initially not provided. A workaround here would to simply specify the Role field in your tf file. This is a bug we have logged and are currently working on a fix for. We are also planning to update our terraform documentation to include this workaround until the work on this fix has been completed. |
Hi @jaksart1 From my experiments, there is actually no workaround that works. Take the following resource "ibm_resource_key" "test-key" {
name = "rk-mdb-credentials"
resource_instance_id = ibm_database.md-test-stuff.resource_crn
}
resource "ibm_code_engine_secret" "test-secret" {
name = "test-secret"
project_id = ibm_code_engine_project.ce-test-stuff.id
format = "service_access"
service_access {
resource_key {
id = ibm_resource_key.test-key.guid
}
service_instance {
id = ibm_database.md-test-stuff.guid
}
role {
# name = "Writer" <----
}
}
} Note the marked line, which implements your suggestion. If I remove the comment and run it, it will tell me that It's good to hear that you are working on this issue, however. Is there a place I can follow the progress or discussions regarding the fix? |
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
ibm_code_engine_secret
resource shouldn't modifyservice_access
secret role on second terraform apply.Actual Behavior
On second apply
ibm_code_engine_secret
tries to modifyservice_access
secret role:- name = "Writer" -> null
Steps to Reproduce
service_access
secret usingibm_code_engine_secret
Important Factoids
References
The text was updated successfully, but these errors were encountered: