📚 Cheatsheet

Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.

Snippets 8

Retour
IaC - Apply Terraform
Facile
terraform apply -auto-approve
IaC - Configuration Pulumi de base (TypeScript)
Intermédiaire
import * as aws from "@pulumi/aws";

const bucket = new aws.s3.Bucket("my-bucket");

export const bucketName = bucket.id;
IaC - Déployer une application sur AWS S3
Facile
aws s3 sync ./build s3://mon-bucket
IaC - Invalider le cache CloudFront
Intermédiaire
aws cloudfront create-invalidation --distribution-id YOUR_ID --paths "/*"
IaC - Lancer un playbook Ansible
Facile
ansible-playbook -i hosts playbook.yml
IaC - Plan Terraform
Facile
terraform plan
IaC - Playbook Ansible simple
Facile
- name: Installer Nginx
  hosts: webservers
  become: yes
  tasks:
    - name: Installer le paquet nginx
      ansible.builtin.apt:
        name: nginx
        state: latest
IaC - Ressource S3 avec Terraform
Facile
resource "aws_s3_bucket" "b" {
  bucket = "my-tf-test-bucket"
  acl    = "private"

  tags = {
    Name        = "My bucket"
    Environment = "Dev"
  }
}