<?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[CloudSpec Tool - Medium]]></title>
        <description><![CDATA[CloudSpec is an open source tool for validating your resources in your cloud providers using a logical language. - Medium]]></description>
        <link>https://medium.com/cloudspec-tool?source=rss----3877a6233679---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>CloudSpec Tool - Medium</title>
            <link>https://medium.com/cloudspec-tool?source=rss----3877a6233679---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 08:15:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/cloudspec-tool" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[An Introduction to CloudSpec]]></title>
            <link>https://medium.com/cloudspec-tool/an-introduction-to-cloudspec-e1fba9e99a61?source=rss----3877a6233679---4</link>
            <guid isPermaLink="false">https://medium.com/p/e1fba9e99a61</guid>
            <category><![CDATA[cloudspec]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[configuration-management]]></category>
            <dc:creator><![CDATA[Ezequiel Foncubierta]]></dc:creator>
            <pubDate>Sun, 31 May 2020 16:34:54 GMT</pubDate>
            <atom:updated>2020-05-31T16:34:54.396Z</atom:updated>
            <content:encoded><![CDATA[<p>As an infrastructure cloud architect, I have to deal many times with issues caused by miss-configured resources. From confidentiality of data sources made publicly available, to reliability and performance issues. Despite you putting all efforts limiting who and what can make changes to your cloud resources in a reproducible way, somebody always ends up making manual changes on your resources that don’t follow security or architecture best practices, or your company’s regulatory policies. So you need a way of validating that your resources in the cloud are correctly configured. You need to monitor the configuration and state of your cloud resources continuously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxxvDlb0LUjiN5dnIIzjCw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@johnschno?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">John Schnobrich</a> on <a href="https://unsplash.com/s/photos/cloud-computing?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Some cloud providers have services for continuously monitoring configuration, like AWS Config or Guardrails detective rules, that will tell you when something is not configured as it ought to. With these tools, you can define rules that meet your company’s compliance policies, or use a set of predefined rules that follows AWS’s best practices. Although these are great tools that I highly recommend if you are using AWS, they cannot be used with other cloud providers, like Azure or GCP. They are exclusive to AWS.</p><p>There are some other tools — which I am not going to enumerate in this post — that allows you to monitor the configuration and state of your cloud resources somehow. But in all of them, validation rules are created programmatically with a programming language that you may not know. And I think that’s a problem. Why would you, as a cloud administrator, want to learn a complex programming language for such simple tasks? I agree that a programming language gives you some extra flexibility, but having to learn everything that comes with it just to monitor configuration and state is overwhelming and unnecessary.</p><p>Many people took advantage of this pandemic lockdown to catch up with their reading backlogs, watch TV series, learn how to cook or even exercise. That’s what I did too, but did you know Sir Isaac Newton invented calculus when he was working from home during the Great Plague of London? Neither did I. So I decided to use the very little time my two years old twins grant me at nights to implement a tool to monitor the configuration and state of your resources in the cloud, instead of catching up with my readings.</p><p>This tool that I named <a href="https://github.com/efoncubierta/cloudspec">CloudSpec</a> should meet the following criteria:</p><ul><li><strong>Open-source</strong>: Anybody can use it with no restrictions or copyright infringement.</li><li><strong>Extensible</strong>: Adding support to new cloud providers and resource types should be relatively straightforward.</li><li><strong>Natural language syntax</strong>: Declaring validation rules should be as simple as writing statements in the English language (that’s funny because English isn’t my first language).</li></ul><h3>What is CloudSpec?</h3><p>CloudSpec is an open-source tool for validating your resources in your cloud providers using a logical language that everybody can understand. With its reasonably simple syntax, you can validate the configuration and state of your cloud resources, avoiding mistakes that can lead to availability or confidentiality issues.</p><p>A resource can be anything, from an EC2 Instance in AWS to a K8s pod in GCP. Anything that you create and manage in the cloud that your business relies on. A resource has properties and associations. Properties define the configuration and state of the resource, while associations define its relationships with other resources. With CloudSpec, you can validate not only a resource but also its associated resources. For example, let’s take an EC2 Instance. It has properties defining its state, like its unique instance identifier, its name, its type, and the such. But it also has associations like the subnet it belongs to, the EBS volumes attached to it, the AMI it uses, and the such. You not only can validate whether an EC2 Instance is of a particular instance type, or has the delete termination flag enabled, but also the size of its attached volumes, the CIDR block of its subnet, or any other property in its associated resources, or associated resources to its associated resources, and so on. You follow me.</p><p>All your cloud resources are entangled together, creating a graph. A graph that you can traverse and validate as you see fit according to your best practices or compliance policies. That ability, plus its logical language, is the beauty of CloudSpec.</p><h3>CloudSpec providers</h3><p>CloudSpec itself does not support any cloud provider or resource type. The core of CloudSpec is the syntax interpreter for the specification files and its validation engine. However, CloudSpec does use providers, which are extensions to CloudSpec supporting each different type of resource on each particular cloud provider. For example, with the AWS provider, you can validate your resources in AWS, like your EC2 instances.</p><p>A provider defines the shape of each resource type, properties and associations, and the logic to load those resources in the validation graph.</p><p>You can find the available providers and resources they provide in the <a href="https://github.com/efoncubierta/cloudspec/blob/master/doc/index.md">CloudSpec Reference</a> documentation.</p><h3>CloudSpec syntax</h3><p>As I said above, the CloudSpec syntax must be concise and straightforward, so anybody can learn it in a couple of minutes. Here is an example of what it looks like:</p><pre>Spec &quot;Production environment&quot;<br><br>Group &quot;S3 validations&quot;<br>  Rule &quot;All S3 buckets must have access logs enabled&quot;<br>  On aws:s3:bucket<br>  Assert<br>    access_logs is enabled<br><br>Group &quot;EC2 validations&quot;<br>  Rule &quot;EC2 instances tagged as &#39;production&#39; must use &#39;gp2&#39; volumes and be at least 50GiBs large.&quot;<br>    On aws:ec2:instance<br>    With<br>      tags[&quot;environment&quot;] equal to &quot;production&quot;<br>    Assert<br>      blockDeviceMappings (<br>        ebs (<br>          &gt; volume (<br>            type equal to &quot;gp2&quot; and<br>            size gte 50<br>          )<br>        )<br>      )</pre><p>You would agree with me that this example needs little or no explanation.</p><ul><li>Validation rules are defined within a scope.</li><li>A scope is defined by a resource type (e.g. all EC2 instances).</li><li>A scope can be narrowed down using the With clause (e.g. has tag “environment” with value “production”).</li><li>Resulting resources in the scope gets validated with Assert clauses.</li><li>Rules can be grouped.</li></ul><p>You can find the full details of the syntax in the <a href="https://github.com/efoncubierta/cloudspec/blob/master/doc/index.md">CloudSpec Reference</a> documentation.</p><h3>What’s next?</h3><p>At the time of writing this article CloudSpec is fully functional and support some AWS resources, but you’d have to compile it as I am not distributing it yet. The mid-term plan is to distribute CloudSpec as a Docker image that you can easily run from any computer, or service like ECS. There is still a long way to go until it becomes production ready though.</p><p>I am documenting and inventing this project as I go, so I recommend you to read the most up to date documentation in Github. But if you are interested in knowing how I am building CloudSpec follow me in <a href="https://medium.com/@ezequiel">Medium</a> and <a href="https://twitter.com/EzeFoncubierta">Twitter</a>. I’ll be writing new articles in the next weeks disclosing progress, architecture design, and so on.</p><p>Next article: CloudSpec technology stack (coming soon)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1fba9e99a61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudspec-tool/an-introduction-to-cloudspec-e1fba9e99a61">An Introduction to CloudSpec</a> was originally published in <a href="https://medium.com/cloudspec-tool">CloudSpec Tool</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>