<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Emre Senturk on Medium]]></title>
        <description><![CDATA[Stories by Emre Senturk on Medium]]></description>
        <link>https://medium.com/@emrsenturk?source=rss-c91bda3eb30b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*A_uwU25ypcLSRL9FXeZprg.jpeg</url>
            <title>Stories by Emre Senturk on Medium</title>
            <link>https://medium.com/@emrsenturk?source=rss-c91bda3eb30b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:22:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@emrsenturk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Managing Configurations in AWS with AWS Systems Manager and AWS OpsWorks]]></title>
            <link>https://aws.plainenglish.io/managing-configurations-in-aws-with-aws-systems-manager-and-aws-opsworks-7e100d5547d2?source=rss-c91bda3eb30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e100d5547d2</guid>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[building]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[opsworks]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Emre Senturk]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 13:09:05 GMT</pubDate>
            <atom:updated>2023-04-12T00:51:31.130Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*AiM6rC1voMr7Jmql0EboHw.png" /></figure><p>Managing configurations in AWS can be a complex task, especially when you are managing a large number of instances or resources. AWS provides several services to help you manage your configurations, such as AWS Systems Manager and AWS OpsWorks. In this blog post, we will explore how to use these services to manage configurations in AWS.</p><h3>AWS Systems Manager</h3><p>AWS Systems Manager is a management service that helps you automate and manage your AWS resources. With Systems Manager, you can manage your instances, VMs, and on-premises servers, as well as your AWS resources, such as Amazon EC2 instances, Amazon RDS instances, and Amazon S3 buckets.</p><p>One of the key features of AWS Systems Manager is the ability to manage configurations across your resources. With Systems Manager, you can create and apply policies to manage configurations across multiple instances, rather than having to manage each instance individually. This makes it easier to maintain consistency across your resources and ensure that they are all configured in the same way.</p><p>To manage configurations with AWS Systems Manager, you can use the following features:</p><h3>1. Parameter Store</h3><p>Parameter Store is a centralized location to store and manage your configuration data, such as database connection strings, passwords, and API keys. With Parameter Store, you can store your configuration data as plain text or encrypted values, and you can access them programmatically using AWS SDKs or the AWS CLI.</p><h3>2. Run Command</h3><p>Run Command is a feature of AWS Systems Manager that allows you to remotely execute scripts or commands on multiple instances at once. With Run Command, you can automate common administrative tasks, such as software updates, patching, and configuration changes.</p><h3>3. State Manager</h3><p>State Manager is a feature of AWS Systems Manager that allows you to define and enforce system configurations across your instances. With State Manager, you can create and apply policies that specify the desired state of your instances, such as the installed software, configuration files, and registry settings.</p><h3>AWS OpsWorks</h3><p>AWS OpsWorks is a configuration management service that provides managed instances of Chef and Puppet. With OpsWorks, you can automate the configuration of your instances and applications, from the provisioning of the infrastructure to the deployment of the code.</p><p>OpsWorks provides several features to help you manage configurations, such as:</p><h3>1. Recipes</h3><p>Recipes are Chef or Puppet scripts that define the configuration of your instances. With recipes, you can specify the packages, files, and services that should be installed and configured on your instances.</p><h3>2. Stacks</h3><p>Stacks are a collection of resources that define a single application or service. With stacks, you can define the infrastructure and configuration of your application, including the instances, load balancers, and databases.</p><h3>3. Custom Layers</h3><p>Custom layers are a way to add additional components and configuration to your instances. With custom layers, you can define the software components that should be installed on your instances, such as web servers, databases, and caching servers.</p><h3>Conclusion</h3><p>Managing configurations in AWS can be a challenging task, especially when you are dealing with a large number of instances and resources. AWS provides several services to help you manage your configurations, such as AWS Systems Manager and AWS OpsWorks.</p><p>With AWS Systems Manager, you can centrally manage your configurations and apply policies to ensure consistency across your resources. With AWS OpsWorks, you can automate the configuration of your instances and applications, from the provisioning of the infrastructure to the deployment of the code.</p><p>By using these services, you can simplify your configuration management and ensure that your resources are configured correctly and consistently.</p><p>See you in my next blog, happy deploy days!</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Interested in scaling your software startup</em></strong><em>? Check out </em><a href="https://circuit.ooo/?utm=publication-post-cta"><strong><em>Circuit</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e100d5547d2" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/managing-configurations-in-aws-with-aws-systems-manager-and-aws-opsworks-7e100d5547d2">Managing Configurations in AWS with AWS Systems Manager and AWS OpsWorks</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing your DevOps pipeline with AWS Identity and Access Management (IAM)]]></title>
            <link>https://medium.com/@emrsenturk/securing-your-devops-pipeline-with-aws-identity-and-access-management-iam-2abbbca889e9?source=rss-c91bda3eb30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2abbbca889e9</guid>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Emre Senturk]]></dc:creator>
            <pubDate>Tue, 28 Feb 2023 17:09:59 GMT</pubDate>
            <atom:updated>2023-02-28T17:12:31.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Jgvkdm-gniHQiRT8JcJtzA.png" /></figure><p>DevOps has become an essential part of software development, allowing teams to deliver high-quality software at a faster rate. However, the speed at which DevOps operates can also introduce security risks if not properly secured. This is why it is crucial to secure your DevOps pipeline using <strong>AWS Identity and Access Management (IAM)</strong>.</p><p>IAM is a web service that helps you securely control access to AWS resources. IAM enables you to manage users and their permissions, as well as access to resources in your AWS account. With IAM, you can create and manage AWS users and groups, and use permissions to allow and deny their access to AWS resources.</p><p>In this blog post, we will discuss some best practices for securing your DevOps pipeline in AWS using IAM.</p><h4><strong>1. Use the principle of least privilege</strong></h4><p>The principle of least privilege is a security best practice that restricts access to only the necessary resources for a user or group to perform their job function. In other words, users or groups should only have the minimum permissions required to perform their job.</p><p>Using IAM, you can create policies that define which actions can be performed on which resources. You can attach policies to users or groups, allowing them to access only the resources they need. This helps minimize the risk of a user or group accidentally or intentionally misusing or modifying resources they should not have access to.</p><h4>2. Implement multi-factor authentication (MFA)</h4><p>MFA is an additional layer of security that requires users to provide two or more authentication factors to access AWS resources. With MFA enabled, users are required to provide something they know (password) and something they have (security token or mobile device).</p><p>IAM provides MFA support for AWS accounts, allowing users to use MFA to access the AWS Management Console, AWS Command Line Interface (CLI), and AWS APIs. Enabling MFA helps prevent unauthorized access to AWS resources, even if a user’s password has been compromised.</p><h4>3. Rotate access keys regularly</h4><p>Access keys are used to access AWS resources programmatically through the AWS CLI, SDKs, or API. Access keys consist of an access key ID and a secret access key. Access keys are an essential part of AWS security, and it is crucial to rotate them regularly.</p><p>Using IAM, you can set up policies to require access key rotation after a specified period. You can also create policies to prevent the reuse of old access keys. Access key rotation helps reduce the risk of an unauthorized user accessing your AWS resources.</p><p>To configure access key rotation using IAM policies, follow these steps:</p><ol><li><em>Log in to the AWS Management Console and navigate to the IAM service.</em></li><li><em>Click on the “Policies” section and create a new policy.</em></li><li><em>In the policy, specify the maximum age for access keys.</em></li><li><em>Assign the policy to the appropriate IAM users or groups.</em></li><li><em>IAM will automatically enforce access key rotation for users assigned to the policy.</em></li></ol><h4>4. Use IAM roles</h4><p>IAM roles are a secure way to grant permissions to entities that you trust, such as AWS services, applications, or users outside your AWS account. Roles can be assigned to an EC2 instance or a Lambda function, allowing the instance or function to access AWS resources without having to store access keys in the instance or function code.</p><p>Using IAM roles helps you avoid storing access keys in your code or configuration files, which can reduce the risk of accidental or intentional exposure of sensitive information.</p><h4>5. Monitor IAM activity</h4><p>Monitoring IAM activity is essential to identify and respond to any suspicious or unauthorized activity. AWS provides CloudTrail, a service that logs and tracks API calls made to AWS resources.</p><p>Using CloudTrail, you can monitor IAM activity and detect any changes made to IAM policies or roles. You can also set up alerts or notifications to notify you of any suspicious activity.</p><p>In conclusion, securing your DevOps pipeline in AWS using IAM is essential to protect your AWS resources from unauthorized access or misuse. By implementing the best practices discussed in this blog post, you can help minimize the risk of security breaches and ensure the confidentiality, integrity, and availability of your AWS resources.</p><p>See you in my next blog, happy deploy days!</p><p>resources:</p><ul><li><a href="https://aws.amazon.com/blogs/security/how-to-monitor-and-query-iam-resources-at-scale-part-1/">How to monitor and query IAM resources at scale - Part 1 | Amazon Web Services</a></li><li><a href="https://aws.amazon.com/blogs/security/you-can-now-assign-multiple-mfa-devices-in-iam/">You can now assign multiple MFA devices in IAM | Amazon Web Services</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2abbbca889e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Terraform + Github Actions Together]]></title>
            <link>https://aws.plainenglish.io/how-to-use-terraform-github-actions-together-part-ii-cfc71d5bbd53?source=rss-c91bda3eb30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfc71d5bbd53</guid>
            <category><![CDATA[terraform-modules]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Emre Senturk]]></dc:creator>
            <pubDate>Mon, 15 Aug 2022 18:05:16 GMT</pubDate>
            <atom:updated>2023-04-12T00:53:43.187Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part II: Deploying the Terraform code automatically, using Github actions and provisioning our resources without needing any manual process.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*1qnX41d7HqEQRASZH8yy9Q.jpeg" /></figure><p>Hi, in the first part of the blog series, we created our Cloudwatch resources using the Terraform module. We will continue deploying the terraform code automatically, using Github actions and provisioning our resources without the need for any manual process.</p><p>Github actions help us to perform various actions such as buildings, packaging, and disturbing the codes, also running them on various platforms.</p><p>Workflows can be run automatically on Github actions after you’ve pushed your any code through your local to Github. Either automatic build workflows run can be set up for every day a specific hour.</p><p><strong>AWS Configuration</strong></p><p>We should define IAM user to give the credentials Github since our session can drop in a short time.</p><p>I will explain step by step <strong>creating IAM user.</strong></p><p><strong>1-</strong> First click the IAM section into AWS console</p><p><strong>2- </strong>Then you can click the <em>“Users” </em>section on left side</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*hzDsUF0r8hLMUbhUyzX-8Q.png" /></figure><p><strong>3-)</strong> Then click <em>“Add users”</em> to give<em> </em>permission <em>“AdministratorAccess”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*xUqOvcYOW5PH46OYuPb1Jw.png" /></figure><p><strong>4-) </strong>Get an the “Access key ID” and “Secret access key” then click <em>“Settings”</em> on Github repo section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*Ng9IDpdglejeeokfax38Gg.png" /></figure><p><strong>5-) </strong>On the left side click the <em>“Secrets”</em> section and <em>“Actions”</em> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*cv-ixyHicKqitw1WuurHfA.png" /></figure><p><strong>6-)</strong> Then click <em>“New repository secret”</em>and add <em>“AWS_ACCESS_KEY_ID”</em> <em>“AWS_SECRET_ACCESS_KEY”</em></p><p><strong>Configuring a workflow</strong></p><ul><li>We should come to <strong>actions </strong>tab on Github, while setting up Github actions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ndgKTJDyjY3f4uzqiUX8A.png" /><figcaption>Actions</figcaption></figure><ul><li>You can see a similar screen to below after your click to <strong>actions </strong>tab.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yxyESgfI0S2PCnp02z6XCA.png" /><figcaption>Overview actions page</figcaption></figure><p>Here, we can find some ready-made actions as a start. It is quite easy to find the action you need and say “Set up this workflow” and make the necessary settings. To understand the action event, let’s say “Set up a workflow yourself” on the right and open the editor to create our actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PrQU9csXYfI12QH6jUOsPA.png" /></figure><p>In our previous article, we performed terraform init, terraform plan and terraform apply events using terminal and manually. We want to automate those actions using Github actions are defined as .yml files. Our resource will be automatically created on AWS after any changes made to the Terraform code are pushed to the main branch or when PR comes to the main branch</p><p>When added to our terraform-deploy.yml files click <em>“Start commit”</em> button then workflows run automatically. Let’s go and deep dive to our .yml file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6AuJrXUrgbWCkZEs1cMj9A.png" /></figure><p><strong><em>name:</em></strong> The name of your workflow</p><p><strong><em>on :</em></strong> It is the parameter that allows us to specify in which state the action will be triggered and the start step of the action. In our practise, when push to main branch or any pull request comes.</p><p><strong><em>jobs : </em></strong>A job is made up of multiple steps and runs in an instance of the virtual environment. Jobs can run independently of each other or sequential if the current job depends on the previous job to be successful.</p><p><strong><em>env :</em> </strong>env defines environment variables that are available to all jobs and steps in the workflow. In our practise, AWS credentials.</p><p><strong><em>steps : </em></strong>Steps represent a sequence of tasks that will be executed as part of the job.</p><p><strong><em>working-directory:</em></strong> Which directory to run these steps.</p><p><strong><em>run :</em> </strong>You can write commands to run.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d2cdcceb8a931c5e73b0b3be46a5611/href">https://medium.com/media/2d2cdcceb8a931c5e73b0b3be46a5611/href</a></iframe><p>When we push or create PR into main branch workflow will work step by step as follows.</p><p><strong>1- </strong>Configure terraform CLI in our GitHub Actions workflow running on ubuntu-latest.</p><p><strong>2-</strong> Checkout our code</p><p><strong>3-</strong> Setup the terraform environment.</p><p><strong>4-</strong> When the push or the PR event comes to main branch our terraform command will run in order.</p><p><strong>5-</strong> Then cloudwatch resource provision into AWS account.</p><h4>Run Workflow</h4><p>Until now we’ve configured our workflow. Also we’ve added AWS credentials. Now it’s time to push our code locally then our terraform resources automatically provision into AWS.</p><p>Push the code, made any changes, to main branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z4yx2dyxkjdl_2rQPfbfjg.png" /></figure><p>We will see in the actions tab that our workflow running automatically after the push our code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hpryVa6NOqJNHrtQEnFdeg.png" /></figure><p>And resources are created automatically in AWS account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YoCYhmWDV7olaAEHkoJp2w.png" /></figure><p>By using these two tools, you can separate the resources that you want to create environment-based and you can remove unnecessary resources from non-prod environments by using “terraform destroy”.</p><p>As a result, in this article series, I’ve tried to explain how to use terraform and Github actions together. You can automatically provision your own resources and follow the versioning. There is no limit to the automation you can do using Github actions.</p><ul><li>See you in my next blog, happy deploy days!</li></ul><p><a href="https://github.com/emrsenturk/terraformModules">GitHub - emrsenturk/terraformModules</a></p><p>Resources:</p><ul><li><a href="https://docs.github.com/en/actions">GitHub Actions documentation - GitHub Docs</a></li><li><a href="https://github.com/hashicorp/terraform-github-actions">GitHub - hashicorp/terraform-github-actions: Terraform GitHub Actions</a></li></ul><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Interested in scaling your software startup</em></strong><em>? Check out </em><a href="https://circuit.ooo/?utm=publication-post-cta"><strong><em>Circuit</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfc71d5bbd53" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/how-to-use-terraform-github-actions-together-part-ii-cfc71d5bbd53">How to Use Terraform + Github Actions Together</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Terraform + Github Actions Together]]></title>
            <link>https://aws.plainenglish.io/how-to-use-terraform-github-actions-together-part-i-855503844a04?source=rss-c91bda3eb30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/855503844a04</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform-modules]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Emre Senturk]]></dc:creator>
            <pubDate>Tue, 09 Aug 2022 18:30:37 GMT</pubDate>
            <atom:updated>2023-04-12T00:54:49.398Z</atom:updated>
            <content:encoded><![CDATA[<p>Part I: Provision the Cloudwatch resources using the Teraform module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T1rebBEE4g2CJJcY" /></figure><p>In this blog series, we will learn about how to automate our terraform code using Github actions. While creating amazon resources with terraform, I wanted to share my experience on how we can automatically provision them. Because automation saves the time we waste. In the first part of this blog, we will first provision the cloudwatch resources using the terraform module.</p><h4><strong>Prerequisites</strong></h4><ul><li>github account</li><li>terraform</li><li>aws account</li></ul><h4><strong>Creating AWS Cloudwatch resources using Terraform Module</strong></h4><p>Terraform Module is the core component of writing reusable, maintainable, and testable Terraform code. You can collect the common works you do with the module under a single method and avoid code repetition and write cleaner, easy-to-maintain and effective code.</p><p>— We set our file structure, let’s create a file structure as follows. You can check your file structure via the terminal using the tree command.</p><p>.<br>├── README.md<br>├── main.tf<br>├── variable.tf<br>├── cloudwatch-module<br>│ └── main.tf<br>│ └── version.tf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*jzH8ta0HfWyeDEAHMlq0Rw.png" /></figure><p>Let’s write what resources we want to create about cloudwatch in main.tf, in this blog, I will create <strong><em>cloudwatch_dashboard</em></strong>, <strong><em>metric_alarm,</em></strong> <strong><em>log_group,</em></strong> <strong><em>log_stream </em></strong>resources.</p><p><strong>cloudwatch_dashboard =</strong> A Dashboard is filled with widgets, each of which you create and customize to report on a separate AWS metric.</p><p><strong>metric_alarm =</strong> The alarm takes one or more actions based on the value of the measure or expression relative to a threshold over a range of time periods.</p><p><strong>log_group =</strong> AWS CloudWatch, log groups are collections of log streams that share the same monitoring and access control settings. Log stream is a collection of log events that share the same resource.</p><p>-Let’s quickly create these resources in the code below into the main.tf</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb470b28eb31c957bf5feaf519af74ef/href">https://medium.com/media/eb470b28eb31c957bf5feaf519af74ef/href</a></iframe><p>-Then define our parameters in variable.tf file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b02d23a46e6ffb673ac2ab166a28b80/href">https://medium.com/media/2b02d23a46e6ffb673ac2ab166a28b80/href</a></iframe><p>Let’s create the resources we created using the Terraform module feature, go under the cloudwatch-module file, give the values ​​of our parameters and create the resources one by one into main.tf file,</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/72b2692252b20a526c8a3ce7d60075aa/href">https://medium.com/media/72b2692252b20a526c8a3ce7d60075aa/href</a></iframe><p>We can make the definitions about the used versions and now we can provision our resources on AWS.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e00f83b15be019f50c618551b6d2e9b/href">https://medium.com/media/5e00f83b15be019f50c618551b6d2e9b/href</a></iframe><p>Since all configurations, versions, and parameters are ready, we can run three commands in succession to provision terraform resources. They are <strong><em>terraform init, terraform plan, terraform apply.</em></strong></p><p>1-)First, after running the <strong>terraform init,</strong> we will see that it has successfully initialized it if we get an output like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*qj8XXMIhPzMqdVeRNuCc6g.png" /><figcaption><strong>terraform init</strong></figcaption></figure><p>2-)Then, let’s make sure which resources will be created by running a <strong>terraform plan.</strong></p><p>After running it, we see how many of which resources will be add, destroy or any change. Plan shows us 4 resources will be add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GPAKVySyTjdfkfJLWtzuow.png" /><figcaption><strong>terraform plan</strong></figcaption></figure><p>3-)Finally, we can run <strong>terraform apply</strong> and create the resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZfTurhgsXTGWtVRef4UdJg.png" /><figcaption><strong>terraform apply</strong></figcaption></figure><p>Let’s check together whether the resources are created correctly on AWS Console.</p><p>-You can click cloudwatch service and then see the dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zgNE0HSZ5WYddKsXiFyMA.png" /><figcaption><strong>cloudwatch-dashboard</strong></figcaption></figure><p>-After you click on EC2-Dashboard, the page opens the Dashboard and shows the CPU utilization of all the running instances in the AWS account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryFHX6uMMJzloCWDbpknpg.png" /><figcaption><strong>dashboard detail</strong></figcaption></figure><p>Then click the All alarms menu you will see terraform-test alarm this test use for CPU Usage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YmQTqK9w6SYgPw6Q-mwoKA.png" /><figcaption><strong>metric alarm</strong></figcaption></figure><p>Finally, we will see in the Log groups section our log group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pzBOyplswGhNTkegT8W2Lw.png" /><figcaption><strong>log group</strong></figcaption></figure><p>And click on log-group, and you will see all the details of the log group, such as creation time, retention, and log group ARN. Also, you will see the Log streams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwDRjYbBfO-QSLp9p4sCHQ.png" /><figcaption><strong>log stream</strong></figcaption></figure><p>In conclusion, we have seen how to create resources related to cloudwatch using the terraform module feature. In the next part, we will learn how to automatically provision the terraform module that we have written using Github actions.</p><p>You can check out the source code,</p><p><a href="https://github.com/emrsenturk/terraformModules">GitHub - emrsenturk/terraformModules</a></p><p>resources:</p><p><a href="https://registry.terraform.io/">Terraform Registry</a></p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Interested in scaling your software startup</em></strong><em>? Check out </em><a href="https://circuit.ooo/?utm=publication-post-cta"><strong><em>Circuit</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=855503844a04" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/how-to-use-terraform-github-actions-together-part-i-855503844a04">How to Use Terraform + Github Actions Together</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>