mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-12 02:15:01 +00:00
Support install suffix in AWS discovery TF module (#65958)
* Bump terraform-docs from 0.21.0 to 0.22.0 * Support install suffix in AWS discovery TF module
This commit is contained in:
@@ -290,7 +290,7 @@ jobs:
|
||||
# terraform-docs version must match the version in integrations/terraform-modules/.terraform-docs.yml
|
||||
run: |
|
||||
git config --global --add safe.directory $(realpath .)
|
||||
go install github.com/terraform-docs/[email protected]1.0
|
||||
go install github.com/terraform-docs/[email protected]2.0
|
||||
make terraform-module-docs-up-to-date
|
||||
|
||||
- name: Check if the Access Monitoring reference is up to date
|
||||
|
||||
+5
-5
@@ -22,7 +22,7 @@ In addition, the example uses a custom AWS IAM policy to narrow the scope of per
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| terraform | >= 1.0 |
|
||||
| aws | >= 5.0 |
|
||||
| teleport | >= 18.5.1 |
|
||||
@@ -31,19 +31,19 @@ In addition, the example uses a custom AWS IAM policy to narrow the scope of per
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| aws | >= 5.0 |
|
||||
|
||||
## Modules
|
||||
|
||||
| Name | Source | Version |
|
||||
|------|--------|---------|
|
||||
| ---- | ------ | ------- |
|
||||
| aws\_discovery | ../.. | n/a |
|
||||
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
|------|------|
|
||||
| ---- | ---- |
|
||||
| [aws_iam_policy_document.teleport_discovery_service_single_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
|
||||
|
||||
## Inputs
|
||||
@@ -53,6 +53,6 @@ No inputs.
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| ---- | ----------- |
|
||||
| aws\_discovery | n/a |
|
||||
{/* END_TF_DOCS */}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ Configuration in this directory creates AWS and Teleport resources necessary for
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| terraform | >= 1.0 |
|
||||
| aws | >= 5.0 |
|
||||
| teleport | >= 18.5.1 |
|
||||
@@ -33,7 +33,7 @@ No providers.
|
||||
## Modules
|
||||
|
||||
| Name | Source | Version |
|
||||
|------|--------|---------|
|
||||
| ---- | ------ | ------- |
|
||||
| aws\_discovery | ../.. | n/a |
|
||||
|
||||
## Resources
|
||||
@@ -47,6 +47,6 @@ No inputs.
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| ---- | ----------- |
|
||||
| aws\_discovery | n/a |
|
||||
{/* END_TF_DOCS */}
|
||||
+6
-5
@@ -91,7 +91,7 @@ For bugs related to this code, please [open an issue](https://github.com/gravita
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| terraform | >= 1.5.7 |
|
||||
| aws | >= 5.0 |
|
||||
| http | >= 3.0 |
|
||||
@@ -101,7 +101,7 @@ For bugs related to this code, please [open an issue](https://github.com/gravita
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| aws | >= 5.0 |
|
||||
| http | >= 3.0 |
|
||||
| teleport | >= 18.7.4 |
|
||||
@@ -114,7 +114,7 @@ No modules.
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
|------|------|
|
||||
| ---- | ---- |
|
||||
| [aws_iam_openid_connect_provider.teleport](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
|
||||
| [aws_iam_policy.teleport_discovery_service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
|
||||
| [aws_iam_role.teleport_discovery_service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
|
||||
@@ -132,7 +132,7 @@ No modules.
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|------|---------|:--------:|
|
||||
| ---- | ----------- | ---- | ------- | :------: |
|
||||
| apply\_aws\_tags | Additional AWS tags to apply to all created AWS resources. | `map(string)` | `{}` | no |
|
||||
| apply\_teleport\_resource\_labels | Additional Teleport resource labels to apply to all created Teleport resources. | `map(string)` | `{}` | no |
|
||||
| aws\_iam\_policy\_document | Override the AWS IAM policy document attached to the AWS IAM role for resource discovery. | `string` | `""` | no |
|
||||
@@ -147,6 +147,7 @@ No modules.
|
||||
| match\_aws\_regions | Deprecated legacy input. Use aws\_matchers instead. AWS regions to discover. The default matches all AWS regions. | `list(string)` | ```[ "*" ]``` | no |
|
||||
| match\_aws\_resource\_types | Deprecated legacy input. Use aws\_matchers instead. AWS resource types to match when discovering resources with Teleport. | `list(string)` | `[]` | no |
|
||||
| match\_aws\_tags | Deprecated legacy input. Use aws\_matchers instead. AWS resource tags to match when discovering resources with Teleport. The default matches all discovered AWS resources. | `map(list(string))` | ```{ "*": [ "*" ] }``` | no |
|
||||
| teleport\_discovery\_config\_install\_suffix | An optional installation suffix to use in the Teleport discovery\_config. A suffix can be used to allow multiple Teleport installations on the same EC2 instance, which allows the instance to join multiple Teleport clusters. If specified, agent managed updates must be enabled on the cluster. See https://goteleport.com/docs/upgrading/agent-managed-updates/ | `string` | `""` | no |
|
||||
| teleport\_discovery\_config\_name | Name for the `teleport_discovery_config` resource. | `string` | `"discovery"` | no |
|
||||
| teleport\_discovery\_config\_use\_name\_prefix | Determines whether the name of the Teleport discovery config (`teleport_discovery_config_name`) is used as a prefix. | `bool` | `true` | no |
|
||||
| teleport\_discovery\_group\_name | Teleport discovery group to use. For discovery configuration to apply, this name must match at least one Teleport Discovery Service instance's configured `discovery_group`. For Teleport Cloud clusters, use "cloud-discovery-group". | `string` | n/a | yes |
|
||||
@@ -159,7 +160,7 @@ No modules.
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| ---- | ----------- |
|
||||
| aws\_oidc\_provider\_arn | AWS resource name (ARN) of the AWS OpenID Connect (OIDC) provider that allows Teleport Discovery Service to assume an AWS IAM role using OIDC. |
|
||||
| teleport\_discovery\_config\_name | Name of the Teleport dynamic `discovery_config`. Configuration details can be viewed with `tctl get discovery_config/<name>`. Teleport Discovery Service instances will use this `discovery_config` if they are in the same discovery group as the `discovery_config`. |
|
||||
| teleport\_discovery\_service\_iam\_policy\_arn | AWS resource name (ARN) of the AWS IAM policy that grants the permissions needed for Teleport to discover resources in AWS. |
|
||||
|
||||
@@ -32,4 +32,4 @@ settings:
|
||||
sort:
|
||||
enabled: true
|
||||
by: name
|
||||
version: '0.21.0'
|
||||
version: '0.22.0'
|
||||
|
||||
@@ -77,7 +77,7 @@ For bugs related to this code, please [open an issue](https://github.com/gravita
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| terraform | >= 1.5.7 |
|
||||
| aws | >= 5.0 |
|
||||
| http | >= 3.0 |
|
||||
@@ -87,7 +87,7 @@ For bugs related to this code, please [open an issue](https://github.com/gravita
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| aws | >= 5.0 |
|
||||
| http | >= 3.0 |
|
||||
| teleport | >= 18.7.4 |
|
||||
@@ -100,7 +100,7 @@ No modules.
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
|------|------|
|
||||
| ---- | ---- |
|
||||
| [aws_iam_openid_connect_provider.teleport](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
|
||||
| [aws_iam_policy.teleport_discovery_service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
|
||||
| [aws_iam_role.teleport_discovery_service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
|
||||
@@ -118,7 +118,7 @@ No modules.
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|------|---------|:--------:|
|
||||
| ---- | ----------- | ---- | ------- | :------: |
|
||||
| apply\_aws\_tags | Additional AWS tags to apply to all created AWS resources. | `map(string)` | `{}` | no |
|
||||
| apply\_teleport\_resource\_labels | Additional Teleport resource labels to apply to all created Teleport resources. | `map(string)` | `{}` | no |
|
||||
| aws\_iam\_policy\_document | Override the AWS IAM policy document attached to the AWS IAM role for resource discovery. | `string` | `""` | no |
|
||||
@@ -133,6 +133,7 @@ No modules.
|
||||
| match\_aws\_regions | Deprecated legacy input. Use aws\_matchers instead. AWS regions to discover. The default matches all AWS regions. | `list(string)` | ```[ "*" ]``` | no |
|
||||
| match\_aws\_resource\_types | Deprecated legacy input. Use aws\_matchers instead. AWS resource types to match when discovering resources with Teleport. | `list(string)` | `[]` | no |
|
||||
| match\_aws\_tags | Deprecated legacy input. Use aws\_matchers instead. AWS resource tags to match when discovering resources with Teleport. The default matches all discovered AWS resources. | `map(list(string))` | ```{ "*": [ "*" ] }``` | no |
|
||||
| teleport\_discovery\_config\_install\_suffix | An optional installation suffix to use in the Teleport discovery\_config. A suffix can be used to allow multiple Teleport installations on the same EC2 instance, which allows the instance to join multiple Teleport clusters. If specified, agent managed updates must be enabled on the cluster. See https://goteleport.com/docs/upgrading/agent-managed-updates/ | `string` | `""` | no |
|
||||
| teleport\_discovery\_config\_name | Name for the `teleport_discovery_config` resource. | `string` | `"discovery"` | no |
|
||||
| teleport\_discovery\_config\_use\_name\_prefix | Determines whether the name of the Teleport discovery config (`teleport_discovery_config_name`) is used as a prefix. | `bool` | `true` | no |
|
||||
| teleport\_discovery\_group\_name | Teleport discovery group to use. For discovery configuration to apply, this name must match at least one Teleport Discovery Service instance's configured `discovery_group`. For Teleport Cloud clusters, use "cloud-discovery-group". | `string` | n/a | yes |
|
||||
@@ -145,7 +146,7 @@ No modules.
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| ---- | ----------- |
|
||||
| aws\_oidc\_provider\_arn | AWS resource name (ARN) of the AWS OpenID Connect (OIDC) provider that allows Teleport Discovery Service to assume an AWS IAM role using OIDC. |
|
||||
| teleport\_discovery\_config\_name | Name of the Teleport dynamic `discovery_config`. Configuration details can be viewed with `tctl get discovery_config/<name>`. Teleport Discovery Service instances will use this `discovery_config` if they are in the same discovery group as the `discovery_config`. |
|
||||
| teleport\_discovery\_service\_iam\_policy\_arn | AWS resource name (ARN) of the AWS IAM policy that grants the permissions needed for Teleport to discover resources in AWS. |
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ In addition, the example uses a custom AWS IAM policy to narrow the scope of per
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| terraform | >= 1.0 |
|
||||
| aws | >= 5.0 |
|
||||
| teleport | >= 18.5.1 |
|
||||
@@ -17,19 +17,19 @@ In addition, the example uses a custom AWS IAM policy to narrow the scope of per
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| aws | >= 5.0 |
|
||||
|
||||
## Modules
|
||||
|
||||
| Name | Source | Version |
|
||||
|------|--------|---------|
|
||||
| ---- | ------ | ------- |
|
||||
| aws\_discovery | ../.. | n/a |
|
||||
|
||||
## Resources
|
||||
|
||||
| Name | Type |
|
||||
|------|------|
|
||||
| ---- | ---- |
|
||||
| [aws_iam_policy_document.teleport_discovery_service_single_account](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
|
||||
|
||||
## Inputs
|
||||
@@ -39,6 +39,6 @@ No inputs.
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| ---- | ----------- |
|
||||
| aws\_discovery | n/a |
|
||||
<!-- END_TF_DOCS -->
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@ Configuration in this directory creates AWS and Teleport resources necessary for
|
||||
## Requirements
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| ---- | ------- |
|
||||
| terraform | >= 1.0 |
|
||||
| aws | >= 5.0 |
|
||||
| teleport | >= 18.5.1 |
|
||||
@@ -19,7 +19,7 @@ No providers.
|
||||
## Modules
|
||||
|
||||
| Name | Source | Version |
|
||||
|------|--------|---------|
|
||||
| ---- | ------ | ------- |
|
||||
| aws\_discovery | ../.. | n/a |
|
||||
|
||||
## Resources
|
||||
@@ -33,6 +33,6 @@ No inputs.
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| ---- | ----------- |
|
||||
| aws\_discovery | n/a |
|
||||
<!-- END_TF_DOCS -->
|
||||
@@ -57,6 +57,11 @@ locals {
|
||||
join_token = local.teleport_provision_token_name
|
||||
script_name = "default-installer"
|
||||
sshd_config = "/etc/ssh/sshd_config"
|
||||
suffix = (
|
||||
var.teleport_discovery_config_install_suffix != ""
|
||||
? var.teleport_discovery_config_install_suffix
|
||||
: null
|
||||
)
|
||||
}
|
||||
ssm = {
|
||||
document_name = "AWS-RunShellScript"
|
||||
|
||||
@@ -6,10 +6,7 @@ locals {
|
||||
teleport_provision_token_name = (
|
||||
var.teleport_provision_token_use_name_prefix
|
||||
? "${var.teleport_provision_token_name}-${local.teleport_resource_name_suffix}"
|
||||
: coalesce(
|
||||
var.teleport_provision_token_name,
|
||||
local.teleport_resource_name_suffix,
|
||||
)
|
||||
: var.teleport_provision_token_name
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -169,6 +169,13 @@ variable "aws_iam_role_use_name_prefix" {
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "teleport_discovery_config_install_suffix" {
|
||||
description = "An optional installation suffix to use in the Teleport discovery_config. A suffix can be used to allow multiple Teleport installations on the same EC2 instance, which allows the instance to join multiple Teleport clusters. If specified, agent managed updates must be enabled on the cluster. See https://goteleport.com/docs/upgrading/agent-managed-updates/"
|
||||
type = string
|
||||
default = ""
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "teleport_discovery_config_name" {
|
||||
description = "Name for the `teleport_discovery_config` resource."
|
||||
type = string
|
||||
|
||||
Reference in New Issue
Block a user