Closed christung16 closed 2 years ago
Please use nd as platform if it is NDFC.
Thanks, Shangxin
On Aug 10, 2022, at 9:02 PM, christung16 @.***> wrote:
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 other comments that do not add relevant new information or questions, 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
❯ terraform -v Terraform v1.2.5 on windows_amd64
provider registry.terraform.io/ciscodevnet/dcnm v1.2.3 DCNM version
V x.x.x V 12.1.1e Affected Resource(s)
dcnm_XXXXX dcnm_interface dcnm_rest Terraform Configuration Files
Copy-paste your Terraform configurations here - for large Terraform configs,
please use a service like Dropbox and share a link to the ZIP file. For
security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
terraform { required_providers { dcnm = { source = "CiscoDevNet/dcnm" version = "1.2.3" } } }
provider "dcnm" {
Configuration options
username = "admin"
cisco-dcnm/ndfc password
password = ""
cisco-dcnm/ndfc url
url = "https://
" insecure = true platform = "dcnm" } data "dcnm_interface" "check" { serial_number = "9WB1P8K74HF" name = "Ethernet1/1" type = "ethernet" fabric_name = "chris-fabric-terraform"
}
Debug Output
❯ terraform plan data.dcnm_interface.check: Reading... ╷ │ Error: │
404 Not Found │ │404 Not Found
│ nginx │ │ │ │ │ with data.dcnm_interface.check, │ on main.tf line 22, in data "dcnm_interface" "check": │ 22: data "dcnm_interface" "check" { │ Panic Output
Expected Behavior
it should poll the interface data.
Actual Behavior
It shows 404 error
Steps to Reproduce
terraform apply Important Factoids
References
0000
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
@christung16 Did you had time to try Shangxin suggestion? Let us know if we can close this issue.
Yes, it works. The case can be closed. Thanks for your support.
Sorry @lhercot , one more issue regarding import in powershell. How to escape the double quote? I can do the import in ubuntu with
terraform import dcnm_interface.customers[\"leaf_2_eth_1_2\"] "ethernet:96G8WRV3HMF:Ethernet1/2:chris-fabric-terraform"
However, in windows power shell, it doesn't work in these ways:
❯ terraform import dcnm_interface.customers['"leaf_1_eth_1_11"'] "ethernet:9WB1P8K74HF:Ethernet1/11:chris-fabric-terraform"
╷
│ Error: Index value required
│
│ on <import-address> line 1:
│ 1: dcnm_interface.customers[leaf_1_eth_1_11]
│
│ Index brackets must contain either a literal number or a literal string.
╵
❯ terraform import dcnm_interface.customers["`"leaf_1_eth_1_11`""] "ethernet:9WB1P8K74HF:Ethernet1/11:chris-fabric-terraform"
╷
│ Error: Index value required
│
│ on <import-address> line 1:
│ 1: dcnm_interface.customers[leaf_1_eth_1_11]
│
│ Index brackets must contain either a literal number or a literal string.
╵
For information on valid syntax, see:
https://www.terraform.io/docs/cli/state/resource-addressing.html
@christung16 try this:
terraform import dcnm_interface.customers[\`"leaf_1_eth_1_11\`"] "ethernet:9WB1P8K74HF:Ethernet1/11:chris-fabric-terraform"
@RutvikS-crest , Thanks a lot!! It works well!!
Community Note
Terraform Version
❯ terraform -v Terraform v1.2.5 on windows_amd64
DCNM version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
it should poll the interface data.
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
0000