Terraform module to provision infra. This is pretty much the example from the terraform docs converted to a module.
It's 100% Open Source and licensed under the APACHE2.
Include this repository as a module in your existing terraform code:
module "ca" {
source = "JamesWoolfenden/certificate-authority/aws"
version = "0.2.12"
algorithm = var.algorithm
subject = var.subject
common_tags = var.common_tags
}
Monthly cost estimate
Project: .
Name Monthly Qty Unit Monthly Cost
module.ca.aws_acmpca_certificate_authority.certificate_authority
├─ Private certificate authority 1 months $400.00
└─ Certificates (first 1K) Cost depends on usage: $0.75 per requests
module.ca.aws_s3_bucket.crl
└─ Standard
├─ Storage Cost depends on usage: $0.02 per GB-months
├─ PUT, COPY, POST, LIST requests Cost depends on usage: $0.0053 per 1k requests
├─ GET, SELECT, and all other requests Cost depends on usage: $0.00042 per 1k requests
├─ Select data scanned Cost depends on usage: $0.00225 per GB-months
└─ Select data returned Cost depends on usage: $0.0008 per GB-months
PROJECT TOTAL $400.00
No requirements.
Name | Version |
---|---|
aws | n/a |
No modules.
Name | Type |
---|---|
aws_acmpca_certificate_authority.certificate_authority | resource |
aws_s3_bucket.crl | resource |
aws_s3_bucket_lifecycle_configuration.expire | resource |
aws_s3_bucket_policy.bucket | resource |
aws_s3_bucket_server_side_encryption_configuration.crl | resource |
aws_s3_bucket_versioning.crl | resource |
aws_caller_identity.current | data source |
aws_iam_policy_document.access | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
algorithm | n/a | map(any) |
n/a | yes |
kms_key | n/a | any |
n/a | yes |
sse_algorithm | The type of encryption algorithm to use | string |
"aws:kms" |
no |
subject | n/a | map(any) |
n/a | yes |
Name | Description |
---|---|
certificate_signing_request | The CSR itself |
This is the policy required to build this project:
The Terraform resource required is:
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"acm-pa:DescribeCertificateAuthority",
"acm-pa:ListTags"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"acm-pca:CreateCertificateAuthority",
"acm-pca:DeleteCertificateAuthority",
"acm-pca:GetCertificateAuthorityCertificate",
"acm-pca:UpdateCertificateAuthority"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:GetAccelerateConfiguration",
"s3:GetBucketAcl",
"s3:GetBucketCORS",
"s3:GetBucketLogging",
"s3:GetBucketObjectLockConfiguration",
"s3:GetBucketPolicy",
"s3:GetBucketRequestPayment",
"s3:GetBucketTagging",
"s3:GetBucketVersioning",
"s3:GetBucketWebsite",
"s3:GetEncryptionConfiguration",
"s3:GetLifecycleConfiguration",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetReplicationConfiguration",
"s3:ListBucket",
"s3:PutBucketLogging",
"s3:PutBucketPolicy",
"s3:PutBucketVersioning",
"s3:PutEncryptionConfiguration",
"s3:PutLifecycleConfiguration"
],
"Resource": [
"*"
]
}
]
})
}
Check out these related projects.
- terraform-aws-s3 - S3 buckets
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright © 2019-2023 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.