Open dprosper opened 3 years ago
@dprosper ,
The current datasource is equivalent to
ibmcloud resource service-key (NAME | ID) [-g RESOURCE_GROUP] [--id]
We would need a new datasource ibm_resource_keys for this ibmcloud resource service-keys --instance-name "<activity_tracker_instance_name>"
Thanks.
@kavya498 thank you that makes sense.
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
Expected Behavior
The issue is an existing Activity Tracker instance that already has a resource key created, in Terraform I am trying to obtain the name of the resource key, the
ibm_resource_key
requires you to know the name of the resource_key. In the CLI I can obtain the name of the resource key by running the following command:the data source for ibm_resource_key does provide the ability to specify the name of the instance, i.e. similar to the CLI by including a
resource_instance_id
, however the name of the resource key is still required in Terraform, it is not required in the CLI.I am filling as a bug, as I don't see the use of this data source if you have to specify the name of the resource_key, I believe the behavior should be that it allows you to obtain the name of the resource key(s).
Actual Behavior
The provider does not allow me to capture the name of the resource key when I don't know what it is, I need to have the same functionality in Terraform as I have in the CLI, i.e. determine the name of the key when I don't know what it is.
Steps to Reproduce
terraform apply