terraform-provider-oci
terraform-provider-oci copied to clipboard
oci_dns_resolvers data source does not return attached views
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.1.9 on darwin_amd64
- provider registry.terraform.io/oracle/oci v4.74.0
Affected Resource(s)
data source: oci_dns_resolvers
Terraform Configuration Files
terraform {
required_providers {
oci = {
source = "oracle/oci"
}
}
}
provider "oci" {
region = "us-phoenix-1"
}
# Resolvers
data "oci_dns_resolvers" "myresolver" {
compartment_id = var.compartment_id
scope = "PRIVATE"
display_name = var.resolvername
}
### Debug Output
<!---
Please provide a link to a GitHub Gist containing the complete debug output. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
To obtain the debug output, see the [Verbose logging for OCI Terraform Provider](https://www.terraform.io/docs/providers/oci/guides/troubleshooting.html#verbose-logging-for-oci-terraform-provider).
Github Gist: https://gist.github.com/
--->
https://gist.github.com/ea1363/a367935659a38e362d52570f58fb42f1
### Panic Output
<!---
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.
Github Gist: https://gist.github.com/
--->
### Expected Behavior
<!--- What should have happened? --->
The expected output should list the resolver and its attached views as shown by the oci command line:
$ oci dns resolver get --resolver-id ocid1.dnsresolver.oc1.phx.amaaaaaact4fpbiaj64o4yzxgwearhzodhuse6thpynw2qbuflx4apsq3qsa
{
"data": {
"-self": "https://dns.us-phoenix-1.oci.oraclecloud.com/20180115/resolvers/ocid1.dnsresolver.oc1.phx.amaaaaaact4fpbiaj64o4yzxgwearhzodhuse6thpynw2qbuflx4apsq3qsa",
"attached-vcn-id": "ocid1.vcn.oc1.phx.amaaaaaact4fpbia62km7x7ydzc5nybecodkvsolb3i2r6aqjz2mvnkvf3ka",
"attached-views": [
{
"view-id": "ocid1.dnsview.oc1.phx.amaaaaaact4fpbiabhcsihk4bds7v45uhtu6s7ce7uxuohish33clirynf2q"
}
],
"compartment-id": "ocid1.compartment.oc1..aaaaaaaar34wwzbydv43v5e62bm7rz7wcpgl4ieuc6ax3od3fnnncoqulhgq",
"default-view-id": "ocid1.dnsview.oc1.phx.aaaaaaaabesjsi5vnohe2hjvmmi4yx6whduropwtr277uyajkjtsigahz7wa",
"defined-tags": {
"Oracle-Tags": {
"CreatedBy": "edsel",
"CreatedOn": "2022-04-18T14:48:30.491Z"
}
},
"display-name": "reverse",
"endpoints": [],
"freeform-tags": {},
"id": "ocid1.dnsresolver.oc1.phx.amaaaaaact4fpbiaj64o4yzxgwearhzodhuse6thpynw2qbuflx4apsq3qsa",
"is-protected": true,
"lifecycle-state": "ACTIVE",
"rules": [],
"time-created": "2022-04-18T14:48:32.878000+00:00",
"time-updated": "2022-04-28T18:12:19.590000+00:00"
},
"etag": "\"11#application/json--gzip\""
}
### Actual Behavior
<!--- What actually happened? --->
after applying the terraform, and then doing terraform show, here is the result. Notice attached_views is empty:
data "oci_dns_resolvers" "myresolver" {
compartment_id = "ocid1.compartment.oc1..aaaaaaaar34wwzbydv43v5e62bm7rz7wcpgl4ieuc6ax3od3fnnncoqulhgq"
display_name = "reverse"
id = "DnsResolversDataSource-3668821019"
resolvers = [
{
attached_vcn_id = "ocid1.vcn.oc1.phx.amaaaaaact4fpbia62km7x7ydzc5nybecodkvsolb3i2r6aqjz2mvnkvf3ka"
attached_views = []
compartment_id = "ocid1.compartment.oc1..aaaaaaaar34wwzbydv43v5e62bm7rz7wcpgl4ieuc6ax3od3fnnncoqulhgq"
default_view_id = "ocid1.dnsview.oc1.phx.aaaaaaaabesjsi5vnohe2hjvmmi4yx6whduropwtr277uyajkjtsigahz7wa"
defined_tags = {
"Oracle-Tags.CreatedBy" = "edsel"
"Oracle-Tags.CreatedOn" = "2022-04-18T14:48:30.491Z"
}
display_name = "reverse"
endpoints = []
freeform_tags = {}
id = "ocid1.dnsresolver.oc1.phx.amaaaaaact4fpbiaj64o4yzxgwearhzodhuse6thpynw2qbuflx4apsq3qsa"
is_protected = true
resolver_id = ""
rules = []
scope = ""
self = "https://dns.us-phoenix-1.oci.oraclecloud.com/20180115/resolvers/ocid1.dnsresolver.oc1.phx.amaaaaaact4fpbiaj64o4yzxgwearhzodhuse6thpynw2qbuflx4apsq3qsa"
state = "ACTIVE"
time_created = "2022-04-18 14:48:32.878 +0000 UTC"
time_updated = "2022-04-28 18:12:19.59 +0000 UTC"
},
]
scope = "PRIVATE"
}
### Steps to Reproduce
<!--- Please list the steps required to reproduce the issue. --->
1. `terraform apply`
2. `terraform show`
### Important Factoids
<!--- Is there anything atypical about your environment that we should know? For example: Is the issue specific to a region? --->
### References
<!---
Information about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests
Are there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor documentation? For example:
--->