podhmo / metashape

0 stars 1 forks source link

support unfixed reference (dynamic reference) #98

Open podhmo opened 3 years ago

podhmo commented 3 years ago

e.g. like terraform, the reference not bound data but generated output is reference correctly.

resource A use B with B.x_id
podhmo commented 3 years ago
resource "aws_instance" "iac_in_action" {
  ami               = var.ami_id
  instance_type     = var.instance_type
  availability_zone = var.availability_zone

  // dynamically retrieve SSH Key Name
  key_name = aws_key_pair.iac_in_action.key_name

  // dynamically set Security Group ID (firewall)
  vpc_security_group_ids = [aws_security_group.iac_in_action.id]

  tags = {
    Name = "Terraform-managed EC2 Instance for IaC in Action"
  }
}

detail

podhmo commented 3 years ago
podhmo commented 3 years ago

or aws cdk

https://github.com/aws-samples/aws-cdk-examples/tree/master/python/api-sqs-lambda

podhmo commented 3 years ago

https://github.com/hashicorp/terraform-cdk/tree/master/examples/python/aws