Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in resource_avi_rest_dependants.go Added "Computed: true," to several attributes that might be computed at resource creation. Without this, any references to these attributes in other resource definitions in terraform code will fail. Example TF code: ``` resource "avi_virtualservice" "test" { ... vip { auto_allocate_ip = true avi_allocated_vip = true subnet_uuid = "${var.subnet_id}" } } resource "openstack_dns_recordset_v2" "avi" { region = "${var.region}" zone_id = "${var.zone_id}" name = "avi.${var.zone}" description = "A record to avi virtual service" ttl = 300 type = "A" records = ["${lookup(avi_virtualservice.test.vip.0.ip_address[0], "addr")}"] } ``` This code fails at terraform plan, with error: ``` Error: Error refreshing state: 1 error(s) occurred: * openstack_dns_recordset_v2.avi: 1 error(s) occurred: * openstack_dns_recordset_v2.avi: At column 50, line 1: invalid index operation into non-indexable type: TypeString in: ${lookup(avi_virtualservice.test.vip.0.ip_address[0], "addr")} ``` After building the provider binary with the "Computed: true," line added for the ip_address attribute, the terraform plan and apply run without problems. As such, I went through the list of attributes that are Optional and marked all that might be computed with "Computed: true,"
- Loading branch information