Skip to content

Add restart policy to control machine#6815

Open
AmitPhulera wants to merge 3 commits intomasterfrom
ap/add-restart-policy-to-control
Open

Add restart policy to control machine#6815
AmitPhulera wants to merge 3 commits intomasterfrom
ap/add-restart-policy-to-control

Conversation

@AmitPhulera
Copy link
Contributor

@AmitPhulera AmitPhulera commented Feb 24, 2026

Add a new server role CommCareControlServerRole which has all the permissions from CommCareServerRole but adds the ability to Stop, Start instances.

I have some questions regarding removing things from the new role which probably would not be required for control machine which I have asked as comments on the PR.

Another thing to note here is that we have added iam_instance_profile to the ignore_changes in the terraform lifecycle rules. So to apply these changes, we would have to remove iam_instance_profile from

lifecycle {
ignore_changes = [user_data, key_name, root_block_device.0.delete_on_termination,
ebs_optimized, ami, iam_instance_profile]
}

And then apply the changes and then add it back.

Environments Affected

All

  • If the changes affect multiple environments, I will ensure they are rolled out consistently across all environments.

policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}

resource "aws_iam_role_policy" "control_request_response_stream_put_policy" {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can remove this because we are not shipping any control logs via firehose?

Copy link
Member

Choose a reason for hiding this comment

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

sounds right

POLICY
}

resource "aws_iam_role_policy" "control_access_s3_kiss_upload" {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This probably is outdated and should be removed from CommCareServerRole as well?

Copy link
Member

Choose a reason for hiding this comment

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

Agree!

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