Open rakesh-p opened 3 months ago
Hi @rakesh-p The datasource is working fine
Please find the sample code
provider "cloudstack" {
api_url = var.cloudstack_api_url
api_key = var.cloudstack_api_key
secret_key = var.cloudstack_secret_key
}
data "cloudstack_zone" "zone-data-source" {
filter {
name = "name"
value = "ref-trl-6530-k-Mol8-kiran-chavala"
}
}
output "zonedetails" {
value = data.cloudstack_zone.zone-data-source.dns1
}
terraform apply
zonedetails = "10.0.32.1"
I could get the following zone details
name
dns1
internal_dns1
network_type
I have a simple main.tf as follows that includes a data resource. this plugin crashes when i run terraform plan I have the correct values for api_key and secret as i could create a VM by not using "data resource" What is that i am doing wrong please?
main.tf
terraform plan output: