Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

エラー原因の調査と改善 #12

Closed
suaaa7 opened this issue Sep 9, 2019 · 2 comments
Closed

エラー原因の調査と改善 #12

suaaa7 opened this issue Sep 9, 2019 · 2 comments
Assignees

Comments

@suaaa7
Copy link
Owner

suaaa7 commented Sep 9, 2019

エラー内容

Error: Error creating Step Function State Machine: 
AccessDeniedException: 
Neither the global service principal states.amazonaws.com, 
nor the regional one is authorized to assume the provided role.

#6 (comment)

@suaaa7
Copy link
Owner Author

suaaa7 commented Oct 28, 2019

@suaaa7
Copy link
Owner Author

suaaa7 commented Oct 28, 2019

  depends_on = [
    # note this direct dependency setting does not work
    # "aws_iam_role_policy.step_functions_execution",
    "null_resource.delay",
  ]
}

# Initial run will fail due to the timing issue
# * aws_sfn_state_machine.batch: Error creating Step Function State Machine:
# AccessDeniedException: Neither the global service principal states.amazonaws.com,
# nor the regional one is authorized to assume the provided role.
# https://github.com/hashicorp/terraform/issues/2869
# Therefore wait 10 seconds
# https://github.com/hashicorp/terraform/issues/17726#issuecomment-377357866

resource "null_resource" "delay" {
  provisioner "local-exec" {
    command = "sleep 10"
  }

  triggers = {
    "before" = "${aws_iam_role_policy.step_functions_execution.id}"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant