Skip to content

Commit

Permalink
add terraform docs and pin provider version (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Z4ck404 authored Sep 18, 2023
1 parent 4b1304c commit 56d69d1
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .terraform-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
formatter: "markdown table"

output:
file: "README.md"
mode: inject

settings:
indent: 3
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,44 @@

- `k apply -f examples/pvc.yaml -n kube-system`

- `k apply -f examples/pod.yaml -n kube-system`
- `k apply -f examples/pod.yaml -n kube-system`
<!-- BEGIN_TF_DOCS -->
### Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0.0 |

### Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.17.0 |

### Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_ebs_csi_irsa_role"></a> [ebs\_csi\_irsa\_role](#module\_ebs\_csi\_irsa\_role) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | 5.17.0 |

### Resources

| Name | Type |
|------|------|
| [aws_eks_addon.ebs_csi](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon_version.ebs_csi](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_addon_version) | data source |
| [aws_eks_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source |
| [aws_iam_openid_connect_provider.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_openid_connect_provider) | data source |

### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_aws_profile"></a> [aws\_profile](#input\_aws\_profile) | n/a | `string` | n/a | yes |
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | ## variables | `string` | n/a | yes |
| <a name="input_eks_cluster_name"></a> [eks\_cluster\_name](#input\_eks\_cluster\_name) | n/a | `string` | n/a | yes |

### Outputs

No outputs.
<!-- END_TF_DOCS -->
6 changes: 3 additions & 3 deletions examples/default-with-k8s-resources/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ resource "kubernetes_pod" "pod-with-pvc" {
image = nginx
port {
container_port = "80"
name = "http-server"
name = "http-server"
}
volume_mount {
name = "pv-test-ebs-csi"
name = "pv-test-ebs-csi"
mount_path = "/usr/share/nginx/html"
}
}
}
depends_on = [ kubernetes_persistent_volume.pv-test-ebs-csi ]
depends_on = [kubernetes_persistent_volume.pv-test-ebs-csi]
}

11 changes: 11 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ provider "aws" {
profile = var.aws_profile
}

## versions

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0.0"
}
}
}

### variables
variable "aws_region" {
type = string
Expand Down

0 comments on commit 56d69d1

Please sign in to comment.