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

Service linked role #14

Closed
whyman opened this issue Oct 31, 2018 · 2 comments
Closed

Service linked role #14

whyman opened this issue Oct 31, 2018 · 2 comments

Comments

@whyman
Copy link

whyman commented Oct 31, 2018

Hey,

If using this module on virgin account you will get an error as the service linked role doesnt exist.

To create use:

resource "aws_iam_service_linked_role" "es" {
  aws_service_name = "es.amazonaws.com"
}

The problem comes if you are trying to use the above more than once per account, you will get a conflict.

Any suggestions?

@newmie
Copy link

newmie commented Nov 14, 2018

There is some detailed discussion on the issue here:
hashicorp/terraform-provider-aws#5218

There is another terraform elasticsearch module and their fix was to make creation of the service-role optional:
cloudposse/terraform-aws-elasticsearch#5

Depending on your circumstances you could do a similar fix to above:

resource "aws_iam_service_linked_role" "es" {
  count = "${var.service_role_count}"
  aws_service_name = "es.amazonaws.com"
}

If like me your in a situation where you are trying to deploy a microservice and it's not appropriate for it to take ownership of creating this role, then another option is to deploy it as part of a base/platform/shared infrastructure deployment.

@antonbabenko
Copy link
Member

This has been fixed in #22, use v0.7.0 to get this fixed.

This issue was closed.
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

3 participants