terraform-provider-oci
terraform-provider-oci copied to clipboard
oci_core_vcn should not return ready until the DNS resolver is ready
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
TF -> 1.17 Provider -> 4.70.0
Affected Resource(s)
oci_core_vcn
Expected Behavior
The oci_core_vcn should not return ready until the DNS resolver is ready. I expect that in a single TF run I can create a VCN and ultimately associate a private DNS zone to it without having to do polling/sleep hacks.
Actual Behavior
The resource returns without the resolver ready and thus first run fails as the resolver association lookup returns a null dns_resolver_id and in turn attempting to reference the resolver itself times out.
References
https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/core_vcn_dns_resolver_association#dns_resolver_id
My 2 Cents
I am well aware that the docs here state this is how it works. However, this is a very poor user experience, and something AWS would never do. The VCN resource is not ready, and should not return ready if there are still resources being created asynchronously.
If you have to, at least provide a flag we can set so that internally in the provider the VCN doesn't return ready until the resolver is ready. Then you can preserve existing behaviour while pleasing those of us who want a single TF run to create our entire application without error.