-
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.
- Loading branch information
1 parent
63f70e8
commit 4c6b480
Showing
4 changed files
with
51 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
variable "name" { | ||
type = string | ||
} | ||
|
||
resource "aws_s3_bucket" "cdevautotests" { | ||
bucket = var.name | ||
tags = { | ||
Name = "Cdev auto tests bucket" | ||
} | ||
} | ||
|
||
output "id" { | ||
value = aws_s3_bucket.cdevautotests.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
variable "bucket_name" { | ||
type = string | ||
} | ||
|
||
resource "aws_s3_bucket_object" "cdev_object" { | ||
key = "s3file.txt" | ||
bucket = var.bucket_name | ||
source = "${path.module}/s3file.txt" | ||
|
||
force_destroy = 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 @@ | ||
File will be uploaded to s3 bucket. |
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 @@ | ||
name: cdev-tests | ||
kind: InfraTemplate | ||
modules: | ||
- | ||
name: create-bucket | ||
type: terraform | ||
source: github.com/shalb/cdev-test-template//s3-bucket/ | ||
pre_hook: | ||
command: echo "check cdev hook" | ||
on_destroy: true | ||
on_plan: true | ||
inputs: | ||
name: {{ .name }} | ||
- | ||
name: create-s3-object | ||
type: terraform | ||
source: ./s3-file/ | ||
inputs: | ||
bucket_name: {{ remoteState "this.create-bucket.id" }} | ||
- | ||
name: print_outputs | ||
type: printer | ||
depends_on: this.create-s3-object | ||
inputs: | ||
bucket_name: Bucket name is {{ remoteState "this.create-bucket.id" }} |