-
Notifications
You must be signed in to change notification settings - Fork 728
Open
Labels
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version and Provider Version
Terraform v1.7.4
on darwin_arm64
- provider registry.terraform.io/oracle/oci v6.6.0
Affected Resource(s)
affected_resources = oci_core_volume_attachments
Terraform Configuration Files
data "oci_core_volume_attachments" "test_volume_attachments" {
compartment_id = var.compartment_id
instance_id = var.instance_id
volume_id = var.volume_id
}
output "va1" {
value = data.oci_core_volume_attachments.test_volume_attachments
}Debug Output
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
va1 = {
"availability_domain" = tostring(null)
"compartment_id" = "ocid1.compartment.oc2..aaaachtvlkp3urfa4iqnzct66kznu4445vepfm2g5zn6iydon43aaaah3nsa"
"filter" = toset(null) /* of object */
"id" = "CoreVolumeAttachmentsDataSource-2009156669"
"instance_id" = "ocid1.instance.oc2.us-luke-1.anw4fujxic44eorilqqgocysvbd7yfiwp4kecpq43hkljrxa5ooetsrg7uta"
"volume_attachments" = tolist([
{
"attachment_type" = "paravirtualized"
"availability_domain" = "LMnO:us-luke-1-ad-1"
"chap_secret" = ""
"chap_username" = ""
"compartment_id" = "ocid1.compartment.oc2..aaaachtvlkp3urfa4iqnzct66kznu4445vepfm2g5zn6iydon43aaaah3nsa"
"device" = "/dev/oracleoci/oraclevdc"
"display_name" = "volumeattachment20240816210758"
"encryption_in_transit_type" = ""
"id" = "ocid1.volumeattachment.oc2.us-luke-1.anm6rkakngs7agyici7mfvzubrhnb665rwhkljrpwx4fujxicoyd2q3jrs5a"
"instance_id" = "ocid1.instance.oc2.us-luke-1.anw4fujxic44eorilqqgocysvbd7yfiwp4kecpq43hkljrxa5ooetsrg7uta"
"ipv4" = ""
"iqn" = ""
"is_agent_auto_iscsi_login_enabled" = false
"is_multipath" = false
"is_pv_encryption_in_transit_enabled" = false
"is_read_only" = false
"is_shareable" = false
"is_volume_created_during_launch" = false
"iscsi_login_state" = ""
"multipath_devices" = tolist([])
"port" = 0
"state" = "ATTACHED"
"time_created" = "2024-08-16 21:07:58.523 +0000 UTC"
"use_chap" = false
"volume_id" = "ocid1.volume.oc2.us-luke-1.abwhklj4tdv7ek2paswaedrpfv7262g7niurccwu7qh7r55eilwdp4ahksfq"
},
])
"volume_id" = "ocid1.volume.oc2.us-luke-1.abwhklj4tdv7ek2paswaedrpfv7262g7niurccwu7qh7r55eilwdp4ahksfq"
}The attachment is indeed shareable but the result says "is_shareable" = false. See here from direct API call showing correct value for "isShareable"
% oci raw-request --http-method GET --target-uri "https://iaas.us-luke-1.oraclegovcloud.com/20160918/volumeAttachments/ocid1.volumeattachment.oc2.us-luke-1.anwhkljrx4fujxiclu5zeyma33sc2tq6m2y3jiryvymw3ro6tjeq3ro3ljtq"
{
"data": {
"attachmentType": "paravirtualized",
"availabilityDomain": "LMnO:us-luke-1-ad-1",
"compartmentId": "ocid1.compartment.oc2..aaaachtvlkp3urfa4iqnzct66kznu4445vepfm2g5zn6iydon43aaaah3nsa",
"device": "/dev/oracleoci/oraclevdc",
"displayName": "volumeattachment20240816210758",
"id": "ocid1.volumeattachment.oc2.us-luke-1.anm6rkakngs7agyici7mfvzubrhnb665rwhkljrpwx4fujxicoyd2q3jrs5a",
"instanceId": "ocid1.instance.oc2.us-luke-1.anw4fujxic44eorilqqgocysvbd7yfiwp4kecpq43hkljrxa5ooetsrg7uta",
"isEncryptionInTransitEnabled": null,
"isMultipath": null,
"isPvEncryptionInTransitEnabled": false,
"isReadOnly": false,
"isShareable": true,
"isVolumeCreatedDuringLaunch": false,
"iscsiLoginState": null,
"lifecycleState": "ATTACHED",
"timeCreated": "2024-08-16T21:07:58.528Z",
"volumeId": "ocid1.volume.oc2.us-luke-1.abwhklj4tdv7ek2paswaedrpfv7262g7niurccwu7qh7r55eilwdp4ahksfq"
},
"headers": {
"Connection": "keep-alive",
"Content-Length": "835",
"Content-Type": "application/json",
"Date": "Tue, 10 Sep 2024 21:27:08 GMT",
"ETag": "117940c2d86559c352a9c62c05d2d63d813ebbf4bdd7a67dde3fe4dc1e4f58f5",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains;",
"X-Content-Type-Options": "nosniff",
"opc-request-id": "27F2A4696BAE4C50B3E847CB2AB36E8F/FFAC34C07EC5C5B77B31B223992F73A4/0F088691D38E7B010912391AFDC35329"
},
"status": "200 OK"
}Also, OCI CLI tool via Python SDK shows correct "shareable" value:
% oci compute volume-attachment get --volume-attachment-id ocid1.volumeattachment.oc2.us-luke-1.anwhkljrx4fujxiclu5zeyma33sc2tq6m2y3jiryvymw3ro6tjeq3ro3ljtq
{
"data": {
"attachment-type": "paravirtualized",
"availability-domain": "LMnO:us-luke-1-ad-1",
"compartment-id": "ocid1.compartment.oc2..aaaachtvlkp3urfa4iqnzct66kznu4445vepfm2g5zn6iydon43aaaah3nsa",
"device": "/dev/oracleoci/oraclevdc",
"display-name": "volumeattachment20240816210758",
"id": "ocid1.volumeattachment.oc2.us-luke-1.anm6rkakngs7agyici7mfvzubrhnb665rwhkljrpwx4fujxicoyd2q3jrs5a",
"instance-id": "ocid1.instance.oc2.us-luke-1.anw4fujxic44eorilqqgocysvbd7yfiwp4kecpq43hkljrxa5ooetsrg7uta",
"is-multipath": null,
"is-pv-encryption-in-transit-enabled": false,
"is-read-only": false,
"is-shareable": true,
"is-volume-created-during-launch": false,
"iscsi-login-state": null,
"lifecycle-state": "ATTACHED",
"time-created": "2024-08-16T21:07:58.528000+00:00",
"volume-id": "ocid1.volume.oc2.us-luke-1.abwhklj4tdv7ek2paswaedrpfv7262g7niurccwu7qh7r55eilwdp4ahksfq"
},
"etag": "117940c2d86559c352a9c62c05d2d63d813ebbf4bdd7a67dde3fe4dc1e4f58f5"
}Panic Output
Expected Behavior
Data returned from oci_core_volume_attachments should have correct values for attachments in the result
Actual Behavior
Data returned from oci_core_volume_attachments data resource has incorrect values. Specifically "is_shareable" value is set false for all attachments even though that are actually "shareable."
Steps to Reproduce
terraform applyusing Volume Attachment resource that is created as "sharedable"- Note that result shows shareable volume attachment listed as
"is_shareable" = false - Compare to results from direct API call or OCI CLI (or other tool) where shareable value is returned correctly
Important Factoids
jeliker