<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>S3 on Jose Castrillo</title>
    <link>https://jose.castrillo.eu/tags/s3/</link>
    <description>Recent content in S3 on Jose Castrillo</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 24 Jul 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://jose.castrillo.eu/tags/s3/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>S3 by using random provider on Terraform</title>
      <link>https://jose.castrillo.eu/post/random-provider-tf/</link>
      <pubDate>Sun, 24 Jul 2022 00:00:00 +0000</pubDate>
      <guid>https://jose.castrillo.eu/post/random-provider-tf/</guid>
      <description>&lt;p&gt;This is a piece of cake for most of you that are working on tf, I will drop this snippet code where you can create a S3 bucket with an unique name; as you know those &lt;a href=&#34;https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html&#34;&gt;requirements&lt;/a&gt; should fit in order to create the S3, hence we can use &lt;a href=&#34;https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string&#34;&gt;random_string&lt;/a&gt;, also we can use random_id, on this case I used random_string.&lt;/p&gt;
&lt;p&gt;main.tf&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-hcl&#34; data-lang=&#34;hcl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;resource&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;random_string&amp;#34; &amp;#34;randomz&amp;#34;&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;  length&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;  lower&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;  special&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;  upper&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Above is a &lt;strong&gt;resource block&lt;/strong&gt; where its block label is &lt;strong&gt;random_string&lt;/strong&gt; I defined the block body in that way in order to fit the S3&amp;rsquo;s &lt;a href=&#34;https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html&#34;&gt;requirements&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
