terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

Boot volume and vnic inherit tags

Open mviniciusleal opened this issue 5 years ago • 6 comments

Terraform Version

Terraform v0.11.11

OCI Provider Version

terraform-provider-oci 3.16.0

Description:

Boot volume and vnic inherit defined_tags and freeform_tags from oci_core_instance

Terraform Plan

resource "oci_core_instance" "testinstance" { availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}" compartment_id = "${var.compartment_id}" display_name = "testinstance" shape = "VM.Standard2.1"

freeform_tags  = {
    Environment = "DEV"
}

defined_tags = {
    Finance.Project = "testproject"
}

source_details {
    source_type = "image"
    source_id = "${lookup(data.oci_core_images.testinstance_image.images[0],"id")}"
}

create_vnic_details {
    subnet_id = "${lookup(data.oci_core_subnets.subnets_snapp.subnets[0],"id")}"
    display_name = "testinstance"
    hostname_label = "testinstance"
assign_public_ip = "false"
}
metadata {
    ssh_authorized_keys = "${var.ssh_public_key}"
}

}

mviniciusleal avatar Mar 05 '19 06:03 mviniciusleal

Hello, please clarify if you are asking a question or making a statement. Is this behavior you are observing and think problematic, or behavior you would like to see but do not. If the latter could you please state your use case.

codycushing avatar Mar 05 '19 17:03 codycushing

It is a feature that I would like to use. We are using cost tag tracking and we need to apply the tag for all resources. I did not find a way to apply the tag to boot volumes created inside oci_core_instance, so an easy way would be to inherit the same tag from the instance.

mviniciusleal avatar Mar 05 '19 21:03 mviniciusleal

This is supported in Terraform Provider version 3.69.0

srishtipmishra avatar Apr 02 '20 01:04 srishtipmishra

Marking this upstream as service team is working on it.

srishtipmishra avatar Apr 06 '20 18:04 srishtipmishra

2 questions:

  1. what is the status of this feature?
  2. I am noticing that upon creation the defined and freeform tags are currently attached to my boot volume, however, this only seems to happen upon creation and not retroactively. So I am currently forced to script updating my boot volumes with tags.

Could you confirm that this is indeed the only way to fix it currently and if so, when can we expect to optimize this behaviour?

wjvanroosmalen avatar Nov 30 '20 16:11 wjvanroosmalen

Hi, even i am facing similar issue, do we have a solution yet for this problem?

shrusubra avatar Apr 20 '22 08:04 shrusubra

We are very sorry that we couldn't respond to each and every issue reported on GitHub. Although we have refined the process to prioritize customer issues on GitHub, since this issue was reported a while ago, there is a good chance it may have been fixed in the latest version of Terraform Provider OCI. If you are still experiencing this issue, please create a new issue and label it as Bug.

ravinitp avatar May 04 '23 07:05 ravinitp