sudo su #4
This file contains hidden or 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
| name: change infra | |
| on: | |
| push: | |
| branches: ["master"] | |
| paths: | |
| - .github/workflows/ci.yml | |
| # - main.go | |
| jobs: | |
| infra-change: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pulumi/actions@v6 | |
| - name: change | |
| run: | | |
| sudo su | |
| apt update | |
| apt install unzip | |
| curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
| unzip awscliv2.zip | |
| ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update | |
| printf '%s\n' "arn:aws:iam::aws:policy/AmazonS3FullAccess" "arn:aws:iam::aws:policy/AmazonECS_FullAccess" "arn:aws:iam::aws:policy/ElasticLoadBalancingFullAccess" "arn:aws:iam::aws:policy/CloudWatchEventsFullAccess" "arn:aws:iam::aws:policy/AmazonEC2FullAccess" "arn:aws:iam::aws:policy/AmazonVPCFullAccess" "arn:aws:iam::aws:policy/SecretsManagerReadWrite" "arn:aws:iam::aws:policy/AmazonElasticFileSystemFullAccess" "arn:aws:iam::aws:policy/AmazonRDSFullAccess" | xargs -I {} aws iam attach-group-policy --group-name pulumi --policy-arn {} | |
| pulumi stack select aws-go-dev | |
| pulumi refresh --yes | |
| pulumi state upgrade | |
| pulumi up --yes | |
| # - pulumi destroy --yes # comment the line of code above and uncomment this line to destroy the aws resources |