I often wish I could see the changes that were made for the values that were “known after apply”. So whereas the plan shows the values that will change, there doesn’t seem to be a place where the values that changed as a result of the apply are shown. Would it be possible to add those to the output of the terraform apply command (ie feature request)? Eg given a terraform apply that shows this:
...
# module.something must be replaced
-/+ resource "aws_batch_job_definition" "my_job" {
~ container_properties = jsonencode(
{
- command = []
- environment = [
- {
- name = "AWS_DEFAULT_REGION"
- value = "us-east-1"
},
]
- image = "<ECR-URL>"
- jobRoleArn = "<role-ARN>"
- memory = 15000
- mountPoints = []
- privileged = true
- resourceRequirements = [
- {
- type = "GPU"
- value = "1"
},
]
- secrets = []
- ulimits = []
- vcpus = 4
- volumes = []
}
) -> (known after apply) # forces replacement
~ id = "<ARN>" -> (known after apply)
...
# (2 unchanged attributes hidden)
}
then after the apply has completed, it would show the values there were determined during the apply, and whether they actually changed (since it is possible they did not):
...
# module.something was replaced
-/+ resource "aws_batch_job_definition" "my_job" {
~ container_properties = jsonencode(
{
- privileged = true -> false
}
) # forced replacement
...
# (3 unchanged attributes hidden)
}
everything that was unchanged was removed (this is bogus example, the ID would for sure have changed, I just wanted to illustrate the idea)