{"id":29943301,"url":"https://github.com/sourcefuse/terraform-aws-arc-cloud-custodian","last_synced_at":"2026-02-07T08:02:44.085Z","repository":{"id":147933892,"uuid":"430798704","full_name":"sourcefuse/terraform-aws-arc-cloud-custodian","owner":"sourcefuse","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-23T06:06:18.000Z","size":57,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-01T05:55:58.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcefuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-11-22T17:13:50.000Z","updated_at":"2024-09-29T18:14:14.000Z","dependencies_parsed_at":"2024-01-12T07:54:41.929Z","dependency_job_id":null,"html_url":"https://github.com/sourcefuse/terraform-aws-arc-cloud-custodian","commit_stats":null,"previous_names":["sourcefuse/terraform-aws-arc-cloud-custodian"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sourcefuse/terraform-aws-arc-cloud-custodian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-cloud-custodian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-cloud-custodian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-cloud-custodian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-cloud-custodian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcefuse","download_url":"https://codeload.github.com/sourcefuse/terraform-aws-arc-cloud-custodian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-cloud-custodian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29189675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-03T02:14:56.494Z","updated_at":"2026-02-07T08:02:44.080Z","avatar_url":"https://github.com/sourcefuse.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Terraform AWS: Cloud Custodian](https://github.com/sourcefuse/terraform-aws-cloud-custodian)\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=sourcefuse_terraform-aws-arc-cloud-custodian)](https://sonarcloud.io/summary/new_code?id=sourcefuse_terraform-aws-arc-cloud-custodian)\n\n[![Known Vulnerabilities](https://github.com/sourcefuse/terraform-aws-cloud-custodian/actions/workflows/snyk.yaml/badge.svg)](https://github.com/sourcefuse/terraform-aws-cloud-custodian/actions/workflows/snyk.yaml)\n## Overview\n\nThe purpose of this module is to provide a Terraform based interface for administering Cloud Custodian to assist with managing the state of template files and to allow for easier runtime interpolation via Terraform.\n\nFor more information about this repository and its usage, please see [Terraform AWS ARC GitHub CLOUD CUSTODIAN Module Usage Guide](https://github.com/sourcefuse/terraform-aws-arc-cloud-custodian/blob/main/docs/module-usage-guide/README.md).\n\n\n## Requirements \n\n```shell\nTerraform \u003e= 1.0.5  \nPip \u003e= 20.0.2   \nPython \u003e= 3.8 \n``` \n\n## Getting started \nYou must have Python 3.8 or above installed.\n\nTo install Cloud Custodian, you can download it using Pip:\n\n```shell\npip install c7n \n```\n* Pip package notes\n  * c7n is for AWS\n  * c7n_azure us for Azure\n  * c7n_gcp is for Google Compute  \n\n## Usage\n```hcl\nterraform {\n  required_version = \"~\u003e 1.0.5\"\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"~\u003e 4.0\"\n    }\n  }\n}\n\nprovider \"aws\" {\n  region = \"us-east-1\"\n}\n\nresource \"aws_iam_policy\" \"ec2\" {\n  name        = \"cloud-custodian-allow-ec2-management\"\n  description = \"Cloud Custodian EC2 policy.\"\n\n  # This policy is for example purposes only\n  policy = \u003c\u003cEOF\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Action\": [\n        \"ec2:*\",\n        \"*\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": \"*\"\n    }\n  ]\n}\nEOF\n}\n\nresource \"aws_iam_role_policy_attachment\" \"aws_lambda_basic_execution_role\" {\n  role       = module.cloud_custodian.role_name\n  policy_arn = \"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole\"\n}\n\nresource \"aws_iam_role_policy_attachment\" \"ec2\" {\n  role       = module.cloud_custodian.role_name\n  policy_arn = aws_iam_policy.ec2.arn\n}\n\nmodule \"cloud_custodian\" {\n  source = \"../.\"\n\n  name      = \"tf-cloud-custodian\"\n  namespace = \"refarch\"\n  region    = \"us-east-1\"\n\n  stage                    = \"example\"\n  cloudtrail_sqs_enabled   = true\n  custodian_files_path     = \"${path.root}/files\"\n  custodian_templates_path = \"${path.root}/templates\"\n\n  template_file_vars = {\n    EC2_TAG_ROLE = module.cloud_custodian.role_name\n    SQS_ARN      = module.cloud_custodian.sqs_arn\n    REGION       = \"us-east-1\"\n  }\n\n  tags = {\n    Module  = \"terraform-aws-cloud-custodian\"\n    Example = \"true\"\n  }\n}\n\n```\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | ~\u003e 1.3 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 4.0 |\n| \u003ca name=\"requirement_local\"\u003e\u003c/a\u003e [local](#requirement\\_local) | \u003e= 2.0 |\n| \u003ca name=\"requirement_null\"\u003e\u003c/a\u003e [null](#requirement\\_null) | \u003e= 2.0 |\n| \u003ca name=\"requirement_random\"\u003e\u003c/a\u003e [random](#requirement\\_random) | \u003e= 2.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 3.68.0 |\n| \u003ca name=\"provider_local\"\u003e\u003c/a\u003e [local](#provider\\_local) | 2.1.0 |\n| \u003ca name=\"provider_null\"\u003e\u003c/a\u003e [null](#provider\\_null) | 3.1.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_cloudtrail\"\u003e\u003c/a\u003e [cloudtrail](#module\\_cloudtrail) | git::https://github.com/cloudposse/terraform-aws-cloudtrail.git | 0.20.1 |\n| \u003ca name=\"module_cloudtrail_s3_bucket\"\u003e\u003c/a\u003e [cloudtrail\\_s3\\_bucket](#module\\_cloudtrail\\_s3\\_bucket) | git::https://github.com/cloudposse/terraform-aws-cloudtrail-s3-bucket.git | 0.26.2 |\n| \u003ca name=\"module_cloudtrail_sqs_queue\"\u003e\u003c/a\u003e [cloudtrail\\_sqs\\_queue](#module\\_cloudtrail\\_sqs\\_queue) | git::https://github.com/terraform-aws-modules/terraform-aws-sqs.git | v3.1.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_iam_policy.custodian_output_s3_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |\n| [aws_iam_role.role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_iam_role_policy_attachment.cloudtrail](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_role_policy_attachment.cloudwatchlogs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_role_policy_attachment.iam](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_role_policy_attachment.s3_output](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_role_policy_attachment.sqs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_role_policy_attachment.tags](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_s3_bucket.custodian_output](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |\n| [aws_s3_bucket_server_side_encryption_configuration.server_side_encryption](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource |\n| [local_file.cc_files](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |\n| [null_resource.run_custodian](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_cloudtrail_enabled\"\u003e\u003c/a\u003e [cloudtrail\\_enabled](#input\\_cloudtrail\\_enabled) | Set to false to prevent the module from creating any resources. | `bool` | `true` | no |\n| \u003ca name=\"input_cloudtrail_s3_bucket_enabled\"\u003e\u003c/a\u003e [cloudtrail\\_s3\\_bucket\\_enabled](#input\\_cloudtrail\\_s3\\_bucket\\_enabled) | Set to false to prevent the module from creating any resources. | `bool` | `true` | no |\n| \u003ca name=\"input_cloudtrail_sqs_enabled\"\u003e\u003c/a\u003e [cloudtrail\\_sqs\\_enabled](#input\\_cloudtrail\\_sqs\\_enabled) | Set to false to prevent the module from creating any resources. | `bool` | `true` | no |\n| \u003ca name=\"input_custodian_files_path\"\u003e\u003c/a\u003e [custodian\\_files\\_path](#input\\_custodian\\_files\\_path) | Path to where the custodian files are located. | `string` | `null` | no |\n| \u003ca name=\"input_custodian_templates_path\"\u003e\u003c/a\u003e [custodian\\_templates\\_path](#input\\_custodian\\_templates\\_path) | Path to where the custodian template files are located. | `string` | `null` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name of invocation. | `string` | n/a | yes |\n| \u003ca name=\"input_namespace\"\u003e\u003c/a\u003e [namespace](#input\\_namespace) | A namespace for all the resources to live in. | `string` | n/a | yes |\n| \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region) | AWS Region to create objects in. | `string` | n/a | yes |\n| \u003ca name=\"input_stage\"\u003e\u003c/a\u003e [stage](#input\\_stage) | Stage of pipeline (Eg. sbx, dev, staging, uat, prod). | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags to assign resources. | `map(string)` | n/a | yes |\n| \u003ca name=\"input_template_file_vars\"\u003e\u003c/a\u003e [template\\_file\\_vars](#input\\_template\\_file\\_vars) | Variable name and value maps. | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_bucket_arn\"\u003e\u003c/a\u003e [bucket\\_arn](#output\\_bucket\\_arn) | ARN of the bucket. |\n| \u003ca name=\"output_bucket_id\"\u003e\u003c/a\u003e [bucket\\_id](#output\\_bucket\\_id) | Name of the bucket. |\n| \u003ca name=\"output_role_arn\"\u003e\u003c/a\u003e [role\\_arn](#output\\_role\\_arn) | ARN of the role created. |\n| \u003ca name=\"output_role_name\"\u003e\u003c/a\u003e [role\\_name](#output\\_role\\_name) | Name of the role created. |\n| \u003ca name=\"output_sqs_arn\"\u003e\u003c/a\u003e [sqs\\_arn](#output\\_sqs\\_arn) | ARN of the SQS queue |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Versioning  \nThis project uses a `.version` file at the root of the repo which the pipeline reads from and does a git tag.  \n\nOn commits to `main`, you will need to increment this version. Once the project is merged, the pipeline will kick off and tag the latest git commit.  \n\n## Development\n\n### Prerequisites\n\nInstall the prerequisites:\n* [pre-commit](https://pre-commit.com/#install)\n* [terraform](https://learn.hashicorp.com/terraform/getting-started/install#installing-terraform)\n* [terraform-docs](https://github.com/segmentio/terraform-docs)\n\nThen run `pre-commit` on the repo:  \n\n```shell\npre-commit install\npre-commit run --all-files\n```\n\n## Authors\n\nThis project is authored by:  \n* SourceFuse ARC Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-cloud-custodian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-cloud-custodian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-cloud-custodian/lists"}