localstack/fix-input-bool-type: change localstack test input from str to bool

Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
Guillaume de Rouville 2021-08-31 17:16:04 +02:00
parent fe2845fdfb
commit 6360ccc92b
10 changed files with 71 additions and 71 deletions

View File

@ -21,7 +21,7 @@ Re-usable aws-cli component
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
### aws.#CLI Outputs ### aws.#CLI Outputs
@ -38,7 +38,7 @@ AWS Config shared by all AWS packages
|*region* | `string` |AWS region | |*region* | `string` |AWS region |
|*accessKey* | `dagger.#Secret` |AWS access key | |*accessKey* | `dagger.#Secret` |AWS access key |
|*secretKey* | `dagger.#Secret` |AWS secret key | |*secretKey* | `dagger.#Secret` |AWS secret key |
|*localMode* | `*null \| string` |AWS localstack mode | |*localMode* | `*false \| bool` |AWS localstack mode |
### aws.#Config Outputs ### aws.#Config Outputs

View File

@ -21,7 +21,7 @@ AWS CloudFormation Stack
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*source* | `string` |Source is the Cloudformation template (JSON/YAML string) | |*source* | `string` |Source is the Cloudformation template (JSON/YAML string) |
|*stackName* | `string` |Stackname is the cloudformation stack | |*stackName* | `string` |Stackname is the cloudformation stack |
|*parameters* | `struct` |Stack parameters | |*parameters* | `struct` |Stack parameters |

View File

@ -21,11 +21,11 @@ Convert ECR credentials to Docker Login format
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*ctr.image.config.region* | `string` |AWS region | |*ctr.image.config.region* | `string` |AWS region |
|*ctr.image.config.accessKey* | `dagger.#Secret` |AWS access key | |*ctr.image.config.accessKey* | `dagger.#Secret` |AWS access key |
|*ctr.image.config.secretKey* | `dagger.#Secret` |AWS secret key | |*ctr.image.config.secretKey* | `dagger.#Secret` |AWS secret key |
|*ctr.image.config.localMode* | `*null \| string` |AWS localstack mode | |*ctr.image.config.localMode* | `*false \| bool` |AWS localstack mode |
### ecr.#Credentials Outputs ### ecr.#Credentials Outputs

View File

@ -21,7 +21,7 @@ KubeConfig config outputs a valid kube-auth-config for kubectl client
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*clusterName* | `string` |EKS cluster name | |*clusterName* | `string` |EKS cluster name |
|*version* | `*"v1.19.9" \| string` |Kubectl version | |*version* | `*"v1.19.9" \| string` |Kubectl version |

View File

@ -21,7 +21,7 @@ Returns an unused rule priority (randomized in available range)
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*listenerArn* | `string` |ListenerArn | |*listenerArn* | `string` |ListenerArn |
### elb.#RandomRulePriority Outputs ### elb.#RandomRulePriority Outputs

View File

@ -21,7 +21,7 @@ Creates a new Database on an existing RDS Instance
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*name* | `string` |DB name | |*name* | `string` |DB name |
|*dbArn* | `string` |ARN of the database instance | |*dbArn* | `string` |ARN of the database instance |
|*secretArn* | `string` |ARN of the database secret (for connecting via rds api) | |*secretArn* | `string` |ARN of the database secret (for connecting via rds api) |
@ -44,7 +44,7 @@ Fetches information on an existing RDS Instance
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*dbArn* | `string` |ARN of the database instance | |*dbArn* | `string` |ARN of the database instance |
### rds.#Instance Outputs ### rds.#Instance Outputs
@ -66,7 +66,7 @@ Creates a new user credentials on an existing RDS Instance
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*username* | `string` |Username | |*username* | `string` |Username |
|*password* | `string` |Password | |*password* | `string` |Password |
|*dbArn* | `string` |ARN of the database instance | |*dbArn* | `string` |ARN of the database instance |

View File

@ -21,7 +21,7 @@ S3 Bucket object(s) sync
|*config.region* | `string` |AWS region | |*config.region* | `string` |AWS region |
|*config.accessKey* | `dagger.#Secret` |AWS access key | |*config.accessKey* | `dagger.#Secret` |AWS access key |
|*config.secretKey* | `dagger.#Secret` |AWS secret key | |*config.secretKey* | `dagger.#Secret` |AWS secret key |
|*config.localMode* | `*null \| string` |AWS localstack mode | |*config.localMode* | `*false \| bool` |AWS localstack mode |
|*source* | `dagger.#Artifact` |Source Artifact to upload to S3 | |*source* | `dagger.#Artifact` |Source Artifact to upload to S3 |
|*target* | `string` |Target S3 URL (eg. s3://\<bucket-name\>/\<path\>/\<sub-path\>) | |*target* | `string` |Target S3 URL (eg. s3://\<bucket-name\>/\<path\>/\<sub-path\>) |
|*delete* | `*false \| true` |Delete files that already exist on remote destination | |*delete* | `*false \| true` |Delete files that already exist on remote destination |

View File

@ -5,7 +5,7 @@ inputs:
TestConfig.awsConfig.accessKey: TestConfig.awsConfig.accessKey:
secret: ENC[AES256_GCM,data:t/iOlA==,iv:oLhubqSKZqn5lVPFn8On//LPj1deAFPXKVTyBKdVODQ=,tag:PORmrxDIf/MHbFDrdxnlTQ==,type:str] secret: ENC[AES256_GCM,data:t/iOlA==,iv:oLhubqSKZqn5lVPFn8On//LPj1deAFPXKVTyBKdVODQ=,tag:PORmrxDIf/MHbFDrdxnlTQ==,type:str]
TestConfig.awsConfig.localMode: TestConfig.awsConfig.localMode:
text: "true" bool: "true"
TestConfig.awsConfig.secretKey: TestConfig.awsConfig.secretKey:
secret: ENC[AES256_GCM,data:2HYF9w==,iv:f/a9dy4HLJOtKdn8G+zKTboXU1YhzXBEKT1WSvrsCvk=,tag:RKQO+Pg3wg23LIMAnyXhMA==,type:str] secret: ENC[AES256_GCM,data:2HYF9w==,iv:f/a9dy4HLJOtKdn8G+zKTboXU1YhzXBEKT1WSvrsCvk=,tag:RKQO+Pg3wg23LIMAnyXhMA==,type:str]
sops: sops:
@ -23,8 +23,8 @@ sops:
aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y
Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw== Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2021-08-16T20:52:50Z" lastmodified: "2021-08-31T15:04:51Z"
mac: ENC[AES256_GCM,data:31GBJoqzJOt2q29ql9xTGvhg6XaMupZliAEx2XXD19CvJuAlPdkkbdOP1quEDjHqeBfWUZlTTnqqm2HdSjJ9MgS7aSpgIwb65g/KMez/13QKqlicKaOT55uuyPmWh9+p0rSBCWTHo1vcZldXEuQ9eohwgkV1xHGU3tV+IsmlfrM=,iv:ISdTPiT3rUpZrmMoMBDYmQEB5Q6Tg5fx8leAS3B2kBU=,tag:z/4/2MS6CSlEC++9kCKn5Q==,type:str] mac: ENC[AES256_GCM,data:o/B2ZTd1ldSVkIbluXnHJ5clZ0oYVYVvmltxLw9k7OyFl9WBVBOslwrxYyrvgkKpLQIpFArh3VtMbizoTrzFWzoXMqdkLYza0IhaZekRn50NyaqOks/qAUJh0Cas6qA87nOyVw3J9Ldc1HR0lgjFLpIsPZYgVGs5BgQZ5Pg/X40=,iv:w6XNLkF2h/6JjCLFioyWImvRHiN6ILDimrxcboMRh94=,tag:k3BbcVeI9qj0NoEdQiLstg==,type:str]
pgp: [] pgp: []
encrypted_suffix: secret encrypted_suffix: secret
version: 3.7.1 version: 3.7.1

View File

@ -5,7 +5,7 @@ inputs:
TestConfig.awsConfig.accessKey: TestConfig.awsConfig.accessKey:
secret: ENC[AES256_GCM,data:RJY8Cw==,iv:yZW4m74SdRl5qeDfyQVJPOvAktu2qt8jJB45hWUd5p8=,tag:7DCf5ys4Cblb1V1XHMCWAQ==,type:str] secret: ENC[AES256_GCM,data:RJY8Cw==,iv:yZW4m74SdRl5qeDfyQVJPOvAktu2qt8jJB45hWUd5p8=,tag:7DCf5ys4Cblb1V1XHMCWAQ==,type:str]
TestConfig.awsConfig.localMode: TestConfig.awsConfig.localMode:
text: "true" bool: "true"
TestConfig.awsConfig.secretKey: TestConfig.awsConfig.secretKey:
secret: ENC[AES256_GCM,data:iYxBnA==,iv:7mdUXVnmMJm2pz9Kt1MwrwFeAxwqZaH9o1D2FbUD860=,tag:fj8+JJbNS3Z/L2ft+BtJ1Q==,type:str] secret: ENC[AES256_GCM,data:iYxBnA==,iv:7mdUXVnmMJm2pz9Kt1MwrwFeAxwqZaH9o1D2FbUD860=,tag:fj8+JJbNS3Z/L2ft+BtJ1Q==,type:str]
TestDirectory: TestDirectory:
@ -26,8 +26,8 @@ sops:
aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y
Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw== Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2021-08-16T20:43:09Z" lastmodified: "2021-08-31T15:06:01Z"
mac: ENC[AES256_GCM,data:suv1ImWFc+7HyrpNw66vasTf75PLu07DivxKCyuqcLFqBBs9qgxg8VFXax1hiZRp7NLTG1cqJ3JLW8DsPzhFTs2xJEDQ8BBKfqNFGgHzucaAISlfKzKKQtPb4NM+56WEmuiF7ns0jKyJH385A1qttD8pVeyLnj4ps+9iU/iA5wo=,iv:LT5XzerWt6ctuPYd/Pm7sdSQni30G5tBNQni+Nfmd3s=,tag:OO+/JhjwcZbnFCIFvOM17g==,type:str] mac: ENC[AES256_GCM,data:XrEbjWRGEn/XZMy7PntxLQETx8mpEabgR7GQlYbyCEgHPZNHe9RKEoMs+T/MyVpq/Kv+juC4iirj1TnVtTtUbgIB02nrSiSj4GVnUJ7+k/sEDa2QWPa+bp8B2nN35nAzT0BORw5Y+LK3BQSMa2qJpnIoDaLswBYNDcjFnYA38QQ=,iv:2uCU/prx0kdiUg7gijr38/JGYtlMLySyxP5preagmiY=,tag:70LPxKrdtKURzlaISlqPjw==,type:str]
pgp: [] pgp: []
encrypted_suffix: secret encrypted_suffix: secret
version: 3.7.1 version: 3.7.1

View File

@ -16,7 +16,7 @@ import (
// AWS secret key // AWS secret key
secretKey: dagger.#Input & {dagger.#Secret} secretKey: dagger.#Input & {dagger.#Secret}
// AWS localstack mode // AWS localstack mode
localMode: dagger.#Input & {string | *null} localMode: dagger.#Input & {*false | bool}
} }
// Re-usable aws-cli component // Re-usable aws-cli component
@ -32,7 +32,7 @@ import (
"package": jq: "=~1.6" "package": jq: "=~1.6"
"package": curl: true "package": curl: true
"package": "aws-cli": "=~1.18" "package": "aws-cli": "=~1.18"
if config.localMode != null { if config.localMode != false {
package: "py3-pip": true package: "py3-pip": true
} }
} }
@ -45,7 +45,7 @@ import (
"-eo", "-eo",
"pipefail", "pipefail",
"-c", "-c",
if config.localMode == null { if config.localMode == false {
#""" #"""
aws configure set aws_access_key_id "$(cat /run/secrets/access_key)" aws configure set aws_access_key_id "$(cat /run/secrets/access_key)"
aws configure set aws_secret_access_key "$(cat /run/secrets/secret_key)" aws configure set aws_secret_access_key "$(cat /run/secrets/secret_key)"
@ -55,7 +55,7 @@ import (
aws configure set default.output "json" aws configure set default.output "json"
"""# """#
}, },
if config.localMode != null { if config.localMode != false {
#""" #"""
# Download awscli v3 and override aws # Download awscli v3 and override aws
pip install awscli-local[v2] pip install awscli-local[v2]