cloudposse/terraform-aws-efs-backup

The following resource(s) failed to create: [Topic]

p1t3r opened this issue · 1 comments

p1t3r commented

Hi,

I have got following the errors applying (terraform apply):

module.efs_backup.aws_cloudformation_stack.sns: 1 error(s) occurred: aws_cloudformation_stack.sns: ROLLBACK_COMPLETE: ["The following resource(s) failed to create: [Topic]. . Rollback requested by user." "Invalid parameter: Endpoint (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 0f1e8da9-7469-5dfd-8e5e-de14ff3509fa)"]

and afterwards applying it once again pops up the following:

module.efs_backup.aws_cloudformation_stack.datapipeline: 1 error(s) occurred: module.efs_backup.aws_cloudformation_stack.datapipeline: At column 39, line 1: map "aws_cloudformation_stack.sns.outputs" does not have any elements so cannot determine type. in: ${aws_cloudformation_stack.sns.outputs["TopicArn"]}

I have used the following code:

main.tf

module "efs_backup" {
source = "git::https://github.com/cloudposse/terraform-aws-efs-backup.git?ref=master"

name = "${var.name}"
stage = "${var.stage}"
namespace = "${var.namespace}"
vpc_id = "${var.vpc_id}"
efs_mount_target_id = "${var.efs_mount_target_id}"
use_ip_address = "false"
noncurrent_version_expiration_days = "${var.noncurrent_version_expiration_days}"
ssh_key_pair = "${var.ssh_key_pair}"
datapipeline_config = "${var.datapipeline_config}"
modify_security_group = "true"
}

output "efs_backup_security_group" {
value = "${module.efs_backup.security_group_id}"

terraform.tfvars

namespace = "namespace"

stage = "stage"

name = "efs-backup"

region = "eu-central-1"

vpc_id = "vpc-0123456"

efs_mount_target_id = "fsmt-0123456"

#use_ip_address = "false"

#modify_security_group = "false"

noncurrent_version_expiration_days = "35"

ssh_key_pair = "ssh-rsa key"

#datapipeline_config = "${map("instance_type", "t2.micro", "email", "", "period", "24 hours", "timeout", "60 Minutes")}"

attributes = []

tags = {}

delimiter = "-"

variables.tf

variable "name" {
type = "string"
}

variable "namespace" {
type = "string"
}

variable "stage" {
type = "string"
}

variable "region" {
type = "string"
default = ""
description = "(Optional) AWS Region. If not specified, will be derived from 'aws_region' data source"
}

variable "vpc_id" {
type = "string"
}

variable "use_ip_address" {
default = "false"
}

variable "datapipeline_config" {
type = "map"

default = {
instance_type = "t2.micro"
email = ""
period = "24 hours"
timeout = "60 Minutes"
}
}

variable "efs_mount_target_id" {
type = "string"
description = "EFS Mount Target ID (e.g. fsmt-279bfc62)"
}

variable "modify_security_group" {
default = "false"
}

variable "ssh_key_pair" {
type = "string"
}

variable "noncurrent_version_expiration_days" {
default = "35"
}

variable "delimiter" {
type = "string"
default = "-"
description = "Delimiter to be used between name, namespace, stage, etc."
}

variable "attributes" {
type = "list"
default = []
description = "Additional attributes (e.g. efs-backup)"
}

variable "tags" {
type = "map"
default = {}
description = "Additional tags (e.g. map('BusinessUnit,XYZ)"
}

Do you have maybe an idea how to solve it?

Thanks in advance!

p1t3r commented

Hi,
I have resolved the issue - the mail address has not been set.