Terraform module to provision the state bucket for kops
The module supports the following:
- Forced server-side encryption at rest for the S3 bucket
- S3 bucket versioning to allow for
kopsstate recovery in the case of accidental deletions or human errors - Block public access in bucket level by default
It's 100% Open Source and licensed under the APACHE2.
IMPORTANT: The master branch is used in source just as an example. In your code, do not pin to master because there may be breaking changes between releases.
Instead pin to the release tag (e.g. ?ref=tags/x.y.z) of one of our latest releases.
It will also create an S3 bucket with the name fdpfm-<tenant>-kops-state for storing kops state.
module "kops" {
source = "git::https://github.com/flexdrive/terraform-aws-kops-state-bucket.git?ref=master"
namespace = "eg"
stage = "prod"
name = "kops-state"
region = "us-east-1"
}Available targets:
help Help screen
help/all Display help for all targets
help/short This help short screen
lint Lint terraform code
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| acl | The canned ACL to apply to the S3 bucket | string | private |
no |
| attributes | Additional attributes (e.g. 1) |
list | <list> |
no |
| block_public_access_enabled | Block all public access from bucket level | string | true |
no |
| delimiter | Delimiter to be used between namespace, stage, name, and attributes |
string | - |
no |
| force_destroy | A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without errors. These objects are not recoverable | string | false |
no |
| name | Name (e.g. kops-state) |
string | kops-state |
no |
| namespace | Namespace (e.g. eg or cp) |
string | - | yes |
| region | AWS Region the S3 bucket should reside in | string | us-east-1 |
no |
| stage | Stage (e.g. prod, dev, staging) |
string | - | yes |
| tags | Additional tags (e.g. map(BusinessUnit,XYZ) |
map | <map> |
no |
| Name | Description |
|---|---|
| bucket_arn | S3 bucket ARN |
| bucket_domain_name | S3 bucket domain name |
| bucket_id | S3 bucket ID |
| bucket_name | S3 bucket name |
| bucket_region | S3 bucket region |
Check out these related projects.
- terraform-aws-kops-state-backend - Terraform module to provision dependencies for
kops(config S3 bucket & DNS zone).
Please use the issue tracker to report any bugs or file feature requests.
If you are interested in being a contributor and want to get involved in developing this project or help out with our other projects, we would love to hear from you! Shoot us an [email][email].
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull Request so that we can review your changes
NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!
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.
![]() Tega McKinney |
|---|
