- Save latest
terraform-docspre-built binary into$PATHfrom terraform-docs GitHub Releases.terraform-docs --version # terraform-docs version v0.21.0 ... - Configure
.terraform-docs.ymlto updateREADME.mdappropriately. Usually this file would be saved in the root of the repo. If you have amodulesdirectory containing many modules with READMEs to update, you can add therecursiveargument. See.terraform-docs.ymloptions docs.
Install into user's home directory using PowerShell without Windows adminstrator requirement:
# Install from PowerShell without needing administrator permissions:
# https://github.com/aws/aws-cli/issues/4633#issuecomment-1049955325
msiexec /a https://awscli.amazonaws.com/AWSCLIV2.msi /qb TARGETDIR=$env:USERPROFILE\awscli
# show version after install:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| terraform { | |
| required_providers { | |
| external = { | |
| source = "hashicorp/external" | |
| version = "~> 2.3.3" | |
| } | |
| } | |
| } | |
| locals { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "AllowCreateKeyWithTagInRequest", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "kms:CreateKey" | |
| ], | |
| "Resource": "*", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Write content for an AWS config file (~/.aws/config) to stdout based on available SSO accounts and roles | |
| # from the previously executed `aws sso login`. | |
| # | |
| # Example usage: | |
| # | |
| # aws sso login --profile my-existing-sso-profile | |
| # python ./aws_config_generator.py | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = John Doe | |
| email = john.doe@example.com | |
| username = jdoe01 | |
| [alias] | |
| co = checkout | |
| br = branch | |
| st = status | |
| # Show cloned repo local path. `cd $(git root)` is useful from inside large projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Example usage from shell: | |
| # | |
| # AWS_PROFILE=organization-management-account AGGREGATOR_NAME=my-config-aggregator python ~/tmp/config_aggreg_adv_query.py | |
| # | |
| import os | |
| import json | |
| import boto3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://docs.aws.amazon.com/config/latest/developerguide/querying-AWS-resources.html | |
| # Select EC2 instances from all accounts and regions with tag key "updateAutomationEnabled" is set to value "true" | |
| aws configservice select-aggregate-resource-config \ | |
| --configuration-aggregator-name org-config-aggregator \ | |
| --expression "SELECT resourceId, resourceType, tags | |
| WHERE resourceType = 'AWS::EC2::Instance' | |
| AND tags.tag = 'updateAutomationEnabled=true'" |
These Dockerfile examples demonstrate two options for running a script at container startup, then running the main container process. The example script downloads index.html from https://example.com/ and writes it into Tomcat webapps directory. The index.html is then served by the container at http://localhost:8080/default-app/.
docker build . -t tomcat-with-startup
docker run --rm -it -p 8080:8080 tomcat-with-startupexec is the preferred option because the startup.sh shell script will be replaced by catalina.sh as the main container process. As the main process of the container, it can respond to signals sent to the container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prerequisites: | |
| # - ECS Fargate cluster | |
| # - ECS task IAM role: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html | |
| # Be sure to include ECS exec permissions: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html#ecs-exec-required-iam-permissions | |
| # - (optional) ECS task execution IAM role: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html | |
| aws ecs list-task-definitions | |
| # Register a task definition for alpine image running "sleep 600" so you can exec into the container for 10 min |
NewerOlder