Terraform apply error

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 …

 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.

1 Like

I have the same error.

1 Like

I have the same error: Error - Week 2 - Topic 4.8 - terraform apply

Same here.

same problem here

same issue

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

1 Like

@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.

1 Like

@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.

I’m having this same problem

@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.

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 :smiley:

Thanks,
Jess

1 Like