diff --git a/aws/aws-functions/docs/determine_role_arn.md b/aws/aws-functions/docs/determine_role_arn.md index d7afe35..6047569 100644 --- a/aws/aws-functions/docs/determine_role_arn.md +++ b/aws/aws-functions/docs/determine_role_arn.md @@ -1,4 +1,4 @@ -# determine_role_arn +# [determine_role_arn](../aws-functions.sentinel#L25) This function determines the ARN of an AWS IAM role assumed by the Terraform AWS provider using the [tfconfig/v2](https://www.terraform.io/docs/cloud/sentinel/import/tfconfig-v2.html) and [tfplan/v2](https://www.terraform.io/docs/cloud/sentinel/import/tfplan-v2.html) imports. It can only do this when the `role_arn` of the AWS provider is set to a hard-coded string or to a variable within the Terraform configuration. In the second case, the function cross-references the name of the variable in the tfconfig/v2 import with the actual value assigned to it in the tfplan/v2 import. diff --git a/aws/aws-functions/docs/filter_providers_by_regions.md b/aws/aws-functions/docs/filter_providers_by_regions.md index 4a3d93b..87242a5 100644 --- a/aws/aws-functions/docs/filter_providers_by_regions.md +++ b/aws/aws-functions/docs/filter_providers_by_regions.md @@ -1,4 +1,4 @@ -# filter_providers_by_regions +# [filter_providers_by_regions](../aws-functions.sentinel#L161) This function filters instances of the AWS provider to those in a specific region using the tfconfig/v2 and tfplan/v2 imports. diff --git a/aws/aws-functions/docs/find_resources_with_standard_tags.md b/aws/aws-functions/docs/find_resources_with_standard_tags.md index 033a469..ec3b212 100644 --- a/aws/aws-functions/docs/find_resources_with_standard_tags.md +++ b/aws/aws-functions/docs/find_resources_with_standard_tags.md @@ -1,4 +1,4 @@ -# find_resources_with_standard_tags +# [find_resources_with_standard_tags](../aws-functions.sentinel#L12) This function finds all AWS resource instances of specified types in the current plan that are not being permanently deleted using the [tfplan/v2](https://www.terraform.io/docs/cloud/sentinel/import/tfplan-v2.html) import. It was updated on 9/29/2020 to work with both the short name of the AWS provider, "aws", and fully-qualfied provider names that match the regex, `(.*)aws$`. This was required because Terraform 0.13 and above returns the fully-qualified names of providers such as "registry.terraform.io/hashicorp/aws" to Sentinel. Older versions of Terraform only return the short-form such as "aws". diff --git a/aws/aws-functions/docs/get_assumed_roles.md b/aws/aws-functions/docs/get_assumed_roles.md index e912c44..86a4aa8 100644 --- a/aws/aws-functions/docs/get_assumed_roles.md +++ b/aws/aws-functions/docs/get_assumed_roles.md @@ -1,4 +1,4 @@ -# get_assumed_roles +# [get_assumed_roles](../aws-functions.sentinel#L80) This function gets all roles assumed by any instances of the AWS provider in the current Terraform configuration using the [tfconfig/v2](https://www.terraform.io/docs/cloud/sentinel/import/tfconfig-v2.html) and [tfplan/v2](https://www.terraform.io/docs/cloud/sentinel/import/tfplan-v2.html) imports. The tfplan/v2 import is used by the `determine_role_arn` function that this function calls. diff --git a/aws/aws-functions/docs/validate_assumed_roles_with_list.md b/aws/aws-functions/docs/validate_assumed_roles_with_list.md index 1ad2ac6..7fa9d8d 100644 --- a/aws/aws-functions/docs/validate_assumed_roles_with_list.md +++ b/aws/aws-functions/docs/validate_assumed_roles_with_list.md @@ -1,4 +1,4 @@ -# validate_assumed_roles_with_list +# [validate_assumed_roles_with_list](../aws-functions.sentinel#L101) This function checks whether all roles assumed by all instances of the AWS provider in the current Terraform configuration are in a specified list. ## Sentinel Module diff --git a/aws/aws-functions/docs/validate_assumed_roles_with_map.md b/aws/aws-functions/docs/validate_assumed_roles_with_map.md index 4842a27..56bf9ea 100644 --- a/aws/aws-functions/docs/validate_assumed_roles_with_map.md +++ b/aws/aws-functions/docs/validate_assumed_roles_with_map.md @@ -1,4 +1,4 @@ -# validate_assumed_roles_with_map +# [validate_assumed_roles_with_map](../aws-functions.sentinel#L123) This function validates whether all roles assumed by instances of the AWS provider are allowed for the current workspace based on a map that maps AWS IAM roles to regular expressions (regex) that are compared to the name of the workspace. ## Sentinel Module diff --git a/aws/aws-functions/docs/validate_provider_in_allowed_regions.md b/aws/aws-functions/docs/validate_provider_in_allowed_regions.md index 1f6c3fe..ae4d5ce 100644 --- a/aws/aws-functions/docs/validate_provider_in_allowed_regions.md +++ b/aws/aws-functions/docs/validate_provider_in_allowed_regions.md @@ -1,4 +1,4 @@ -# validate_provider_in_allowed_regions +# [validate_provider_in_allowed_regions](../aws-functions.sentinel#L218) This function validates whether a specific instance of the AWS provider is in a list of regions. The provider instance should be derived from `tfconfig.providers` or from the `provider_config_key` of a resource derived from `tfconfig.resources`. It attempts to identify the region of the provider aliases in several ways including constant values assigned to their `region` argument and resolution of references to variables. It first tries to process references to variables as strings, then as maps with a key called "region". It handles references to variables in the root module by using tfplan.variables. It handles references to variables in non-root modules by examining the module call from the current module's parent. diff --git a/azure/azure-functions/docs/find_resources_with_standard_tags.md b/azure/azure-functions/docs/find_resources_with_standard_tags.md index 91f67d4..b588dcc 100644 --- a/azure/azure-functions/docs/find_resources_with_standard_tags.md +++ b/azure/azure-functions/docs/find_resources_with_standard_tags.md @@ -1,4 +1,4 @@ -# find_resources_with_standard_tags +# [find_resources_with_standard_tags](../azure-functions.sentinel#L8) This function finds all Azure resource instances of specified types in the current plan that are not being permanently deleted using the [tfplan/v2](https://www.terraform.io/docs/cloud/sentinel/import/tfplan-v2.html) import. This function works with both the short name of the Azure provider, "azurerm", and fully-qualfied provider names that match the regex, `(.*)azurerm$`. The latter is required because Terraform 0.13 and above returns the fully-qualified names of providers such as "registry.terraform.io/hashicorp/azurerm" to Sentinel. Older versions of Terraform only return the short-form such as "azurerm". diff --git a/cloud-agnostic/http-examples/registry-functions/docs/find_most_recent_version.md b/cloud-agnostic/http-examples/registry-functions/docs/find_most_recent_version.md index 7a2916a..fc587a8 100644 --- a/cloud-agnostic/http-examples/registry-functions/docs/find_most_recent_version.md +++ b/cloud-agnostic/http-examples/registry-functions/docs/find_most_recent_version.md @@ -1,4 +1,4 @@ -# find_most_recent_version +# [find_most_recent_version](../registry-functions.sentinel#L98) This function finds the most recent version from a map of version strings. The `versions` parameter should contain strings, not actual versions from the version import. The keys of the map should be integers ranging from 0 to N-1 where the map has N versions. It is needed since lists of versions returned by the [Registry Modules API](https://www.terraform.io/docs/cloud/api/modules.html) endpoints are not ordered. diff --git a/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions.md b/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions.md index 5d62814..ae2f226 100644 --- a/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions.md +++ b/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions.md @@ -1,4 +1,4 @@ -# get_recent_module_versions +# [get_recent_module_versions](../registry-functions.sentinel#L11) This function gets recent versions for private or public modules from a private module registry (PMR). It calls the `get_recent_module_versions_by_page` function which gets those versions one page at a time. It has the same arguments as that function except for the `page` argument. ## Sentinel Module diff --git a/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions_by_page.md b/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions_by_page.md index c58b1ea..984e793 100644 --- a/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions_by_page.md +++ b/cloud-agnostic/http-examples/registry-functions/docs/get_recent_module_versions_by_page.md @@ -1,4 +1,4 @@ -# get_recent_module_versions_by_page +# [get_recent_module_versions_by_page](../registry-functions.sentinel#L26) This function gets recent versions for private or public modules from a private module registry (PMR) one page at a time. It is called by the [get_recent_module_versions](./get_recent_module_versions.md) function. It calls itself recursively, incrementing the `page` parameter by one until there are no more pages. We use two separate functions to keep the public interface of the `get_recent_module_versions` function cleaner. diff --git a/cloud-agnostic/http-examples/registry-functions/docs/is_module_in_public_registry.md b/cloud-agnostic/http-examples/registry-functions/docs/is_module_in_public_registry.md index a1b414f..b721a88 100644 --- a/cloud-agnostic/http-examples/registry-functions/docs/is_module_in_public_registry.md +++ b/cloud-agnostic/http-examples/registry-functions/docs/is_module_in_public_registry.md @@ -1,4 +1,4 @@ -# is_module_in_public_registry +# [is_module_in_public_registry](../registry-functions.sentinel#L122) This function determines if a module is in the public registry. ## Sentinel Module @@ -31,4 +31,4 @@ if uncurated_public_module { } ``` -This function is called by the [use-recent-versions-from-pmr.sentinel](../../use-recent-versions-from-pmr.sentinel) policy. In fact, the above code is based on code from that policy. +This function is called by the [use-recent-versions-from-pmr.sentinel](../../use-recent-versions-from-pmr.sentinel) policy. In fact, the above code is based on code from that policy.