terraform-provider-oci
terraform-provider-oci copied to clipboard
Boot volume and vnic inherit tags
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}"
}
}
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.
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.
This is supported in Terraform Provider version 3.69.0
Marking this upstream as service team is working on it.
2 questions:
- what is the status of this feature?
- 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?
Hi, even i am facing similar issue, do we have a solution yet for this problem?
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.