When trying to update attributes that don't support it, Terraform will generate and successfully apply the plan without making any modifications at all. This can confuse users.
The best practice here is to set the non-updatable fields as ForceNew=True. Thus, when users change these attributes, Terraform will warn them that the change triggers the recreation of the entire resource.
Description of Task to be completed?
Set ForceNew=True in every non-updatable attribute
How should this be manually tested?
Clone the repository, checkout to this branch before proceeding
Installation
Before installing you will need to modify the Makefile present in the folder with the right information.
Normally you'll only need to modify two fields:
VERSION=0.0.1 # Make sure this doesn't interfere with other installations that you might have. I leave it as 0.0.1
OS_ARCH=linux_amd64 # This is your operating system architecture
You can find the full list of supported OS_ARCH at https://github.com/latitudesh/terraform-provider-latitudesh/releases by expanding Assets.
Them run make install to do a local installation of the provider.
and run `terraform init`. Now you are ready to start using terraform.
- Testing
This test can be done with all the resources that got modified. You can find the general structure that you'll need to use in our `examples` folder. More General instructions can be fount at: https://registry.terraform.io/providers/latitudesh/latitudesh/latest/docs.
After creating your resource files you can run `terraform plan` to verify terraforms action plan. In order to execute it you will need to run 'terraform apply' (in both commands an ssh key will be prompted, for this tests you can leave it blank and proceed)
After the apply operation, you can modify any field that isn't supposed to be updated, and terraform should warn you about the resource recreation.
**IMPORTANT**
After finishing your tests you should run terraform destroy to delete all the resources created.
#### Any background context you want to provide?
#### What are the relevant GitHub issues (if any)?
closes #44
#### Screenshots (if appropriate):
#### Questions:
What does this PR do?
When trying to update attributes that don't support it, Terraform will generate and successfully apply the plan without making any modifications at all. This can confuse users.
The best practice here is to set the non-updatable fields as ForceNew=True. Thus, when users change these attributes, Terraform will warn them that the change triggers the recreation of the entire resource.
Description of Task to be completed?
Set
ForceNew=True
in every non-updatable attributeHow should this be manually tested?
Clone the repository, checkout to this branch before proceeding
Makefile
present in the folder with the right information. Normally you'll only need to modify two fields:You can find the full list of supported
OS_ARCH
athttps://github.com/latitudesh/terraform-provider-latitudesh/releases
by expanding Assets.Them run
make install
to do a local installation of the provider.main.tf
file:Configure the provider
provider "latitudesh" { auth_token =
}