Skip to content

Commit

Permalink
labs 16 ok
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinfoko committed Apr 1, 2024
1 parent a92b58a commit 2a5f846
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
31 changes: 31 additions & 0 deletions labs-16/ec2.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}

provider "aws" {
region = "us-east-1"
}

terraform {
cloud {
organization = "eazytraining-organisation"

workspaces {
name = "eazytraining-workspace"
}
}
}

resource "aws_instance" "myec2" {
ami = "ami-0c7217cdde317cfec" #
instance_type = "t3.micro"
key_name = "terraformcloud"
tags = {
Name = "ec2-franklin"
}
}
13 changes: 13 additions & 0 deletions labs-16/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
code de la sentinelle

```
import "tfplan"
main = rule {
all tfplan.resources.aws_instance as _, instances {
all instances as _, r {
(length(r.applied.tags) else 0) > 0
}
}
}
```

0 comments on commit 2a5f846

Please sign in to comment.