chore(examples): Add import examples for all resources (#939)
* chore(examples): Add import examples for all resources Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> * Add guide: How to import resources Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
parent
e62729679e
commit
721e10a02f
118 changed files with 837 additions and 5 deletions
|
|
@ -6,3 +6,15 @@ resource "stackit_image" "example_image" {
|
|||
min_disk_size = 10
|
||||
min_ram = 5
|
||||
}
|
||||
|
||||
# Only use the import statement, if you want to import an existing image
|
||||
# Must set a configuration value for the local_file_path attribute as the provider has marked it as required.
|
||||
# Since this attribute is not fetched in general from the API call, after adding it this would replace your image resource after an terraform apply.
|
||||
# In order to prevent this you need to add:
|
||||
#lifecycle {
|
||||
# ignore_changes = [ local_file_path ]
|
||||
# }
|
||||
import {
|
||||
to = stackit_image.import-example
|
||||
id = "${var.project_id},${var.image_id}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue