diff --git a/docs/reference/services/app-orchestration/amazon-ecs-cluster.md b/docs/reference/services/app-orchestration/amazon-ecs-cluster.md index 0d981a38c..0db0e4e18 100644 --- a/docs/reference/services/app-orchestration/amazon-ecs-cluster.md +++ b/docs/reference/services/app-orchestration/amazon-ecs-cluster.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon ECS Cluster -View Source +View Source Release Notes @@ -836,5 +836,5 @@ The CloudWatch Dashboard metric widget for the ECS cluster workers' Memory utili diff --git a/docs/reference/services/app-orchestration/amazon-ecs-fargate-cluster.md b/docs/reference/services/app-orchestration/amazon-ecs-fargate-cluster.md index da6ab85ac..ec41da55a 100644 --- a/docs/reference/services/app-orchestration/amazon-ecs-fargate-cluster.md +++ b/docs/reference/services/app-orchestration/amazon-ecs-fargate-cluster.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon ECS Fargate Cluster -View Source +View Source Release Notes @@ -159,5 +159,5 @@ The name of the ECS cluster. diff --git a/docs/reference/services/app-orchestration/amazon-ecs-service.md b/docs/reference/services/app-orchestration/amazon-ecs-service.md index 3d450b534..1a118bd22 100644 --- a/docs/reference/services/app-orchestration/amazon-ecs-service.md +++ b/docs/reference/services/app-orchestration/amazon-ecs-service.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon ECS Service -View Source +View Source Release Notes @@ -1318,5 +1318,5 @@ The names of the ECS service's load balancer's target groups diff --git a/docs/reference/services/app-orchestration/amazon-eks-core-services.md b/docs/reference/services/app-orchestration/amazon-eks-core-services.md index d483db705..3077040e2 100644 --- a/docs/reference/services/app-orchestration/amazon-eks-core-services.md +++ b/docs/reference/services/app-orchestration/amazon-eks-core-services.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon EKS Core Services -View Source +View Source Release Notes @@ -897,5 +897,5 @@ Name of the CloudWatch Log Group used to store the container logs. diff --git a/docs/reference/services/app-orchestration/amazon-eks-workers.md b/docs/reference/services/app-orchestration/amazon-eks-workers.md index 858770c35..86c7ad979 100644 --- a/docs/reference/services/app-orchestration/amazon-eks-workers.md +++ b/docs/reference/services/app-orchestration/amazon-eks-workers.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon EKS Workers -View Source +View Source Release Notes @@ -1154,5 +1154,5 @@ The list of names of the ASGs that were deployed to act as EKS workers. diff --git a/docs/reference/services/app-orchestration/amazon-eks.md b/docs/reference/services/app-orchestration/amazon-eks.md index 773f07d8c..4a1bd6420 100644 --- a/docs/reference/services/app-orchestration/amazon-eks.md +++ b/docs/reference/services/app-orchestration/amazon-eks.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon EKS -View Source +View Source Release Notes @@ -1585,5 +1585,5 @@ The ID of the AWS Security Group associated with the self-managed EKS workers. diff --git a/docs/reference/services/app-orchestration/auto-scaling-group-asg.md b/docs/reference/services/app-orchestration/auto-scaling-group-asg.md index 9042d201a..4ae2e631c 100644 --- a/docs/reference/services/app-orchestration/auto-scaling-group-asg.md +++ b/docs/reference/services/app-orchestration/auto-scaling-group-asg.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Auto Scaling Group -View Source +View Source Release Notes @@ -892,5 +892,5 @@ The ID of the Security Group that belongs to the ASG. diff --git a/docs/reference/services/app-orchestration/ec-2-instance.md b/docs/reference/services/app-orchestration/ec-2-instance.md index 12cf36806..fb6cbfc4d 100644 --- a/docs/reference/services/app-orchestration/ec-2-instance.md +++ b/docs/reference/services/app-orchestration/ec-2-instance.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # EC2 Instance -View Source +View Source Release Notes @@ -681,5 +681,5 @@ The input parameters for the EBS volumes. diff --git a/docs/reference/services/app-orchestration/kubernetes-namespace.md b/docs/reference/services/app-orchestration/kubernetes-namespace.md index bac432733..64213a7d8 100644 --- a/docs/reference/services/app-orchestration/kubernetes-namespace.md +++ b/docs/reference/services/app-orchestration/kubernetes-namespace.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Kubernetes Namespace -View Source +View Source Release Notes @@ -263,5 +263,5 @@ The name of the rbac role that grants read only permissions on the namespace. diff --git a/docs/reference/services/app-orchestration/kubernetes-service.md b/docs/reference/services/app-orchestration/kubernetes-service.md index 9b23045a8..97891d4b5 100644 --- a/docs/reference/services/app-orchestration/kubernetes-service.md +++ b/docs/reference/services/app-orchestration/kubernetes-service.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Kubernetes Service -View Source +View Source Release Notes @@ -925,5 +925,5 @@ Number of seconds to wait for Pods to become healthy before marking the deployme diff --git a/docs/reference/services/app-orchestration/lambda.md b/docs/reference/services/app-orchestration/lambda.md index bc5332c11..1d503d89e 100644 --- a/docs/reference/services/app-orchestration/lambda.md +++ b/docs/reference/services/app-orchestration/lambda.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Lambda -View Source +View Source Release Notes @@ -361,6 +361,26 @@ The function entrypoint in your code. This is typically the name of a function o + + + +An object defining the policy to attach to `iam_role_name` if the IAM role is going to be created. Accepts a map of objects, where the map keys are sids for IAM policy statements, and the object fields are the resources, actions, and the effect ('Allow' or 'Deny') of the statement. Ignored if `iam_role_arn` is provided. Leave as null if you do not wish to use IAM role with Service Accounts. + + + + +```hcl +map(object({ + resources = list(string) + actions = list(string) + effect = string + })) +``` + + + + + @@ -762,5 +782,5 @@ Latest published version of your Lambda Function diff --git a/docs/reference/services/app-orchestration/public-static-website.md b/docs/reference/services/app-orchestration/public-static-website.md index d90e86420..fa7c9a250 100644 --- a/docs/reference/services/app-orchestration/public-static-website.md +++ b/docs/reference/services/app-orchestration/public-static-website.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Public Static Website -View Source +View Source Release Notes @@ -332,5 +332,5 @@ The ARN of the created S3 bucket associated with the website. diff --git a/docs/reference/services/ci-cd-pipeline/ecs-deploy-runner.md b/docs/reference/services/ci-cd-pipeline/ecs-deploy-runner.md index fb985c3b6..8d1560d69 100644 --- a/docs/reference/services/ci-cd-pipeline/ecs-deploy-runner.md +++ b/docs/reference/services/ci-cd-pipeline/ecs-deploy-runner.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # ECS Deploy Runner -View Source +View Source Release Notes @@ -1107,5 +1107,5 @@ Security Group ID of the ECS task diff --git a/docs/reference/services/ci-cd-pipeline/jenkins.md b/docs/reference/services/ci-cd-pipeline/jenkins.md index 293a44fe0..25d4b847d 100644 --- a/docs/reference/services/ci-cd-pipeline/jenkins.md +++ b/docs/reference/services/ci-cd-pipeline/jenkins.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Jenkins CI Server -View Source +View Source Release Notes @@ -848,5 +848,5 @@ The ID of the Security Group attached to the Jenkins EC2 Instance diff --git a/docs/reference/services/data-storage/amazon-aurora.md b/docs/reference/services/data-storage/amazon-aurora.md index 39c268697..f1be5c9b0 100644 --- a/docs/reference/services/data-storage/amazon-aurora.md +++ b/docs/reference/services/data-storage/amazon-aurora.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon Aurora -View Source +View Source Release Notes @@ -1059,5 +1059,5 @@ The ARN of the AWS Lambda Function used for sharing manual snapshots with second diff --git a/docs/reference/services/data-storage/amazon-ecr-repositories.md b/docs/reference/services/data-storage/amazon-ecr-repositories.md index 8d68dd79e..eb3bc2fd9 100644 --- a/docs/reference/services/data-storage/amazon-ecr-repositories.md +++ b/docs/reference/services/data-storage/amazon-ecr-repositories.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon ECR Repositories -View Source +View Source Release Notes @@ -130,6 +130,22 @@ object({ + + + +The default list of AWS account IDs for external AWS accounts that should be able to create Lambda functions based on container images in these ECR repos. Can be overridden on a per repo basis by the external_account_ids_with_lambda_access property in the repositories map. + + + + +```hcl +list(string) +``` + + + + + @@ -252,5 +268,5 @@ A list of IAM policy actions necessary for ECR write access. diff --git a/docs/reference/services/data-storage/amazon-elasti-cache-for-memcached.md b/docs/reference/services/data-storage/amazon-elasti-cache-for-memcached.md index 067e6589b..c3372f726 100644 --- a/docs/reference/services/data-storage/amazon-elasti-cache-for-memcached.md +++ b/docs/reference/services/data-storage/amazon-elasti-cache-for-memcached.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon ElastiCache for Memcached -View Source +View Source Release Notes @@ -283,5 +283,5 @@ The configuration endpoint to allow host discovery. diff --git a/docs/reference/services/data-storage/amazon-elasti-cache-for-redis.md b/docs/reference/services/data-storage/amazon-elasti-cache-for-redis.md index 8026e219e..9033fa433 100644 --- a/docs/reference/services/data-storage/amazon-elasti-cache-for-redis.md +++ b/docs/reference/services/data-storage/amazon-elasti-cache-for-redis.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon ElastiCache for Redis -View Source +View Source Release Notes @@ -418,5 +418,5 @@ When cluster mode is disabled, use this endpoint for all read operations. diff --git a/docs/reference/services/data-storage/amazon-elasticsearch.md b/docs/reference/services/data-storage/amazon-elasticsearch.md index 83ddc26f8..575627a2e 100644 --- a/docs/reference/services/data-storage/amazon-elasticsearch.md +++ b/docs/reference/services/data-storage/amazon-elasticsearch.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon Elasticsearch Service -View Source +View Source Release Notes @@ -521,5 +521,5 @@ Domain-specific endpoint for Kibana without https scheme. diff --git a/docs/reference/services/data-storage/amazon-rds.md b/docs/reference/services/data-storage/amazon-rds.md index b8b91e20c..fa303500f 100644 --- a/docs/reference/services/data-storage/amazon-rds.md +++ b/docs/reference/services/data-storage/amazon-rds.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon Relational Database Service -View Source +View Source Release Notes @@ -1097,5 +1097,5 @@ The ID of the Security Group that controls access to the RDS DB instance. diff --git a/docs/reference/services/data-storage/s-3-bucket.md b/docs/reference/services/data-storage/s-3-bucket.md index 96ece8c54..07651bea1 100644 --- a/docs/reference/services/data-storage/s-3-bucket.md +++ b/docs/reference/services/data-storage/s-3-bucket.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # S3 Bucket -View Source +View Source Release Notes @@ -415,5 +415,5 @@ The name of the replica S3 bucket. diff --git a/docs/reference/services/landing-zone/aws-app-account-baseline-wrapper.md b/docs/reference/services/landing-zone/aws-app-account-baseline-wrapper.md index e8366d7fa..be044afc6 100644 --- a/docs/reference/services/landing-zone/aws-app-account-baseline-wrapper.md +++ b/docs/reference/services/landing-zone/aws-app-account-baseline-wrapper.md @@ -16,15 +16,17 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Account Baseline for app accounts -View Source +View Source Release Notes +Compliance Docs + ## Overview A security baseline for AWS Landing Zone for configuring the app accounts (dev, stage, prod, and other similar child @@ -1611,5 +1613,5 @@ A map of ARNs of the service linked roles created from diff --git a/docs/reference/services/landing-zone/aws-root-account-baseline-wrapper.md b/docs/reference/services/landing-zone/aws-root-account-baseline-wrapper.md index 748c4b2f4..8c79361e6 100644 --- a/docs/reference/services/landing-zone/aws-root-account-baseline-wrapper.md +++ b/docs/reference/services/landing-zone/aws-root-account-baseline-wrapper.md @@ -16,15 +16,17 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Account Baseline for root account -View Source +View Source Release Notes +Compliance Docs + ## Overview A security baseline for AWS Landing Zone for configuring the root account (AKA master account) of an AWS Organization, including setting up @@ -1955,5 +1957,5 @@ A map of user name to that user's AWS Web Console password, encrypted with that diff --git a/docs/reference/services/landing-zone/aws-security-account-baseline-wrapper.md b/docs/reference/services/landing-zone/aws-security-account-baseline-wrapper.md index ccb7d900c..5b2c8cbd6 100644 --- a/docs/reference/services/landing-zone/aws-security-account-baseline-wrapper.md +++ b/docs/reference/services/landing-zone/aws-security-account-baseline-wrapper.md @@ -16,15 +16,17 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Account Baseline for security account -View Source +View Source Release Notes +Compliance Docs + ## Overview A security baseline for AWS Landing Zone for configuring the security account (the one where all your IAM users and IAM groups are defined), including setting up @@ -2064,5 +2066,5 @@ A map of usernames to that user's AWS Web Console password, encrypted with that diff --git a/docs/reference/services/landing-zone/gruntwork-access.md b/docs/reference/services/landing-zone/gruntwork-access.md index ecb8a2a5d..a90f69f0a 100644 --- a/docs/reference/services/landing-zone/gruntwork-access.md +++ b/docs/reference/services/landing-zone/gruntwork-access.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Gruntwork Access -View Source +View Source Release Notes @@ -179,5 +179,5 @@ The name of the IAM role diff --git a/docs/reference/services/landing-zone/iam-users-and-iam-groups.md b/docs/reference/services/landing-zone/iam-users-and-iam-groups.md index 8b4c48b26..af8b981a9 100644 --- a/docs/reference/services/landing-zone/iam-users-and-iam-groups.md +++ b/docs/reference/services/landing-zone/iam-users-and-iam-groups.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # IAM Users and IAM Groups -View Source +View Source Release Notes @@ -663,5 +663,5 @@ A map of usernames to that user's AWS Web Console password, encrypted with that diff --git a/docs/reference/services/networking/elastic-load-balancer-elb.md b/docs/reference/services/networking/elastic-load-balancer-elb.md index 74d070e9d..2a98344ed 100644 --- a/docs/reference/services/networking/elastic-load-balancer-elb.md +++ b/docs/reference/services/networking/elastic-load-balancer-elb.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Application Load Balancer -View Source +View Source Release Notes @@ -514,5 +514,5 @@ The AWS-managed DNS name assigned to the ALB. diff --git a/docs/reference/services/networking/management-vpc.md b/docs/reference/services/networking/management-vpc.md index a1f1109e5..e2ae9f452 100644 --- a/docs/reference/services/networking/management-vpc.md +++ b/docs/reference/services/networking/management-vpc.md @@ -16,15 +16,17 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Management VPC -View Source +View Source Release Notes +Compliance Docs + ## Overview This service contains code to deploy a [Virtual Private Cloud (VPC)](https://aws.amazon.com/vpc/) on AWS that can be @@ -636,5 +638,5 @@ Indicates whether or not the VPC has finished creating diff --git a/docs/reference/services/networking/route-53-hosted-zones.md b/docs/reference/services/networking/route-53-hosted-zones.md index fb4d19758..5595df4fe 100644 --- a/docs/reference/services/networking/route-53-hosted-zones.md +++ b/docs/reference/services/networking/route-53-hosted-zones.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Route 53 Hosted Zones -View Source +View Source Release Notes @@ -240,5 +240,5 @@ A map of domains to resource arns and hosted zones of the created Service Discov diff --git a/docs/reference/services/networking/sns-topics.md b/docs/reference/services/networking/sns-topics.md index 2132f016b..2dee41309 100644 --- a/docs/reference/services/networking/sns-topics.md +++ b/docs/reference/services/networking/sns-topics.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Amazon Simple Notification Service -View Source +View Source Release Notes @@ -219,5 +219,5 @@ The ARN of the SNS topic. diff --git a/docs/reference/services/networking/virtual-private-cloud-vpc.md b/docs/reference/services/networking/virtual-private-cloud-vpc.md index 4451dc1dc..72aad7b20 100644 --- a/docs/reference/services/networking/virtual-private-cloud-vpc.md +++ b/docs/reference/services/networking/virtual-private-cloud-vpc.md @@ -16,15 +16,17 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # VPC -View Source +View Source Release Notes +Compliance Docs + ## Overview This service contains code to deploy a [Virtual Private Cloud (VPC)](https://aws.amazon.com/vpc) on AWS that can be used @@ -1132,5 +1134,5 @@ Indicates whether or not the VPC has finished creating diff --git a/docs/reference/services/security/bastion.md b/docs/reference/services/security/bastion.md index e4f9dadd3..6371d9794 100644 --- a/docs/reference/services/security/bastion.md +++ b/docs/reference/services/security/bastion.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # Bastion Host -View Source +View Source Release Notes @@ -505,5 +505,5 @@ The fully qualified name of the bastion host. diff --git a/docs/reference/services/security/open-vpn.md b/docs/reference/services/security/open-vpn.md index 0c05b36c7..8f02a340e 100644 --- a/docs/reference/services/security/open-vpn.md +++ b/docs/reference/services/security/open-vpn.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # OpenVPN Server -View Source +View Source Release Notes @@ -801,5 +801,5 @@ The security group ID of the OpenVPN server. diff --git a/docs/reference/services/security/tls-scripts.md b/docs/reference/services/security/tls-scripts.md index 53c397c84..bea530fd3 100644 --- a/docs/reference/services/security/tls-scripts.md +++ b/docs/reference/services/security/tls-scripts.md @@ -16,12 +16,12 @@ import TabItem from '@theme/TabItem'; import VersionBadge from '../../../../src/components/VersionBadge.tsx'; import { HclListItem, HclListItemDescription, HclListItemTypeDetails, HclListItemDefaultValue } from '../../../../src/components/HclListItem.tsx'; - + # TLS Scripts -View Source +View Source Release Notes @@ -100,5 +100,5 @@ If you’ve never used the Service Catalog before, make sure to read diff --git a/package.json b/package.json index f3cdf43de..204cd70ab 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "typescript": "^4.3.5" }, "optionalDependencies": { - "docs-sourcer": "git+ssh://git@github.com/gruntwork-io/docs-sourcer.git#v0.0.18" + "docs-sourcer": "git+ssh://git@github.com/gruntwork-io/docs-sourcer.git#v0.0.19" }, "browserslist": { "production": [ diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index b0980aacc..78ce7de22 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -1,12 +1,10 @@ import React, { useEffect } from "react" import ModalCmp from "react-modal" -import { DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY } from "../theme/Root" import styles from "./Modal.module.css" interface ModalProps { - externalLink: string showModal: boolean - children?: React.ReactNode + children: React.ReactNode shouldCloseOnEsc?: boolean shouldAcceptOnEnter?: boolean shouldCloseOnOverlayClick?: boolean @@ -20,32 +18,21 @@ if (typeof window !== "undefined") { ModalCmp.setAppElement("body") } -export const SubscriptionNoticeModal: React.FC = ({ - externalLink, +export const Modal: React.FC = ({ showModal, shouldCloseOnEsc = true, shouldAcceptOnEnter = false, shouldCloseOnOverlayClick = true, handleCancelRequest, handleAcceptRequest, + children, }) => { const onRequestClose = (e) => { - // If the user checked to never see this notice but subsequently cancels we will disregard their selection. We will - // only stop showing this notice if they check the box and then proceed to GitHub - if (window.localStorage.getItem(DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY)) { - window.localStorage.removeItem(DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY) - } - handleCancelRequest() - // prevent the browser from handling a Cancel button click and scrolling to top e.preventDefault() } - const gitHubRepoName = externalLink.match( - /https:\/\/github.com\/gruntwork-io\/(.*?)\/.*/ - ) - // function to check if there's any active button (focus on the button) to avoid conflicts with shouldAcceptOnEnter property const checkIfAnyActiveButton = () => { const activeElement = document.activeElement @@ -87,15 +74,6 @@ export const SubscriptionNoticeModal: React.FC = ({ } }) - const setDontWarnMe = (event) => { - event.stopPropagation() - if (!window.localStorage.getItem(DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY)) { - window.localStorage.setItem(DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY, "true") - } else { - window.localStorage.removeItem(DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY) - } - } - return ( = ({ className={styles.mainContainer} overlayClassName={styles.overlay} > -

For Subscribers Only

-

- This link leads to the private{" "} - {gitHubRepoName && gitHubRepoName.length >= 1 && ( - {gitHubRepoName[1]} - )}{" "} - repository visible only to subscribers; everyone else will see a 404. -

-
- - -
- + {children}
) } diff --git a/src/components/SubscribersOnlyModal.tsx b/src/components/SubscribersOnlyModal.tsx new file mode 100644 index 000000000..f56ab8cc2 --- /dev/null +++ b/src/components/SubscribersOnlyModal.tsx @@ -0,0 +1,90 @@ +import React from "react" +import { Modal } from "./Modal" +import styles from "./Modal.module.css" + +interface SubscribersOnlyModalProps { + externalLink: string + localStorageKey: string + subscriberType?: string + showModal: boolean + handleCancelRequest: () => void + handleAcceptRequest?: () => void +} + +export const SubscribersOnlyModal: React.FC = ({ + externalLink, + localStorageKey, + subscriberType, + showModal, + handleCancelRequest, + handleAcceptRequest, +}) => { + const onRequestClose = (e) => { + // If the user checked to never see this notice but subsequently cancels we will disregard their selection. We will + // only stop showing this notice if they check the box and then proceed to GitHub + if (window.localStorage.getItem(localStorageKey)) { + window.localStorage.removeItem(localStorageKey) + } + + handleCancelRequest() + + // prevent the browser from handling a Cancel button click and scrolling to top + e.preventDefault() + } + + const gitHubRepoName = externalLink.match( + /https:\/\/github.com\/gruntwork-io\/(.*?)\/.*/ + ) + + const setDontWarnMe = (event) => { + event.stopPropagation() + if (!window.localStorage.getItem(localStorageKey)) { + window.localStorage.setItem(localStorageKey, "true") + } else { + window.localStorage.removeItem(localStorageKey) + } + } + + return ( + +

+ {subscriberType + ? `For ${subscriberType} Subscribers Only` + : "For Subscribers Only"} +

+

+ This link leads to the private{" "} + {gitHubRepoName && gitHubRepoName.length >= 1 && ( + {gitHubRepoName[1]} + )}{" "} + repository visible only to subscribers; everyone else will see a 404. +

+
+ + +
+ +
+ ) +} diff --git a/src/theme/Root.js b/src/theme/Root.js index fee595f21..bae284e82 100644 --- a/src/theme/Root.js +++ b/src/theme/Root.js @@ -1,11 +1,10 @@ import React, { useState, useEffect } from "react" -import { - SubscriptionNoticeModal, - idOfNoticeLink, -} from "/src/components/Modal.tsx" +import { SubscribersOnlyModal } from "/src/components/SubscribersOnlyModal.tsx" const gruntworkGithubOrg = "https://github.com/gruntwork-io/" +const gruntworkCisRepoName = "terraform-aws-cis-service-catalog" + const publicGruntworkRepoNames = [ "bash-commons", "cloud-nuke", @@ -55,50 +54,94 @@ const publicGruntworkRepoNames = [ ] /** - * Checks if a link is referencing a known public repo + * Checks if a link references a known public Gruntwork repo * - * @param string repoLink + * @param string url * @return {boolean} */ -const isPublicGruntworkRepo = (repoLink) => { +const isPublicGruntworkRepo = (url) => { + if (!url) { + return false + } // Match a link prefixed by the gruntworkGithubOrg and capture the next path reference const pattern = new RegExp(`^${gruntworkGithubOrg}(.*?)(\/|$)`) // e.g for a given link https://github.com/gruntwork-io/docs/intro -> `docs` - const repoName = repoLink.match(pattern)[1] + const repoName = url.match(pattern)[1] // returns boolean return publicGruntworkRepoNames.includes(repoName) } +/** + * Checks if a link references a private Gruntwork repo + * + * @param string url + * @return {boolean} + */ +const isPrivateGruntworkRepo = (url) => { + return ( + url && url.startsWith(gruntworkGithubOrg) && !isPublicGruntworkRepo(url) + ) +} + +/** + * Checks if a link references the Gruntwork CIS service catalog repo + * + * @param string url + * @return {boolean} + */ + +const isGruntworkCisRepo = (url) => { + return url && url.startsWith(`${gruntworkGithubOrg}${gruntworkCisRepoName}`) +} + export const DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY = "dontWarnGitHubLinks" +export const DONT_SHOW_CIS_GITHUB_WARNING_KEY = "dontWarnCISLinks" function Root({ children }) { const [displaySubscriberNotice, setDisplaySubscriberNotice] = useState(false) - const [externalLink, setExternalLink] = useState("") + const [subscriberNoticeLink, setSubscriberNoticeLink] = useState("") + + const [displayCisNotice, setDisplayCisNotice] = useState(false) + const [cisNoticeLink, setCisNoticeLink] = useState("") useEffect(() => { const listener = (event) => { - if (event.target.id === idOfNoticeLink) { - setDisplaySubscriberNotice(false) + // Allow clicks on the external GitHub link FROM the modal notices to work normally + if (event.target.dataset.modalExempt) { return } - const dontWarn = window.localStorage.getItem( - DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY - ) - if (dontWarn) { - setDisplaySubscriberNotice(false) + if (isGruntworkCisRepo(event.target.href)) { + const dontWarn = window.localStorage.getItem( + DONT_SHOW_CIS_GITHUB_WARNING_KEY + ) + + if (dontWarn) { + setDisplayCisNotice(false) + return + } + + event.preventDefault() + setCisNoticeLink(event.target.href) + setDisplayCisNotice(true) return } - if ( - event.target.href && - event.target.href.startsWith(gruntworkGithubOrg) && - !isPublicGruntworkRepo(event.target.href) - ) { + if (isPrivateGruntworkRepo(event.target.href)) { + const dontWarn = window.localStorage.getItem( + DONT_SHOW_PRIVATE_GITHUB_WARNING_KEY + ) + + if (dontWarn) { + setDisplaySubscriberNotice(false) + return + } + event.preventDefault() - setExternalLink(event.target.href) + setSubscriberNoticeLink(event.target.href) setDisplaySubscriberNotice(true) + return } } @@ -110,12 +153,29 @@ function Root({ children }) { return ( <> - { setDisplaySubscriberNotice(false) - setExternalLink("") + setSubscriberNoticeLink("") + }} + handleAcceptRequest={() => { + setDisplaySubscriberNotice(false) + }} + /> + { + setDisplayCisNotice(false) + setCisNoticeLink("") + }} + handleAcceptRequest={() => { + setDisplayCisNotice(false) }} /> {children} diff --git a/yarn.lock b/yarn.lock index fa4b6bb1c..7be00b47d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5341,9 +5341,9 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.0.0" -"docs-sourcer@git+ssh://git@github.com/gruntwork-io/docs-sourcer.git#v0.0.18": +"docs-sourcer@git+ssh://git@github.com/gruntwork-io/docs-sourcer.git#v0.0.19": version "0.0.1" - resolved "git+ssh://git@github.com/gruntwork-io/docs-sourcer.git#4f6d8374e89f253760414c0e64d5432ac96a97f3" + resolved "git+ssh://git@github.com/gruntwork-io/docs-sourcer.git#40c1bd2d0422a7346549f53ca13ad5f255f616b5" dependencies: "@octokit/auth-app" "^3.6.1" "@octokit/plugin-retry" "^3.0.9"