# Terraform apply error

**URL:** <https://community.deeplearning.ai/t/terraform-apply-error/693807>\
**Category:** Introduction to Data Engineering\
**Tags:** week-module-2, coursera-platform\
**Created:** [September 17, 2024, 3:18pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807 "2024-09-17T15:18:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ugarch](https://avatars.discourse-cdn.com/v4/letter/u/a9a28c/32.png) [@ugarch](https://community.deeplearning.ai/u/ugarch)\
**Post date:** [September 17, 2024, 3:18pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/1 "2024-09-17T15:18:37Z")

</div>

**C1W2 Assignment**

I have:

- setup Cloud9 as instructed
- download files,
- run setup.sh
- look at the DB

Then run `terraform init` followed by ‘terraform plan’,  
Until here all good.

When I run `terraform init`, I received the following errors …

```auto
 Error: creating Glue Catalog Database (de-c1w2-analytics-db): operation error Glue: CreateDatabase, https response error StatusCode: 400, RequestID: 4eeb9a4f-b51a-403d-9a0a-f05361912d88, api error AccessDeniedException: User: arn:aws:sts::920464130120:assumed-role/Cloud9InstanceRole/i-0072a46ff2bc4b497 is not authorized to perform: glue:CreateDatabase on resource: arn:aws:glue:us-east-1:920464130120:catalog because no identity-based policy allows the glue:CreateDatabase action
│ 
│ with aws_glue_catalog_database.analytics_database,
│ on glue.tf line 1, in resource "aws_glue_catalog_database" "analytics_database":
│ 1: resource "aws_glue_catalog_database" "analytics_database" {
│ 
╵
╷
│ Error: creating Glue Connection (de-c1w2-rds-connection): operation error Glue: CreateConnection, https response error StatusCode: 400, RequestID: 2ae354e1-3399-4ca8-8e22-f282c6acc102, api error AccessDeniedException: User: arn:aws:sts::920464130120:assumed-role/Cloud9InstanceRole/i-0072a46ff2bc4b497 is not authorized to perform: glue:CreateConnection on resource: arn:aws:glue:us-east-1:920464130120:catalog because no identity-based policy allows the glue:CreateConnection action
│ 
│ with aws_glue_connection.rds_connection,
│ on glue.tf line 6, in resource "aws_glue_connection" "rds_connection":
│ 6: resource "aws_glue_connection" "rds_connection" {
│ 
╵
╷
│ Error: putting IAM Role (Cloud9-de-c1w2-glue-role) Policy (de-c1w2-glue-role-policy): operation error IAM: PutRolePolicy, https response error StatusCode: 403, RequestID: 16323b93-34f5-4591-aec3-0aff98829ee9, api error AccessDenied: User: arn:aws:sts::920464130120:assumed-role/Cloud9InstanceRole/i-0072a46ff2bc4b497 is not authorized to perform: iam:PutRolePolicy on resource: role Cloud9-de-c1w2-glue-role because no identity-based policy allows the iam:PutRolePolicy action
│ 
│ with aws_iam_role_policy.task_role_policy,
│ on iam_roles.tf line 6, in resource "aws_iam_role_policy" "task_role_policy":
│ 6: resource "aws_iam_role_policy" "task_role_policy" {
│ 

```

How can we fix it? Over the AWS console, no permissions to do so.  
Thank you.

---

<div class="post-metadata">

**Author:** ![mahita22](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mahita22](https://community.deeplearning.ai/u/mahita22)\
**Post date:** [September 17, 2024, 3:48pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/2 "2024-09-17T15:48:13Z")

</div>

I have the same error.

---

<div class="post-metadata">

**Author:** ![candidosales](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/candidosales/32/37794_2.png) [@candidosales](https://community.deeplearning.ai/u/candidosales)\
**Post date:** [September 17, 2024, 4:23pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/3 "2024-09-17T16:23:18Z")

</div>

I have the same error: [Error - Week 2 - Topic 4.8 - terraform apply](https://community.deeplearning.ai/t/error-week-2-topic-4-8-terraform-apply/693843)

---

<div class="post-metadata">

**Author:** ![YM2](https://avatars.discourse-cdn.com/v4/letter/y/48db29/32.png) [@YM2](https://community.deeplearning.ai/u/YM2)\
**Post date:** [September 17, 2024, 6:13pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/4 "2024-09-17T18:13:30Z")

</div>

Same here.

---

<div class="post-metadata">

**Author:** ![Peter\_Litvak](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@Peter\_Litvak](https://community.deeplearning.ai/u/Peter_Litvak)\
**Post date:** [September 17, 2024, 7:57pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/5 "2024-09-17T19:57:38Z")

</div>

same problem here

---

<div class="post-metadata">

**Author:** ![mixklim](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@mixklim](https://community.deeplearning.ai/u/mixklim)\
**Post date:** [September 17, 2024, 8:03pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/6 "2024-09-17T20:03:51Z")

</div>

same issue

---

<div class="post-metadata">

**Author:** ![jessica-dlai](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jessica-dlai/32/82109_2.png) [@jessica-dlai](https://community.deeplearning.ai/u/jessica-dlai)\
**Post date:** [September 17, 2024, 9:02pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/8 "2024-09-17T21:02:44Z")

</div>

Thank you for raising this issue, our curriculum engineers are looking into this and we’ll respond here soon.

---

<div class="post-metadata">

**Author:** ![Nevermnd](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nevermnd/32/126021_2.png) [@Nevermnd](https://community.deeplearning.ai/u/Nevermnd)\
**Post date:** [September 17, 2024, 9:33pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/9 "2024-09-17T21:33:43Z")

</div>

@jessica-dlai thanks for looking into this Jessica. I wonder if also, once the matter is addressed, it makes sense to post an official announcement that the matter has been resolved, rather than simply a reply to this post?

Otherwise having a long thread like this hanging around, only to have to scroll down to the end for a resolution perhaps doesn’t reflect so great on a newly released course.

---

<div class="post-metadata">

**Author:** ![Community-Team](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/community-team/32/136466_2.png) [@Community-Team](https://community.deeplearning.ai/u/Community-Team)\
**Post date:** [September 18, 2024, 2:07pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/10 "2024-09-18T14:07:42Z")

</div>

@Nevermnd ,

Apologies for the bugs. And we will let everyone know once we get to address the issue. Once that it is done, we will let everyone know and close the thread if needed.

---

<div class="post-metadata">

**Author:** ![nariv](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nariv](https://community.deeplearning.ai/u/nariv)\
**Post date:** [September 18, 2024, 2:09pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/11 "2024-09-18T14:09:40Z")

</div>

I’m having this same problem

 ![image](https://global.discourse-cdn.com/dlai/original/3X/0/7/0786370959fa4fc466d277c08ca25bea696a32ed.png)

---

<div class="post-metadata">

**Author:** ![Nevermnd](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nevermnd/32/126021_2.png) [@Nevermnd](https://community.deeplearning.ai/u/Nevermnd)\
**Post date:** [September 18, 2024, 2:38pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/12 "2024-09-18T14:38:27Z")

</div>

@Community-Team no problem. There have been a number of various reports of different problems on different course sections in the last few days-- And I have no means to explicitly flag them.

Thus I feel it would be judicious I believe for the DLAI staff to check the forums regularly for a few days until all the kinks are ironed out.

---

<div class="post-metadata">

**Author:** ![jessica-dlai](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jessica-dlai/32/82109_2.png) [@jessica-dlai](https://community.deeplearning.ai/u/jessica-dlai)\
**Post date:** [September 18, 2024, 3:56pm UTC](https://community.deeplearning.ai/t/terraform-apply-error/693807/13 "2024-09-18T15:56:27Z")

</div>

**Update on this issue:** This problem is due to a policy issue caused by the the platform we use to run the labs. We have deployed a fix and you should now have the proper permissions to complete the lab. Please let us know if you run into any other issues. We will continue to improve this solution to give learners the best lab experience possible.

Thank you all for helping raise this issue and we appreciate your patience 😃

Thanks,  
Jess
