run-at-scale / vscode-terraform-doc-snippets

Snippets in vscode for all resources and data sources, as yanked directly from provider docs.
https://marketplace.visualstudio.com/items?itemName=run-at-scale.terraform-doc-snippets
MIT License
36 stars 7 forks source link

generated snippets seems to be old, not in line with the provider's current documentation #21

Closed kral2 closed 3 years ago

kral2 commented 3 years ago

I have issues

Some generated snippets seems to be old, not in line with the provider's current documentation.

I'm submitting a

What is the current behavior

writing tf-oci-resource-core_vcn generates the code block below (pre-HCL2 syntax):

resource "oci_core_vcn" "test_vcn" {
    #Required
    cidr_block = "${var.vcn_cidr_block}"
    compartment_id = "${var.compartment_id}"

    #Optional
    defined_tags = {"Operations.CostCenter"= "42"}
    display_name = "${var.vcn_display_name}"
    dns_label = "${var.vcn_dns_label}"
    freeform_tags = {"Department"= "Finance"}
}

Whereas the current documentation have the following code block in the documentation: https://registry.terraform.io/providers/hashicorp/oci/latest/docs/resources/core_vcn

resource "oci_core_vcn" "test_vcn" {
    #Required
    compartment_id = var.compartment_id

    #Optional
    cidr_block = var.vcn_cidr_block
    cidr_blocks = var.vcn_cidr_blocks
    defined_tags = {"Operations.CostCenter"= "42"}
    display_name = var.vcn_display_name
    dns_label = var.vcn_dns_label
    freeform_tags = {"Department"= "Finance"}
    ipv6cidr_block = var.vcn_ipv6cidr_block
    is_ipv6enabled = var.vcn_is_ipv6enabled
}

If this is a bug, how to reproduce? Please include a code sample

In VSCode with the Terraform-doc-snippets extension enabled, type tf-oci-resource-core_vcn in a file with a .tf extension and compare the output to the current documentation. https://registry.terraform.io/providers/hashicorp/oci/latest/docs/resources/core_vcn

What's the expected behavior

resource "oci_core_vcn" "test_vcn" {
    #Required
    compartment_id = var.compartment_id

    #Optional
    cidr_block = var.vcn_cidr_block
    cidr_blocks = var.vcn_cidr_blocks
    defined_tags = {"Operations.CostCenter"= "42"}
    display_name = var.vcn_display_name
    dns_label = var.vcn_dns_label
    freeform_tags = {"Department"= "Finance"}
    ipv6cidr_block = var.vcn_ipv6cidr_block
    is_ipv6enabled = var.vcn_is_ipv6enabled
}

Environment

Other relevant info

brandonjbjelland commented 3 years ago

Updated them this week in response to your email. Sorry for the delay - working to make the code a little easier to operate regularly.