Closed mjmuller68 closed 4 years ago
Hi @mjmuller68 ,
Thanks for reporting this bug.
You are correct, the datasource missing schema for specification
which result in empty output.
I create a ticket to fix this issue. In the meantime, you can use specifcation
directly from the resource oci_apigateway_deployment
:
output "test-deployments" {
value = "${oci_apigateway_deployment.test_deployment.specification}"
}
Thanks
Hi @mjmuller68 , thanks for the report. I've checked the API we use(https://docs.cloud.oracle.com/en-us/iaas/api/#/en/api-gateway/20190501/DeploymentSummary/). it doesnt return the specification field because of the size and the authorization perspective. This is not an bug in the terraform provider. I will close this ticket. If you have more questions about it, feel free to contact with me or reopen the ticket.
Community Note
Terraform Version and Provider Version
Terraform v0.12.28
Affected Resource(s)
oci_apigateway_deployments
Terraform Configuration Files
variable "tenancy_ocid" {} variable "user_ocid" {} variable "fingerprint" {} variable "private_key_path" {} variable "compartment_ocid" {} variable "region" {} variable "gateway_display_name" {}
provider "oci" { tenancy_ocid = "${var.tenancy_ocid}" user_ocid = "${var.user_ocid}" fingerprint = "${var.fingerprint}" private_key_path = "${var.private_key_path}" region = "${var.region}" }
data "oci_apigateway_gateways" "test_gateways" {
Required
compartment_id = "${var.compartment_ocid}"
display_name = "${var.gateway_display_name}" state = "ACTIVE" }
data "oci_apigateway_deployments" "test_deployments" {
Required
compartment_id = "${var.compartment_ocid}"
Optional
display_name = "${var.deployment_display_name}" gateway_id = "${data.oci_apigateway_gateways.test_gateways.gateway_collection[0].id}" state = "ACTIVE" }
output "api-gw" { value = data.oci_apigateway_gateways.test_gateways.gateway_collection
value = data.oci_apigateway_gateways.test_gateways.gateway_collection[0]
}
output "test-deployments" { value = data.oci_apigateway_deployments.test_deployments.deployment_collection }
Debug Output
Panic Output
Expected Behavior
The output for the APIGW deployment should list the routing specification details under the "specification" field.
Actual Behavior
The specification field is blank. Example output: { "compartment_id" = "ocid1.compartment.oc1..aaaaaaaark4c3nv7lcak5jspffnpb6frc5wpstwdqwuvytu6mbq"
}
Steps to Reproduce
terraform apply
Important Factoids
References