This file contains 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
$ mount --bind /root/sql-dependencies /root/sql-dependencies-v1 |
This file contains 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
# create mount namespace "some-sql" | |
$ unshare --mount some-sql start | |
# mount the host folder to "some-sql" namespace | |
# similar to docker command --volume | |
$ mount --bind /var/lib/mysql /my/own/datadir |
This file contains 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
$ terraform plan | |
... | |
Cost estimation: | |
Resources: 1 of 3 estimated | |
$9.4303999999999992/mo +$0.0 |
This file contains 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
deny_network_acl_rule_0_0_0_0_0 { | |
denied_actions = ["aws_network_acl_rule.create"] | |
# This rule is triggered if any AWS network ACL rule allows IP range 0.0.0.0/0 | |
rule = any tfplan.resource_changes as _, rc { | |
rc.type is "aws_network_acl_rule" and | |
rc.change.after.addresses is ["0.0.0.0/0"] | |
} | |
} |
This file contains 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
$ terraform plan | |
... | |
# aws_instance.web will be updated in-place | |
~ resource "aws_instance" "web" { | |
id = "i-07caf923df8e31740" | |
~ tags = { | |
~ "Name" = "what-is-this" -> "The first ec2" | |
} | |
} | |
Plan: 0 to add, 1 to change, 0 to destroy. |
This file contains 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
$ aws ec2 create-tags --resources i-07caf923df8e31740 --tags Key=Name,Value=what-is-this | |
This file contains 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
{ | |
"resources": [ | |
{ | |
"instances": [ | |
{ | |
"attributes": { | |
"arn": ".../i-07caf923df8e31740", | |
... | |
This file contains 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
$ curl --request POST api-example.aws.com/ec2/new | |
{ "ec2_id": "i-07caf923df8e31740", ... } |
This file contains 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
$ terraform apply |
This file contains 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
# here some code | |
resource "aws_instance" "web" { | |
instance_type = "t3.micro" | |
... | |
} |