Reputation: 1
Im trying to create a awa backup plan via terraform For that i have code creating aws backup vaults. While terraform apply im getting this error even though the vaults are getting created on the console
Error: reading Backup Vault (AWSTargetBackupVault): couldn't find resource
Error: reading Backup Vault (AWSTargetBackupVault): couldn't find resource module.build.aws_backup_vault.target_vault[0],
on • ./ . ./. ./modules/aws_build/image_table.tf line
in resource "aws_backup_vault" "target_v resource "aws_backup_vault" "target_vault" (“
I tried adding depends_on in the aws backup plan But that didnt do anything
I trying to create backup cross region So going to use two backup vaults These errors come while creating the vaults and backup plan for the first time.
Upvotes: 0
Views: 541
Reputation: 1
I was having a similar issue and I added "TF_LOG=Debug" before my "terrafom apply"
TF_LOG=Debug Terraform apply"
And seeing the logs I was missing IAM permissions:
"backup:CreateBackupVault", "backup:PutBackupVaultAccessPolicy", "backup:PutBackupVaultNotifications", "backup:TagResource", "backup:DeleteBackupPlan", "backup:DeleteBackupSelection", "backup:DescribeBackupVault" "backup:DeleteBackupVault" "backup:CreateBackupPlan" "backup:CreateBackupSelection"
Upvotes: 0