You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+89-14Lines changed: 89 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -347,6 +347,95 @@ $ terraform plan
347
347
348
348
2. API : Use the documentation below to make an API call and retrieve the Privilege Cloud StoreID. (https://docs.cyberark.com/secrets-hub-privilege-cloud/Latest/en/Content/Developer/sh-policy-api-tutorial.htm?tocpath=Developer%7CTutorials%7C_____4).
349
349
350
+
## Resource Lifecycle Management
351
+
352
+
The CyberArk Terraform Provider supports complete lifecycle management for resources including import, update, and delete operations.
353
+
354
+
### Importing Existing Resources
355
+
356
+
You can import existing resources into your Terraform state using the `terraform import` command. This is useful when you want to start managing existing infrastructure with Terraform.
description = "Updated AWS store description" # Modified field
409
+
aws_account_id = var.aws_account_id
410
+
aws_account_region = "us-east-1"
411
+
aws_account_alias = "updated-aws-alias" # Modified field
412
+
aws_iam_role = var.aws_iam_role
413
+
}
414
+
```
415
+
416
+
#### Sync Policy Update Example
417
+
```terraform
418
+
resource "cyberark_sync_policy""my_policy" {
419
+
name = "sync-policy"
420
+
description = "Updated policy description" # Modified field
421
+
safe_name = var.safe_name
422
+
source_id = var.source_id
423
+
target_id = var.target_id
424
+
}
425
+
```
426
+
427
+
### Deleting Resources
428
+
429
+
Resources can be deleted by removing them from your Terraform configuration and running `terraform apply`, or by using `terraform destroy`for the entire configuration.
0 commit comments