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

fix(aws): configure an External ID in IAM Role #16

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

ghost
Copy link

@ghost ghost commented Mar 26, 2020

Lacework's AWS Config Integration requires two things, a Role ARN and
its External ID, such ID is missing.

This PR is adding the External ID inside the IAM Role we create.

If you are wondering what is this External ID thing, look at these AWS docs.

Ticket

https://lacework.atlassian.net/browse/ALLY-23

Signed-off-by: Salim Afiune Maya [email protected]

Lacework's AWS Config Integration requires two things, a Role ARN and
its External ID, such ID is missing.

This PR is adding the External ID inside the IAM Role we create.

Signed-off-by: Salim Afiune Maya <[email protected]>
@ghost ghost requested a review from scottford-lw March 26, 2020 16:57
@ghost ghost self-assigned this Mar 26, 2020
@@ -19,6 +19,10 @@ variable "bucket_name" {
default = "lacework-cloudtrail-bucket"
}

variable "external_id" {
default = "12345"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afiunelw should we be providing a default value for this, or force the user to make this decision each time? Do we know what happens if a person uses the same value for external_id each time?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing it would be a good idea to force the user, I am really not so sure about it, that is why I wanted to talk with Brian. I will change it to be required.

variable "external_id" {
default = "12345"
}

variable "iam_role_name" {
default = "lacework_iam_role"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing @afiunelw , should we be providing a default value?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't change this variable, I can change it though to be required.

@scottford-lw
Copy link
Contributor

@afiunelw Do we want to consider an update to output.tf to print out the external_id?

https://github.com/lacework/terraform-provisioning/blob/afiune/aws/iam_role/external_id/aws/output.tf

@ghost
Copy link
Author

ghost commented Mar 26, 2020

I don't think we should output a variable that the user inputs.

@scottford-lw
Copy link
Contributor

I am looking at this from the perspective of executing the automation for many accounts in a pipeline. Yes, you know what the external ID that you input, but that external_id is going to be tied to a bunch of resources that you don't know until you converge. Spitting out the external_id with the resources it is attached to might be useful.

@scottford-lw scottford-lw merged commit 2a70585 into master Mar 27, 2020
@ghost
Copy link
Author

ghost commented Mar 27, 2020

My perspective is that, when we finish this Terraform integration, the user inputs an External ID that we will use to configure the AIM Role and the AWS Config Integration in Lacework, so I don't feel it is useful but we can add it for a few until lacework/terraform-provider-lacework#11 is working.

@afiune afiune deleted the afiune/aws/iam_role/external_id branch June 2, 2020 20:35
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

Successfully merging this pull request may close these issues.

2 participants