You cannot use resource targeting in this way as an output is not a resource, you can however run a simple apply, as terraform is idempotent that should not change any existing infrastructure but simply put in your output into terraform state.
you can test this with a simple terraform plan. Tested with terraform 1.0. With nothing else in your statefile you will end up with this, after apply:
{
"version": 4,
"terraform_version": "1.0.0",
"serial": 1,
"lineage": "d79eacc7-51eb-2bf4-5ec6-cf8dca57348d",
"outputs": {
"environment_information": {
"value": {
"bar": "value2",
"foo": "value1"
},
"type": [
"object",
{
"bar": "string",
"foo": "string"
}
]
}
},
"resources": []
}
If you have other non applied/half applied updates you can do one of two things, roll back your code to when they were not there and then remove any associated resources from state (keep a backup) then run apply again, or manually edit the statefile, either way update your hash in the locking db. If its only a couple of outputs i'd go with editing the statefile, just follow the syntax and always always have yourstate versioned and pull a copy just in case.