liatrio / terraform-change-pr-commenter

GitHub Action to read changes from Terraform plan JSON, summarize changes, and post them in a GitHub Pull Request Comment
Apache License 2.0
38 stars 8 forks source link

feat: added support for 'replace', and 'unchanged' #24

Closed anthonygauthier closed 2 years ago

anthonygauthier commented 2 years ago

This PR solves #22

github-actions[bot] commented 2 years ago

test-data/tf_test.json

Terraform Plan: 11 to be created, 0 to be deleted, 0 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_interface.calvin-nic + azurerm_network_interface_security_group_association.calvin-sg-nic + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ``` #### Resources to delete ```diff ``` #### Resources to update ```diff ``` #### Resources to replace ```diff ```

test-data/tf_test2.json

Terraform Plan: 11 to be created, 0 to be deleted, 0 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_interface.calvin-nic + azurerm_network_interface_security_group_association.calvin-sg-nic + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ``` #### Resources to delete ```diff ``` #### Resources to update ```diff ``` #### Resources to replace ```diff ```

test-data/tf_test3.json

Terraform Plan: 11 to be created, 0 to be deleted, 0 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_interface.calvin-nic + azurerm_network_interface_security_group_association.calvin-sg-nic + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ``` #### Resources to delete ```diff ``` #### Resources to update ```diff ``` #### Resources to replace ```diff ```

test-data/tf_test4.json

Terraform Plan: 1 to be created, 0 to be deleted, 1 to be updated, 1 to be replaced, 35 unchanged. #### Resources to create ```diff + module.aks_lz.module.key_vault.azurerm_private_endpoint.key_vault ``` #### Resources to delete ```diff ``` #### Resources to update ```diff ! module.aks_lz.module.key_vault.azurerm_key_vault.key_vault ``` #### Resources to replace ```diff - module.aks_lz.azurerm_virtual_hub_connection.aks_vnet_hub_connection[0] + module.aks_lz.azurerm_virtual_hub_connection.aks_vnet_hub_connection[0] ```
github-actions[bot] commented 2 years ago

test-data/tf_test.json

Terraform Plan: 11 to be created, 0 to be deleted, 0 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_interface.calvin-nic + azurerm_network_interface_security_group_association.calvin-sg-nic + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ``` #### Resources to delete ```diff ``` #### Resources to update ```diff ``` #### Resources to replace ```diff ```
github-actions[bot] commented 2 years ago

test-data/tf_test.json

Terraform Plan: 11 to be created, 0 to be deleted, 0 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_interface.calvin-nic + azurerm_network_interface_security_group_association.calvin-sg-nic + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ```

test-data/tf_test2.json

Terraform Plan: 9 to be created, 1 to be deleted, 1 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ``` #### Resources to delete ```diff - azurerm_network_interface.calvin-nic ``` #### Resources to update ```diff ! azurerm_network_interface_security_group_association.calvin-sg-nic ```

test-data/tf_test3.json

Terraform Plan: 1 to be created, 0 to be deleted, 1 to be updated, 1 to be replaced, 35 unchanged. #### Resources to create ```diff + module.aks_lz.module.key_vault.azurerm_private_endpoint.key_vault ``` #### Resources to update ```diff ! module.aks_lz.module.key_vault.azurerm_key_vault.key_vault ``` #### Resources to replace ```diff - module.aks_lz.azurerm_virtual_hub_connection.aks_vnet_hub_connection[0] -/+ module.aks_lz.azurerm_virtual_hub_connection.aks_vnet_hub_connection[0] ```
github-actions[bot] commented 2 years ago

test-data/tf_test.json

Terraform Plan: 11 to be created, 0 to be deleted, 0 to be updated, 0 to be replaced, 0 unchanged. #### Resources to create ```diff + azurerm_linux_virtual_machine.calvinvm + azurerm_network_interface.calvin-nic + azurerm_network_interface_security_group_association.calvin-sg-nic + azurerm_network_security_group.calvin-security-group + azurerm_public_ip.calvin-ip + azurerm_resource_group.calvin + azurerm_storage_account.calvin-sa + azurerm_subnet.calvin-subnet + azurerm_virtual_network.calvin-vn + random_id.calvin-rid + tls_private_key.calvin_ssh ```
liatrio-bot commented 2 years ago

:tada: This PR is included in version 1.3.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: