Terraform template to create SNS topic with subscription of mail id

0 votes
I have one task in the Terraform template with AWS Cloud. I have one repo with a master in code commit AWS. Terraform should create a branch from master in code commit then create a notification rule and trigger all events(like push, merge, commit,) then create a new notification with a subscription(list of mail id's). Is this possible? So this terraform should create a branch, trigger all events, create SNS notification with a subscription on AWS. Kindly help me
Jul 7, 2020 in Terraform by Lakshminarayanan
• 1,370 points

recategorized Jul 7, 2020 by MD 4,305 views

1 answer to this question.

0 votes

Hi@Lakshminarayanan,

For SNS topic, you can use aws_sns_topic_subscription resource in Terraform. You can go through the HashiCrop document for SNS topic. You will get some examples. I have attached the link below for your reference.

https://www.terraform.io/docs/providers/aws/r/sns_topic_subscription.html

answered Jul 7, 2020 by MD
• 95,460 points
Hi @MD,

Many thanks for your reply. My requirement is somewhat different. Better if i have some exact example about my requirement. "Terraform should create a branch from master in code commit then create a notification rule and trigger all events(like push, merge, commit,) then create a new notification with a subscription(list of mail id's)." I don't whether its possible or not.
I think the first part may not be possible. For that, you can create your own customized code. For the second part, you can use Terraform.

Related Questions In Terraform

0 votes
1 answer

How to create GCS bucket with versioning using Terraform?

Hi@MD, You can create a new bucket in Google ...READ MORE

answered Dec 1, 2020 in Terraform by akhtar
• 38,260 points
1,656 views
0 votes
1 answer

How to create one key in AWS using terraform?

Hi@akhtar, You can use aws_key_pair resource n terraform. ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,460 points
1,560 views
0 votes
1 answer

How to create a folder in S3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket_object resource to create one ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,460 points
10,970 views
0 votes
1 answer

How to create one s3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket resources to create ...READ MORE

answered Jun 12, 2020 in Terraform by MD
• 95,460 points
3,912 views
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer

How to create GCP instance with public IP with terraform?

Hi@akhtar, You need to specify "access_config" under "network_interface" ...READ MORE

answered Dec 1, 2020 in Terraform by MD
• 95,460 points
2,035 views
0 votes
1 answer

How to read the volume ID of the EC2 instance using Terraform?

Hi@akhtar, You won't be able to extract EBS ...READ MORE

answered Dec 4, 2020 in Terraform by MD
• 95,460 points
2,304 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP