-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to add tags that don't exist #791
Comments
Tags can take some time to be visible in the system, have you validated after waiting a period of time that they are still missing? I can not reproduce the issue. |
I'm a little confused. How will waiting help if terraform won't put them in to begin with? Regardless I have waited and it still doesn't work. |
Hi @jayntguru, it's not a Terraform issue here. This particular underlying API has an asynchronous behavior under the hood, hence the mention of a delay of the tag showing up on the entity. That being said, I couldn't reproduce this issue either. Can you share your data source HCL code that goes with the associated resource? |
[Edit tried to fix formatting - failed - gave up.] Here's my slightly sanitized code. It's entirely possible I'm doing something wrong, if I am, I don't know what it is.
What I do not understand is that the plan looks like it's going to do the right thing.
Here's what happens on apply -
If it was a timing thing I would expect subsequent runs to be successful. The plan only shows it as reading the alert, not creating it. |
@jayntguru I'm also unable to reproduce. Can you slap a long create timeout on the
|
Thanks for the assistance. I tried the timeouts several places in that block and it didn't change anything (still times out after 10 seconds). Possible I'm doing it wrong? It looks like I should be able to just toss it in there and it should work. (?) I think I did figure out a clue though, when I do the plan I can tell if it will work or not. This one will work. It's one of the 3 created in the same file. (Two of the three work.) ` # newrelic_entity_tags.SERVER1 will be updated in-place
resource "newrelic_synthetics_monitor" "ingress_for_SERVER1" { Here's one that I can tell won't work (again, one of the three where two worked and one did not.) `
Notice how it's missing all of the other tags that should be there? This makes me think the problem is on create or read. I don't think it's on create because the checks look fine in the UI once they are there. Any clues based on that? |
The removal of the tags that you have not defined is also captured here: #766 In the mean time, ignore the tags that exist on the resource that terraform keeps trying to remove. That said, which tags are you expecting to be added that are not? I don't know if you caught the comment above from @sanderblue, but when terraform makes the call to the API to create the tags, those tags may take a moment to actually get created in the service. So if the API service hasn't created the tags yet before another |
The tags I'm expecting to see added are "environment", "tech" and "vip". These alerts were created 2 days ago at this point and still don't work. So I don't think it's a timing thing... unless it's something to do with the timing on create. These are all created in the same terraform plan/apply (along with a dozen or so other infra and nrql alerts). |
Hmm, I tested again this morning and it worked within a minute. Using the following manifest:
I was then able to modify one of the values and that also showed up quicky. Then just to confirm, I was able to verify the tags using the graphql query interface here: https://api.newrelic.com/graphiql
I suspect if the tags aren't being added that perhaps something else is going on. From your manifest above, I would certainly expect that the entity |
I believe this should be resolved on |
Terraform Version
Terraform v0.12.26
Affected Resource(s)
newrelic_entity_tags
Terraform Configuration Files
resource "newrelic_entity_tags" "foo" {
guid = data.newrelic_entity.foo.guid
tag {
key = "VIP"
values = ["SingleNode"]
}
}
Expected Behavior
Add tag to entity
Actual Behavior
Error Message
Error: expected entity tag VIP to have been updated but was not found
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
1: Use the above code
2: plan
3: apply
Important Factoids
First time messing with tags vs labels. It doesn't look like you have to create a tag first (and I can't find any documentation on doing it that way.)
The text was updated successfully, but these errors were encountered: