Open jamesmaidment opened 8 months ago
I'm attempted to create a clearblade_iot_device with a provided public key credentials. The device is created but the credentials are not.
clearblade_iot_device
resource "clearblade_iot_device" "test_device" { id = "device.${random_id.registry.hex}" registry = clearblade_iot_registry.iot_registry.id blocked = false metadata = {} log_level = "ERROR" credentials = [ { public_key = { format = "RSA_PEM" key = file("${path.module}/certs/public.pem") } } ] gateway_config = { gateway_type = "NON_GATEWAY" gateway_auth_method = "ASSOCIATION_ONLY" } }
$ terraform apply random_id.registry: Refreshing state... [id=4yqJLw] clearblade_iot_registry.iot_registry: Refreshing state... [id=test-registry-e32a892f] clearblade_iot_device.test_device: Refreshing state... [id=device.e32a892f] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # clearblade_iot_device.test_device will be updated in-place ~ resource "clearblade_iot_device" "test_device" { ~ config = { ~ binary_data = "" -> (known after apply) ~ cloud_update_time = "2023-10-26T06:19:18.736Z" -> (known after apply) ~ device_ack_time = "" -> (known after apply) ~ version = 1 -> (known after apply) } -> (known after apply) + credentials = [ + { + public_key = { + format = "RSA_PEM" + key = <<-EOT -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9NwAAwmaVheYImTlqYEk s/+nr4jQEYc7lwXjLkRZIkyferuy/f/bLk5n0KBvMSHqg/gn53XfqmcWk7+muaXu uOXCs0YaSE6hSTSuMKyvTwtHHiSpagUo3ADqH63wQO1/QKvhua4YODeuGQevhObe BIkgQjxTabC5eKCPX44RHhie2k9P9bQyWlyZEgVx2VI4tFOOYyBR0QgDkEN0eQ76 Pj/7YWdHxNT+bnwegY9AULmvUae2A7kIxKV1NQCiYY/N2JQGLEMjLFZvWA0pDMw/ 6epwzm5vWr74d7zHvZ3yZJcQX6pbg8bkGknriEvzijLcgz3B+IEvtGnzdamZ7iAo dQIDAQAB -----END PUBLIC KEY----- EOT } }, ] ~ gateway_config = { ~ last_accessed_gateway_id = "" -> (known after apply) ~ last_accessed_gateway_time = "" -> (known after apply) # (2 unchanged attributes hidden) } id = "device.e32a892f" + last_config_ack_time = (known after apply) + last_config_send_time = (known after apply) ~ last_error_status = { ~ code = -1 -> (known after apply) ~ message = "" -> (known after apply) } -> (known after apply) + last_error_time = (known after apply) + last_event_time = (known after apply) + last_heartbeat_time = (known after apply) + last_state_time = (known after apply) name = "projects/REDACTED/locations/us-central1/registries/test-registry-e32a892f/devices/device.e32a892f" ~ num_id = "1698301158770" -> (known after apply) ~ state = { ~ binary_data = "" -> (known after apply) ~ update_time = "" -> (known after apply) } -> (known after apply) # (4 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 clearblade_iot_device.test_device: Modifying... [id=device.e32a892f] clearblade_iot_device.test_device: Modifications complete after 2s [id=device.e32a892f] Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
Thanks for opening this issue @jamesmaidment! I should be able to look into it and make changes next week. For visibility, you can always use this link to raise a request on Atlassian Jira.
I'm attempted to create a
clearblade_iot_device
with a provided public key credentials. The device is created but the credentials are not.Resources
Output:
Admin console: