-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: working pulumi test case * test: print directory * test: print directory * test: print directory * feat: add logging to pulumi and output directory artifact for all test steps * fix: unique output per test step script name * fix: clean branch name for output artifact * fix: script name passing in workflow * fix: more output changes * fix: output path * feat: create stack if not exists, let's try it out * fix: reduce verbosity
- Loading branch information
Showing
12 changed files
with
163 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Remote Attach", | ||
"type": "debugpy", | ||
"request": "attach", | ||
"connect": { | ||
"host": "localhost", | ||
"port": 5678 | ||
}, | ||
"preLaunchTask": "Run pulumi up and wait to start", | ||
"pathMappings": [ | ||
{ | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "." | ||
} | ||
], | ||
"justMyCode": true | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "pulumi up", | ||
"type": "shell", | ||
"isBackground": true, | ||
"command": "./tests/pulumi_bucket.js", | ||
"presentation": { | ||
"reveal": "silent" | ||
}, | ||
// This task is run before some debug tasks. | ||
// Problem is, it's a watch script, and since it never exits, VSCode | ||
// complains. All this is needed so VSCode just lets it run. | ||
"problemMatcher": [ | ||
{ | ||
"pattern": [ | ||
{ | ||
"regexp": ".", | ||
"file": 1, | ||
"location": 2, | ||
"message": 3 | ||
} | ||
], | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": ".", | ||
"endsPattern": ".", | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"label": "Wait 35 seconds", | ||
"type": "shell", | ||
"command": "sleep 35", | ||
"presentation": { | ||
"reveal": "silent" | ||
} | ||
}, | ||
{ | ||
"label": "Run pulumi up and wait to start", | ||
"dependsOn": [ | ||
"pulumi up", | ||
"Wait 35 seconds" | ||
] | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
version: '3.8' | ||
services: | ||
localstack: | ||
image: localstack/localstack | ||
image: localstack/localstack:3.0 | ||
ports: | ||
- "4566:4566" | ||
env_file: | ||
- .env | ||
environment: | ||
- SERVICES=cloudformation,s3,ec2 | ||
DEBUG: 1 | ||
LS_LOG: trace | ||
SERVICES: cloudformation,s3,ec2 | ||
DOCKER_HOST: unix:///var/run/docker.sock | ||
volumes: | ||
- ./localstack/bootstrap:/opt/bootstrap/ | ||
- ./localstack/data:/tmp/localstack | ||
- localstack:/var/lib/localstack | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ./localstack/init:/etc/localstack/init | ||
volumes: | ||
localstack: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,42 @@ | ||
import pulumi | ||
import pulumi_aws as aws | ||
import os | ||
# import debugpy | ||
|
||
# # Load environment variables | ||
# config = pulumi.Config() | ||
# for a in os.environ: | ||
# print('Var: ', a, 'Value: ', os.getenv(a)) | ||
|
||
# debugpy.listen(("0.0.0.0", 5678)) | ||
# print("debugpy is listening, attach by pressing F5 or ►") | ||
|
||
# debugpy.wait_for_client() | ||
# print("Attached to debugpy!") | ||
|
||
# Load environment variables | ||
config = pulumi.Config() | ||
# aws_region = config.require('aws_region') | ||
# aws_endpoint = config.require('aws_endpoint') | ||
|
||
# # Configure AWS provider to use LocalStack | ||
# aws_provider = aws.Provider('localstack', region=aws_region, | ||
# endpoint=aws_endpoint, access_key='test', | ||
# secret_key='test') | ||
|
||
# Configure AWS provider to use LocalStack | ||
aws_provider = aws.Provider('localstack') | ||
# aws_provider = aws.Provider( | ||
# 'localstack', | ||
# region=os.getenv('AWS_REGION'), | ||
# # endpoint=os.getenv('AWS_ENDPOINT'), | ||
# access_key=os.getenv('AWS_ACCESS_KEY_ID'), | ||
# secret_key=os.getenv('AWS_SECRET_ACCESS_KEY'), | ||
# ) | ||
|
||
# aws_provider = aws.Provider('localstack') | ||
|
||
# opts = pulumi.ResourceOptions(provider=aws_provider) | ||
|
||
# def dump(obj): | ||
# for attr in dir(obj): | ||
# print("obj.%s = %r" % (attr, getattr(obj, attr))) | ||
# dump(opts) | ||
|
||
# Create an S3 bucket | ||
bucket = aws.s3.Bucket('my-pulumi-bucket', opts=pulumi.ResourceOptions(provider=aws_provider)) | ||
bucket = aws.s3.Bucket('my-pulumi-bucket') | ||
|
||
# Export the bucket name | ||
pulumi.export('bucket_name', bucket.id) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pulumi | ||
pulumi_aws | ||
pulumi-local | ||
debugpy |
This file contains 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