Skip to content

Instantly share code, notes, and snippets.

@iamjohnnym
Created February 21, 2020 21:13
Show Gist options
  • Save iamjohnnym/3eff7bbffaefebd94c32a58ef8ed4a1b to your computer and use it in GitHub Desktop.
Save iamjohnnym/3eff7bbffaefebd94c32a58ef8ed4a1b to your computer and use it in GitHub Desktop.
import pulumi
import pulumi_aws
from localstack_endpoints import localstack_endpoints as endpoints
aws = pulumi_aws.Provider(
'localstack',
skip_credentials_validation=True,
skip_metadata_api_check=True,
s3_force_path_style=True,
access_key="mockAccessKey",
secret_key="mockSecretKey",
region='us-east-1',
endpoints=[{
'apigateway': endpoints['APIGateway'],
'cloudformation': endpoints['CloudFormation'],
'cloudwatch': endpoints['CloudWatch'],
'cloudwatchlogs': endpoints['CloudWatchLogs'],
'dynamodb': endpoints['DynamoDB'],
'es': endpoints['ES'],
'firehose': endpoints['Firehose'],
'iam': endpoints['IAM'],
'kinesis': endpoints['Kinesis'],
'kms': endpoints['KMS'],
'route53': endpoints['Route53'],
'redshift': endpoints['Redshift'],
's3': endpoints['S3'],
'ses': endpoints['SES'],
'sns': endpoints['SNS'],
'sqs': endpoints['SQS'],
'ssm': endpoints['SSM'],
'sts': endpoints['STS'],
}],
)
from pulumi_aws import s3
# Create an AWS resource (S3 Bucket)
bucket = s3.Bucket('my-bucket')
# Export the name of the bucket
pulumi.export('bucket_name', bucket.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment