-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rm-forecast-generic
- Loading branch information
Showing
12 changed files
with
83 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8RIkirOd6pkHU6U0+8csUIoBGNuxSj5In63 | |
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFrgNxs10xZEpzKSOAcG1cI6pQBhTlCcj41dB2jXLa3w [email protected]" >> /home/ec2-user/.ssh/authorized_keys | ||
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOmGsEaesnmsM/np9W7G8vHuxIZBjum/NO3Zk0MT+soO [email protected]" >> /home/ec2-user/.ssh/authorized_keys | ||
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC0xop1hz1UsyqUUIf9416nGc2GCqm/exfnBGHDd+x8IOXJoGHc5fCM+pKpBaWjLFvOrXB/hx1qZTYFPCdygyzH7KPRIj22VBqgA26DIxd8/0aw4ookNCwOtWFJtm8AVibEffiMAl67zjMsUUZ0pGOM7w9/Zp2ZDr3TjBXKgDOkwLSu0y+66AagYl1dI7TFEAIKrAJQ6ZupYaTBAYxbekB97nYtrc1pUCR+707tm4U+eVjjni0MaQxiD83g35Ij1sOH+avijXTQQGSPJAMxnzEyUArdscg5Pc+qBQ/n5g9o9Sc2k8hwrxPDl4nzfHh9dUtqH7lMTTnjVc6SPdA6wPFY/rXJKk+9xPvphNo4wKZVdMCeVhHwx/9XN7JxKHSI4AQDCRUJ6WhoJFMaMdOziqnxc92sqHiUr1dwgFmKHsUmKm2pwU1JVmQCC+z0WjSbP5EVap8Vxu33t1XbpMowlLWe+Q1wxPR8n77bOqNMNY00bTKu0ki5eDgzHyvXfIQmFJk= preci@VINAYA" >> /home/ec2-user/.ssh/authorized_keys | ||
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILYW49tR+g0gTMYhy4RHoY1SC94TSolqqjMnscaqDn3$ [email protected]" >> /home/ec2-user/.ssh/authorized_keys | ||
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBPanFrUOmPJOK4ZMh5UQusuDRoCoDwDu1TjywNnOqCD" >> /home/ec2-user/.ssh/authorized_keys |
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
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
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 @@ | ||
# Public S3 bucket | ||
|
||
# Bucket itself | ||
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket | ||
resource "aws_s3_bucket" "bucket" { | ||
bucket = "ocf-open-data-pvnet" | ||
|
||
tags = { | ||
Name = "Open_Data_PVNet" | ||
} | ||
} |
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,39 @@ | ||
# Make IAM policy to write to the s3-public bucket | ||
|
||
data "aws_iam_policy_document" "open_data_pvnet_write_policy_description" { | ||
version = "2012-10-17" | ||
statement { | ||
actions = [ | ||
"s3:ListBucket", | ||
"s3:GetObject", | ||
"s3:PutObject", | ||
"s3:DeleteObject" | ||
] | ||
resources = [aws_s3_bucket.bucket.arn, "${aws_s3_bucket.bucket.arn}/*"] | ||
effect = "Allow" | ||
} | ||
} | ||
|
||
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy | ||
resource "aws_iam_policy" "open_data_pvnet_write_policy" { | ||
name = "s3-open_data_pvnet_write_policy" | ||
description = "Policy to write to bucket: ${aws_s3_bucket.bucket.bucket}" | ||
|
||
# Terraform's "jsonencode" function converts a | ||
# Terraform expression result to valid JSON syntax. | ||
policy = data.aws_iam_policy_document.open_data_pvnet_write_policy_description.json | ||
|
||
} | ||
|
||
|
||
# resource group | ||
resource "aws_iam_group" "open_data_pvnet_write_group" { | ||
name = "open_data_pvnet_write_group" | ||
} | ||
|
||
# attach policy to group | ||
resource "aws_iam_policy_attachment" "open_data_pvnet_write_policy_attachment" { | ||
name = "s3-write-attachment" | ||
policy_arn = aws_iam_policy.open_data_pvnet_write_policy.arn | ||
groups = [aws_iam_group.open_data_pvnet_write_group.name] | ||
} |
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