<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rinaxsumomo</title>
    <description>The latest articles on DEV Community by rinaxsumomo (@rinaxsumomo).</description>
    <link>https://dev.to/rinaxsumomo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F707087%2F17b354a7-6dbc-4374-8c8f-140071e24653.png</url>
      <title>DEV Community: rinaxsumomo</title>
      <link>https://dev.to/rinaxsumomo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rinaxsumomo"/>
    <language>en</language>
    <item>
      <title>How to Install OpenAPI (Swagger) Editor Plugin in Eclipse Offline</title>
      <dc:creator>rinaxsumomo</dc:creator>
      <pubDate>Fri, 14 Nov 2025 10:15:23 +0000</pubDate>
      <link>https://dev.to/rinaxsumomo/how-to-install-openapi-swagger-editor-in-eclipse-offline-2d79</link>
      <guid>https://dev.to/rinaxsumomo/how-to-install-openapi-swagger-editor-in-eclipse-offline-2d79</guid>
      <description>&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;

&lt;p&gt;If you need to install the 42Crunch OpenAPI (Swagger) Editor plugin in Eclipse without internet access, here’s the clean way to do it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Environment
&lt;/h1&gt;

&lt;p&gt;macOS Sonoma 14.x&lt;br&gt;
Eclipse IDE (2025 edition for Mac)&lt;/p&gt;
&lt;h1&gt;
  
  
  Steps
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Step 1: Prepare an Online Machine
&lt;/h2&gt;

&lt;p&gt;You’ll first download the plugin from the official update site using Eclipse’s built-in p2 mirror tool.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Latest Update Site URL(As of 2025/11/14)
https://eclipse.42crunch.com/updatesite-1.0.95
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step2: Mirror the Update Site
&lt;/h2&gt;

&lt;p&gt;On your online Mac machine, open Terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Go to Eclipse executable directory
cd /Applications/Eclipse.app/Contents/MacOS

# Mirror metadata
./eclipse \
-nosplash \
-application org.eclipse.equinox.p2.metadata.repository.mirrorApplication \
-source https://eclipse.42crunch.com/updatesite-1.0.95 \
-destination file:/Users/yourname/eclipse-mirror/42crunch

# Mirror artifacts
./eclipse \
-nosplash \
-application org.eclipse.equinox.p2.artifact.repository.mirrorApplication \
-source https://eclipse.42crunch.com/updatesite-1.0.95 \
-destination file:/Users/yourname/eclipse-mirror/42crunch

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What these options mean:&lt;/p&gt;

&lt;p&gt;-nosplash → No GUI splash screen&lt;br&gt;
-application → Runs the p2 mirror tool&lt;br&gt;
-source → Online update site URL&lt;br&gt;
-destination → Local folder for the mirrored repository&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Zip the Repository
&lt;/h2&gt;

&lt;p&gt;After mirroring, verify that the folder contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;artifacts.jar
content.jar
features/
plugins/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then zip it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /Users/yourname/eclipse-mirror/42crunchzip -r 42crunch-openapi-p2.zip .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Install Offline
&lt;/h2&gt;

&lt;p&gt;On the offline machine:&lt;/p&gt;

&lt;p&gt;Open Eclipse → Help → Install New Software → Add → Archive...&lt;br&gt;
Select 42crunch-openapi-p2.zip&lt;br&gt;
Install and restart Eclipse.&lt;/p&gt;

&lt;p&gt;✅ Done! You now have the 42Crunch OpenAPI Editor installed without internet access.&lt;/p&gt;

&lt;p&gt;✅ Tip: This method works for any Eclipse plugin that provides a p2 update site.&lt;/p&gt;

&lt;p&gt;✅ Why p2 Mirror is Better Than Dropins&lt;br&gt;
You might wonder: why not just copy JAR files into Eclipse’s dropins folder?&lt;br&gt;
Here’s why p2 mirror is the recommended approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency resolution: p2 ensures all required bundles and features are installed correctly.&lt;/li&gt;
&lt;li&gt;Update support: Future updates can be applied easily using the same mirrored repository.&lt;/li&gt;
&lt;li&gt;Clean uninstall: p2 tracks installed components, so you can remove them without breaking Eclipse.&lt;/li&gt;
&lt;li&gt;Dropins is a hack: It bypasses p2, often causing version conflicts and missing dependencies.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>swagger</category>
      <category>eclipse</category>
      <category>openai</category>
    </item>
    <item>
      <title>Comparing AWS Route 53 Health Checks and CloudWatch Synthetics: Lightweight Website Monitoring for Production Readiness</title>
      <dc:creator>rinaxsumomo</dc:creator>
      <pubDate>Tue, 20 May 2025 04:44:21 +0000</pubDate>
      <link>https://dev.to/rinaxsumomo/comparing-aws-route-53-health-checks-and-cloudwatch-synthetics-lightweight-website-monitoring-for-6dm</link>
      <guid>https://dev.to/rinaxsumomo/comparing-aws-route-53-health-checks-and-cloudwatch-synthetics-lightweight-website-monitoring-for-6dm</guid>
      <description>&lt;h1&gt;
  
  
  🛡️ Comparing AWS Route 53 Health Checks and CloudWatch Synthetics: Lightweight Website Monitoring for Production Readiness
&lt;/h1&gt;

&lt;p&gt;When monitoring a web application's availability and reliability, especially for production frontends such as SPAs (Single Page Applications), AWS offers two native solutions: &lt;strong&gt;Route 53 Health Checks&lt;/strong&gt; and &lt;strong&gt;CloudWatch Synthetics Canaries&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this post, we’ll walk through the practical differences between them in terms of &lt;strong&gt;setup simplicity&lt;/strong&gt;, &lt;strong&gt;cost&lt;/strong&gt;, &lt;strong&gt;customizability&lt;/strong&gt;, &lt;strong&gt;security&lt;/strong&gt;, and &lt;strong&gt;reliability&lt;/strong&gt; — with the goal of helping you choose the right one depending on your use case.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Use Case Assumption
&lt;/h2&gt;

&lt;p&gt;You want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor the &lt;strong&gt;top page of a public-facing web app&lt;/strong&gt; (e.g., &lt;code&gt;https://example.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Confirm that it &lt;strong&gt;returns HTTP 200&lt;/strong&gt; status reliably&lt;/li&gt;
&lt;li&gt;Detect failure and &lt;strong&gt;send alerts to Slack&lt;/strong&gt; using AWS SNS + Chatbot&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;do not need DNS failover&lt;/strong&gt; or traffic redirection&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧭 Summary Table: Route 53 Health Check vs CloudWatch Synthetics
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Route 53 Health Check&lt;/th&gt;
&lt;th&gt;CloudWatch Synthetics Canary&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Basic uptime monitoring (HTTP status)&lt;/td&gt;
&lt;td&gt;End-to-end synthetic testing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Protocol Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;HTTP, HTTPS&lt;/td&gt;
&lt;td&gt;Full browser simulation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;JavaScript Rendering&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Not supported&lt;/td&gt;
&lt;td&gt;✅ Supported (Headless Chromium)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Custom Headers / Cookies&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Not supported&lt;/td&gt;
&lt;td&gt;✅ Fully customizable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost (Approx.)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$0.50 / month per check&lt;/td&gt;
&lt;td&gt;~$31 / month per 5-min interval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CloudWatch Metrics&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ Native (&lt;code&gt;HealthCheckStatus&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;✅ Native (customizable metrics)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Alerting via SNS + Chatbot&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ Supported&lt;/td&gt;
&lt;td&gt;✅ Supported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Setup Complexity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Very simple&lt;/td&gt;
&lt;td&gt;More involved (uses Lambda)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-region Checks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅ Multiple AWS regions by default&lt;/td&gt;
&lt;td&gt;❌ Runs from a single region (unless duplicated)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SPA Suitability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Only if HTTP 200 is sufficient&lt;/td&gt;
&lt;td&gt;Best for full rendering validation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🎯 When Route 53 Health Checks Are Ideal
&lt;/h2&gt;

&lt;p&gt;Despite being often associated with DNS failover, &lt;strong&gt;Route 53 Health Checks can be used independently for monitoring purposes&lt;/strong&gt;, even without DNS routing features. Here's when it shines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You only need to check whether a &lt;strong&gt;specific URL returns 200 OK&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You want a &lt;strong&gt;cost-effective&lt;/strong&gt; and &lt;strong&gt;low-maintenance&lt;/strong&gt; option&lt;/li&gt;
&lt;li&gt;You want alerts via &lt;strong&gt;CloudWatch Alarm → SNS → Slack&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You're &lt;strong&gt;not concerned with page content, rendering, or login redirection&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s worth noting that even with SPAs, if your top-level HTML returns 200 and that’s your definition of “healthy,” this method is both &lt;strong&gt;sufficient and inexpensive&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚠️ When You Might Need Synthetics Instead
&lt;/h2&gt;

&lt;p&gt;If your requirements include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verifying if a SPA &lt;strong&gt;renders content properly&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Checking &lt;strong&gt;redirects to login&lt;/strong&gt; pages (e.g., due to expired sessions or API 401s)&lt;/li&gt;
&lt;li&gt;Performing &lt;strong&gt;step-by-step flows&lt;/strong&gt; or scripted behavior&lt;/li&gt;
&lt;li&gt;Emulating &lt;strong&gt;authenticated users&lt;/strong&gt; or handling cookies&lt;/li&gt;
&lt;li&gt;Taking &lt;strong&gt;screenshots&lt;/strong&gt; or logging failures in detail&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then &lt;strong&gt;CloudWatch Synthetics Canaries&lt;/strong&gt; are much more appropriate. They allow &lt;strong&gt;headless browser scripting&lt;/strong&gt;, can run in VPCs, and generate detailed logs and artifacts.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Real-World Note: Cross-Account Resources
&lt;/h2&gt;

&lt;p&gt;In many organizations — especially those adopting account-per-environment or account-per-purpose strategies — it’s &lt;strong&gt;common for the DNS (Route 53) to be managed in a different AWS account than the application infrastructure&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Route 53 DNS zone is in Account A&lt;/strong&gt;
(e.g., central domain/account team)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 bucket and CloudFront distribution (serving the SPA) are in Account B&lt;/strong&gt;
(e.g., owned by the app development team)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even in this case, &lt;strong&gt;Route 53 Health Checks, CloudWatch Alarms, SNS Topics, and AWS Chatbot can be managed independently&lt;/strong&gt; in either account. Since the health check only targets a public URL, it doesn’t require access to private resources.&lt;/p&gt;

&lt;p&gt;This flexibility makes it easy to adopt Route 53-based health monitoring without restructuring your accounts or permissions — as long as the health check doesn’t need to modify Route 53 records (which is not necessary for notification-only use cases).&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Security Consideration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Route 53 Health Checks&lt;/strong&gt; are &lt;strong&gt;public&lt;/strong&gt; and must reach a public endpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synthetics Canaries&lt;/strong&gt; can run &lt;strong&gt;inside a VPC&lt;/strong&gt;, allowing private API monitoring or intranet-facing systems.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 Final Recommendation
&lt;/h2&gt;

&lt;p&gt;For &lt;strong&gt;basic availability monitoring&lt;/strong&gt; where a &lt;strong&gt;200 OK&lt;/strong&gt; response is the only requirement, &lt;strong&gt;Route 53 Health Checks&lt;/strong&gt; are the &lt;strong&gt;simplest, cheapest, and most reliable&lt;/strong&gt; solution — especially when combined with &lt;strong&gt;CloudWatch Alarms + SNS + AWS Chatbot for Slack alerts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, if your application’s health depends on &lt;strong&gt;dynamic behavior or rendered content&lt;/strong&gt;, investing in &lt;strong&gt;CloudWatch Synthetics Canaries&lt;/strong&gt; is justified despite the higher cost.&lt;/p&gt;




</description>
      <category>aws</category>
      <category>monitoring</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Importing existing AWS IAM resources to Terraform</title>
      <dc:creator>rinaxsumomo</dc:creator>
      <pubDate>Thu, 25 Apr 2024 07:34:40 +0000</pubDate>
      <link>https://dev.to/rinaxsumomo/importing-existing-aws-iam-resources-to-terraform-1dac</link>
      <guid>https://dev.to/rinaxsumomo/importing-existing-aws-iam-resources-to-terraform-1dac</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;My project team created some AWS resources manually, but they wanted to bring this environment to another account. So here's Terraform. Using &lt;code&gt;terraform import&lt;/code&gt; command, you can import existing resources to have Terraform manage.&lt;br&gt;
In a nutshell, it's about updating tfstate file to reflect existing resources by this command, then reflecting the resources to main.tf (or other .tf files) to remove the differences between Terraform configuration and the real environment.&lt;/p&gt;
&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS&lt;/li&gt;
&lt;li&gt;Terraform v1.7.5&lt;/li&gt;
&lt;li&gt;Terraform Backend set to S3&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic knowledge of AWS&lt;/li&gt;
&lt;li&gt;Basic knowledge of Terraform&lt;/li&gt;
&lt;li&gt;IAM credentials that allow creating resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Terraform Directory design
&lt;/h2&gt;

&lt;p&gt;Since we had different environment such as production, test, development, the Terraform directory is designed as below.&lt;br&gt;
Also, we wanted to re-use codes, so we divided modules as below. VPC and IAM modules were developed.&lt;br&gt;
There is iam.tf in /environment/test directory. This is the tf file to create IAM resource, developed in this post. This will be copied to the other environments as well.&lt;/p&gt;

&lt;p&gt;.&lt;br&gt;
├── environments&lt;br&gt;
│   ├── dev&lt;br&gt;
│   │   ├── main.tf&lt;br&gt;
│   │   ├── terraform.tf&lt;br&gt;
│   │   ├── terraform.tfvars&lt;br&gt;
│   │   └── variables.tf&lt;br&gt;
│   ├── test&lt;br&gt;
│   │   ├── iam.tf&lt;br&gt;
│   │   ├── main.tf&lt;br&gt;
│   │   ├── output.tf&lt;br&gt;
│   │   ├── terraform.tf&lt;br&gt;
│   │   ├── terraform.tfvars&lt;br&gt;
│   │   └── variables.tf&lt;br&gt;
│   ├── prod&lt;br&gt;
│   │   ├── main.tf&lt;br&gt;
│   │   ├── terraform.tf&lt;br&gt;
│   │   ├── terraform.tfvars&lt;br&gt;
│   │   └── variables.tf&lt;br&gt;
├── modules&lt;br&gt;
   ├── vpc&lt;br&gt;
   │   ├── main.tf&lt;br&gt;
   │   ├── output.tf&lt;br&gt;
   │   └── variables.tf&lt;br&gt;
   └── iam&lt;br&gt;
       ├── policy&lt;br&gt;
       │   ├── main.tf&lt;br&gt;
       │   ├── output.tf&lt;br&gt;
       │   ├── policies&lt;br&gt;
       │   │   └── xxx_allow_policy.json&lt;br&gt;
       │   ├── terraform.tf&lt;br&gt;
       │   └── variables.tf&lt;br&gt;
       └── role&lt;br&gt;
           ├── main.tf&lt;br&gt;
           ├── output.tf&lt;br&gt;
           ├── roles&lt;br&gt;
           │   ├── ec2.json&lt;br&gt;
           │   ├── lambda.json&lt;br&gt;
           │   └── s3.json&lt;br&gt;
           ├── terraform.tf&lt;br&gt;
           └── variables.tf&lt;/p&gt;
&lt;h2&gt;
  
  
  Import
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Add resource block to .tf file
&lt;/h3&gt;

&lt;p&gt;First, you need to add empty resource blocks for your imported resources in main.tf.&lt;br&gt;
In this case, I've added a new file, iam.tf acting as main.tf when running &lt;code&gt;terraform apply&lt;/code&gt; command, and main.tf for IAM module called from iam.tf. &lt;br&gt;
iam.tf is separated from main.tf in the environment directory for some operational reasons.&lt;br&gt;
Below are the snippets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# iam.tf in environment directory
module "iam_policy" {
  source = "../../modules/iam/policy"
}

module "iam_role" {
  source = "../../modules/iam/role"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't have to add arguments such as name or policy inside the block for now.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# main.tf in IAM Policy module directory
resource "aws_iam_policy" "test_policy" {
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# main.tf in IAM Role module directory
resource "aws_iam_role" "test_role" {
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Import IAM Policy
&lt;/h3&gt;

&lt;p&gt;Here is the command and the result example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ terraform import module.iam_policy.aws_iam_policy.test_policy arn:aws:iam::1234567890:policy/test-policy
xxx...
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Import IAM Role
&lt;/h3&gt;

&lt;p&gt;Here is the command and the result example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ terraform import module.iam_role.aws_iam_role.test_role Test-Role
xxx...
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Check the tfstate file
&lt;/h3&gt;

&lt;p&gt;You should see that your imported resource is added in the tfstate file like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "module": "module.iam_policy",
  "mode": "managed",
  "type": "aws_iam_policy",
  "name": "test_policy",
  "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
  "instances": [
    {
      "schema_version": 0,
      "attributes": {
        xxxx
      },
      "sensitive_attributes": [],
      "private": "xxx"
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Update main.tf in IAM Policy and Role module directory.
&lt;/h3&gt;

&lt;p&gt;Now using the information added in the tfstate file, you need to add arguments in the resource blocks like below.&lt;br&gt;
If you use JSON file for policies, you need to place them accordingly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# main.tf in IAM Policy module directory
resource "aws_iam_policy" "test_policy" {
  name = "test-policy"
  policy = file("${path.module}/policies/xxx_allow_policy.json")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# main.tf in IAM Role module directory
resource "aws_iam_role" "Test_Role" {
  name   = "Test-Role"
  assume_role_policy = file("${path.module}/roles/s3.json")
  managed_policy_arns = ["arn:aws:iam::1234567890:policy/test-policy"]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Plan to check differences
&lt;/h3&gt;

&lt;p&gt;Let's check if there are differences between Terraform configuration (imported ones) and the real resources in AWS. If you find differences (a kind of conflicts you might say), you need to resolve them. In this case, there are 6 differences as below. If the change was subtle, such as adding tags, you might apply this configuration change to the real resources, or you might modify other settings to resolve.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ terraform plan
xxx...
Plan: 0 to add, 6 to change, 0 to destroy.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;If you failed to add resource blocks before importing, you should see an error as below.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: resource address "aws_iam_policy.test_policy" does not exist in the configuration.

Before importing this resource, please create its configuration in the root module. For example:

resource "aws_iam_policy" "test_policy" {
  # (resource arguments)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The arguments for importing IAM Policy and IAM Role are different. The former is ARN and the latter is Name. I wonder why indeed. If you used ARN by mistake to import IAM Role, the command would return Invalid error as below, which can be confusing.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;│ Error: reading IAM Role (arn:aws:iam::1234567890:role/test-role): operation error IAM: GetRole, https response error StatusCode: 400, RequestID: 12345678-aaaa-bb12-cc34-1234567890, api error ValidationError: The specified value for roleName is invalid. It must contain only alphanumeric characters and/or the following: +=,.@_-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;READ THE DOCUMENT!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you imported wrong resources, you can remove them from Terraform state quickly as below. (This won't delete the real resources in AWS, no worry.)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's check if this would remove as you intend with dry-run.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ terraform state rm --dry-run module.wrongmodule.aws_iam_policy.wrong_policy
Would remove module.wrongmodule.aws_iam_policy.wrong_policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then let's remove.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ terraform state rm module.wrongmodule.aws_iam_policy.wrong_policy
Removed module.wrongmodule.aws_iam_policy.wrong_policy
Successfully removed 1 resource instance(s).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;OK, I've imported all the IAM resources to Terraform configuration with some try&amp;amp;error. It's really important to read Terraform official document in detail..&lt;br&gt;
Hoping this post would help.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment"&gt;https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment"&gt;https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy"&gt;https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role"&gt;https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>iam</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to change locale in Liberty Container image</title>
      <dc:creator>rinaxsumomo</dc:creator>
      <pubDate>Thu, 27 Apr 2023 02:46:20 +0000</pubDate>
      <link>https://dev.to/rinaxsumomo/how-to-change-locale-in-liberty-container-image-3p94</link>
      <guid>https://dev.to/rinaxsumomo/how-to-change-locale-in-liberty-container-image-3p94</guid>
      <description>&lt;p&gt;So you got WebSphere Liberty Container image based on Ubuntu from &lt;a href="https://hub.docker.com/_/websphere-liberty"&gt;here&lt;/a&gt;.&lt;br&gt;
And you'd like to change locale because you'd like to have logs in another language, such as Japanese, etc.&lt;br&gt;
My procedure in this post is based on &lt;a href="https://hub.docker.com/_/websphere-liberty"&gt;this&lt;/a&gt; but I think you need some additional steps, so here is how.&lt;br&gt;
By the way my environment is MacOS Monterey 23.6.5, Apple M1Pro,using podman instead of docker. That's why I pulled amd64, of course you can get other architecture images depending on your environment.&lt;/p&gt;

&lt;p&gt;1.Make Containerfile to install JP locale package and set environment variables with root.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM docker.io/amd64/websphere-liberty:23.0.0.3-full-java17-openj9
USER 0
RUN apt-get update \
 &amp;amp;&amp;amp; apt-get install -y language-pack-ja \
 &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*
ENV LANG=ja_JP.UTF-8 \
  LANGUAGE=ja_JP:ja \
  LC_ALL=ja_JP.UTF-8 \
  TZ="Asia/Tokyo"
USER 1001

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.Build image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ podman build -t amd64-websphere-liberty:23.0.0.3-full-java17-openj9-jp .
STEP 1/5: FROM docker.io/amd64/websphere-liberty:23.0.0.3-full-java17-openj9
STEP 2/5: USER 0
--&amp;gt; Using cache 5d96bfdaf8d57c662ee86745b993e848d14849982ab17d543c9a872dbd469da2
--&amp;gt; 5d96bfdaf8d
STEP 3/5: RUN apt-get update  &amp;amp;&amp;amp; apt-get install -y language-pack-ja  &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,632 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [28.5 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [1,035 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [2,145 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [31.2 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,331 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [2,308 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3,125 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [28.6 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB]
Fetched 26.2 MB in 20s (1,305 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
 language-pack-ja-base
The following NEW packages will be installed:
 language-pack-ja language-pack-ja-base
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 1,673 kB of archives.
After this operation, 7,786 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 language-pack-ja-base all 1:20.04+20220818 [1,671 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 language-pack-ja all 1:20.04+20220818 [1,900 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1,673 kB in 2s (899 kB/s)
Selecting previously unselected package language-pack-ja-base.
(Reading database ... 7344 files and directories currently installed.)
Preparing to unpack .../language-pack-ja-base_1%3a20.04+20220818_all.deb ...
Unpacking language-pack-ja-base (1:20.04+20220818) ...
Selecting previously unselected package language-pack-ja.
Preparing to unpack .../language-pack-ja_1%3a20.04+20220818_all.deb ...
Unpacking language-pack-ja (1:20.04+20220818) ...
Setting up language-pack-ja (1:20.04+20220818) ...
Setting up language-pack-ja-base (1:20.04+20220818) ...
Generating locales (this might take a while)...
 ja_JP.UTF-8... done
Generation complete.
--&amp;gt; 64f2583a73b
STEP 4/5: ENV LANG=ja_JP.UTF-8   LANGUAGE=ja_JP:ja   LC_ALL=ja_JP.UTF-8   TZ="Asia/Tokyo"
--&amp;gt; 7aade810f7c
STEP 5/5: USER 1001
COMMIT amd64-websphere-liberty:23.0.0.3-full-java17-openj9-jp
--&amp;gt; 78bbe9bddab
Successfully tagged localhost/amd64-websphere-liberty:23.0.0.3-full-java17-openj9-jp
78bbe9bddab06db1abaca8c6d0b8e2ca59908ea979ec07adb833714f50ed8d00
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.Run from the image and see if successfully running.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ podman images
REPOSITORY                                   TAG               IMAGE ID   CREATED    SIZE
localhost/amd64-websphere-liberty                       23.0.0.3-full-java17-openj9-jp 78bbe9bddab0 6 seconds ago 828 MB

$ podman run -d -p 9080:9080 -p 9443:9443 --name libertypodman localhost/amd64-websphere-liberty:23.0.0.3-full-java17-openj9-jp
5194c9971675cf84ce8dc9b609c7c44b44ea74c5b3b29f421d68ba47a318a8ba

$ podman ps -a
CONTAINER ID IMAGE                               COMMAND        CREATED    STATUS    PORTS                      NAMES
5194c9971675 localhost/amd64-websphere-liberty:23.0.0.3-full-java17-openj9-jp /opt/ibm/wlp/bin/... 4 seconds ago Up 4 seconds 0.0.0.0:9080-&amp;gt;9080/tcp, 0.0.0.0:9443-&amp;gt;9443/tcp libertypodman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.Check the inside of the container to check if JP locale is set and logs are written in JP.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ podman exec -it libertypodman /bin/sh
$ locale -a
C
C.UTF-8
POSIX
en_US.utf8
ja_JP.utf8

$ locale
LANG=ja_JP.UTF-8
LANGUAGE=ja_JP:ja
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=ja_JP.UTF-8

$ cd logs
$ ls
messages.log
$ cat messages.log
********************************************************************************
product = WebSphere Application Server 23.0.0.3 (wlp-1.0.75.cl230320230319-1900)
wlp.install.dir = /opt/ibm/wlp/
server.output.dir = /opt/ibm/wlp/output/defaultServer/
java.home = /opt/java/openjdk
java.version = 17.0.6
java.runtime = IBM Semeru Runtime Open Edition (17.0.6+10)
os = Linux (5.17.5-300.fc36.aarch64; amd64) (ja_JP)
process = 1@5194c9971675
Classpath = /opt/ibm/wlp/bin/tools/ws-server.jar:/opt/ibm/wlp/bin/tools/ws-javaagent.jar
Java Library path = /opt/java/openjdk/lib/default:/opt/java/openjdk/lib:/usr/lib64:/usr/lib
********************************************************************************
[2023/04/26 14:21:22:376 JST] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager      A CWWKE0001I: サーバー defaultServer が起動されました。
[2023/04/26 14:21:23:008 JST] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager      A CWWKE0100I: この製品は、開発使用向け、および限定的な実動使用向けにライセンスが交付されています。 全ライセンス条項は以下で表示可能です: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/23.0.0.3/lafiles/ja.html
$ exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>websphere</category>
      <category>liberty</category>
      <category>containers</category>
      <category>docker</category>
    </item>
    <item>
      <title>Introduction to IBM App Connect</title>
      <dc:creator>rinaxsumomo</dc:creator>
      <pubDate>Tue, 28 Sep 2021 12:44:02 +0000</pubDate>
      <link>https://dev.to/rinaxsumomo/introduction-to-ibm-app-connect-257c</link>
      <guid>https://dev.to/rinaxsumomo/introduction-to-ibm-app-connect-257c</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Although I'm used to IBM API Connect, I'm quite new to App Connect, which sounds very similar.&lt;br&gt;
Now it's time for me to learn App Connect as well and this post is a kind of my note. As I'm familiar with creating APIs, I'm going to start with &lt;a href="https://cloud.ibm.com/docs/AppConnect?topic=AppConnect-tutorial-api-flow&amp;amp;locale=en"&gt;Creating a flow for an API&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Get an IBM Cloud account (Lite or whatever). App Connect offers free edition that you don't need to pay to give a try.&lt;/li&gt;
&lt;li&gt;Deploy IBM App Connect on the IBM Cloud console, quite easy and simple with one click.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click "Create flows for an API".&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4x6ea8r20q788kl7ido5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4x6ea8r20q788kl7ido5.png" alt="dashboard" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter a name to represent your API.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9vav572pkvhgvikn7xt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc9vav572pkvhgvikn7xt.png" alt="createflow" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add properties as needed.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcclm1q7ujmqzbmk78ge6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcclm1q7ujmqzbmk78ge6.png" alt="properties" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;click operations to select operations and implement flows for each operation.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqotmm1jm4pomkb7ytsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqotmm1jm4pomkb7ytsw.png" alt="operations" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set request parameters, name and location in this case.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqe792zu4v0mjq3tpu5kz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqe792zu4v0mjq3tpu5kz.png" alt="reqparams" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add applications as needed. In this try I'm not going to add any application.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9o3z53xo7a4wx6gp16tu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9o3z53xo7a4wx6gp16tu.png" alt="apps" width="668" height="610"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set response parameters for the name and location.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddazz9pjwjy9edk4s1dg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddazz9pjwjy9edk4s1dg.png" alt="resparams" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click done and next.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcs8a5dhj6obkayd9vr15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcs8a5dhj6obkayd9vr15.png" alt="finish" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat the same procedure for GET flow by clicking Implement flow.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fis63wywbdnmgrm5jo7o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fis63wywbdnmgrm5jo7o2.png" alt="implflow" width="800" height="249"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set request parameters. Below is default setting.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhy0wgkamivxkjvwh9vf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhy0wgkamivxkjvwh9vf.png" alt="reqparam" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add applications as needed. In this try I'm not going to add any application as well, but I think this is the biggest point that differs from API Connect, as API Connect doesn't have such functions to integrate with other services.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6zis2iabdie9lircwiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6zis2iabdie9lircwiu.png" alt="apps" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set response parameters for the name and location.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9idbertfq80ked3euw0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9idbertfq80ked3euw0i.png" alt="resparams" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click done&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlj1aa1z17zucrnifrli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlj1aa1z17zucrnifrli.png" alt="finish" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start the API&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd48utghrzne3ye4imf18.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd48utghrzne3ye4imf18.png" alt="start" width="800" height="277"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now the API is running.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvrq9xgweilfxlkx3wdr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvrq9xgweilfxlkx3wdr9.png" alt="running" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Manage to check the API endpoint.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45qgyaf8tw8xhf7wmhay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45qgyaf8tw8xhf7wmhay.png" alt="manage" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As this API is secured with API key by default. API key must be created to supply in API requests. In this try, I'm going to create API key for IBM Cloud internal use.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofow0xh6haqkr92iryvs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofow0xh6haqkr92iryvs.png" alt="security" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click Create API key to generate one&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk2xsdxpx7dlrlyrv86qa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk2xsdxpx7dlrlyrv86qa.png" alt="apikey" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Below is my API key&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fawuu4z3etnqcb5mnuby6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fawuu4z3etnqcb5mnuby6.png" alt="mykey" width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now let's call the API with the key to POST (create) an entry.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6hhudea7b778xbt7elr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6hhudea7b778xbt7elr.png" alt="post" width="800" height="180"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Below is the request body and here's the response.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx4xe2y4tdukdcx5trzy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx4xe2y4tdukdcx5trzy.png" alt="body" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now let's call the API to GET (retrieve) an entry. Note that this API is not the entry created above, it's irrelevant  and this API simply returns the request parameter in the path  in the response body, and the location parameter is fixed as set in Step 12-13. &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7168w27l04haihlj4nrs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7168w27l04haihlj4nrs.png" alt="get" width="800" height="455"&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Here I explained how to create an API flow with App Connect.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ibmcloud</category>
      <category>api</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to retry and log the final result in Bash</title>
      <dc:creator>rinaxsumomo</dc:creator>
      <pubDate>Tue, 28 Sep 2021 07:23:22 +0000</pubDate>
      <link>https://dev.to/rinaxsumomo/how-to-retry-and-log-the-final-result-in-bash-17f0</link>
      <guid>https://dev.to/rinaxsumomo/how-to-retry-and-log-the-final-result-in-bash-17f0</guid>
      <description>&lt;p&gt;I know there are lots of how-to write retry logic in Bash, such as &lt;a href="https://stackoverflow.com/questions/12321469/retry-a-bash-command-with-timeout"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I've decided to use the one in the accepted answer above.&lt;br&gt;
However I wanted to add another logic to log the final result  as well, so I needed to modify this snippet as  &lt;em&gt;sleep&lt;/em&gt; always returns exit code 0 at last that logging depending on the exit code would not work as it always returns 0, even the command to be retried ended up with failure.&lt;/p&gt;

&lt;p&gt;So here is my snippet. Below runs YOUR_COMMAND until success, 4 times for the maximum, and echo the result based on the exit code. This might not work depending on how YOUR_COMMAND returns a result, but it worked in my case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_WAIT_TIME=0
RESULT=0
until [ ${NEXT_WAIT_TIME} -eq 4 ] || YOUR_COMMAND
do
    sleep $(( NEXT_WAIT_TIME++ ))
done
if [[ ${NEXT_WAIT_TIME} -eq 4 ]]; then
    RESULT=1
fi
if [[ ${RESULT} -eq 0 ]]; then
    echo "Command Successful"
else
    echo "Command Failed"
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>bash</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
