Open dacbd opened 2 years ago
@dacbd I would like to have built it on top but they are based on different concepts... in any case task
like runner
has its own hardware definition
I might be wrong but looks like right now the only "hardware" definition consists of the instance type, disk, and base image.
I foresee something like this as a future possibility:
terraform {
required_providers {
iterative = {
source = "iterative/iterative"
}
}
}
provider "iterative" {}
resource "iterative_machine" "instance_test" {
cloud = "aws"
region = "us-west-2"
aws_subnet_id = "subnet-qwert2345"
aws_security_group = "test"
instance_type = "t1.micro"
instance_permission_set = "some_S3_role"
ssh_private = ***
}
resource "iterative_task" "task" {
name = "test"
machine = iterative_machine.instance_test.id
script = file("script.sh")
workdir {
input = "."
output = "./output"
object_storage = "arn:::mys3/bucket"
}
}
Oh yeah! we have already discussed that. Indeed the idea was to be able to use resources within resources.
I pretended that also with network
and storage
resources
https://github.com/iterative/terraform-provider-iterative/issues/89
related: #461
I was snooping at: https://github.com/iterative/terraform-provider-iterative/pull/340
and I wonder if there are any plans to have the task's
"machine"
definition accept aniterative_machine
definition/resource?